David Blevins
Apache TomEE:
JavaEE 6 Web Profile on Tomcat
@dblevins
#TomEE
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
What is Apache TomEE?
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Tomcat + JavaEE = TomEE
• Java EE 6 Web Profile certified stack, pronounced “Tommy”
• Tomcat
• All Apache components
- OpenJPA
- OpenWebBeans
- OpenEJB
- MyFaces
- BeanVal
- CXF & ActiveMQ
• CoreValues
- Be Small
- Be Certified
- Be Tomcat
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
What is a
“Web Profile”?
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
The Web Profile
• Introduced in Java EE 6
• About half the specs as the Full Profile
- 12~ in the Web Profile
- 24~ in the Full Profile
• Legacy-free, contains no
- CMP EntityBeans
- CORBA
- JAX-RPC
• Missing some good stuff
- JAX-RS
- JAX-WS
- JMS
- Connectors (surprisingly useful)
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Flavors of TomEE
• Apache TomEE Web Profile (Java EE 6 Certified)
- JPA
- CDI
- EJB
- JSF
- BeanValidation
- JavaMail *
• Apache TomEE JAX-RS (Java EE 6 Certified) *NEW*
- JAX-RS
• Apache TomEE Plus (NOT Java EE 6 Certified)
- JAX-WS
- Connector
- JMS
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Demo
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
The Birth of TomEE
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Milestones
• October 2011 - JavaOne
- 1.0 beta release
- JavaEE 6 Web Profile Certified
• April 2012
- 1.0 final release <fast, fast, fast>
• October 2012 - JavaOne
- 1.5 release <filling gaps>
• April 2013
- 1.5.2 release <maturity>
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Website Traffic
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
User List Traffic
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Jelastic
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Jelastic
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
User Feedback
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
“There is also one point to note. TomEE is insanely fast! ”
-- Łukasz Budnik, CXF JAX-RS on Apache TomEE @ DZone
“From an architect that switched from <XXX> to Tomee. I can tell
you Tomee kicks <XXX>'s ass in every way. Memory, speed,
reliability, validation, you name it.”
-- Zeeman, User List
“If you are concerned about performance and footprint, but can
accept that you'll have to solve problems yourself, go TomEE.
(TomEE seems to be _much_ faster than <XXX>)”
-- Jonathan Fisher, User List
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
“An ideal fit for a private cloud.”
-- Rohid Dev, American Express
“We have completely replaced <XXX> with TomEE+ at my dept
and have no regrets.”
-- Miles Poindexter, Condé Nast
“It's an amazingly pure, stable and simple to manage JEE6 web
profile container.”
-- Pete Keys, Starbucks
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Making TomEE
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Files Added
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Files Modified
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Testing
• Our own tests (hour+)
- Arquillian based
- Each test run 4 to 5 times
• Certification Tests on Amazon EC2 (hundred+ machine
hours)
- t1.micro linux images, lot’s of them
- 100 spot instances going at once!
- Each has 613MB memory max
- Pass complete Web Profile TCK with default jvm memory (tiny!)
• Current certified OSs
- Amazon Linux AMI 2011.09, EBS boot, 32-bit EC2 t1.micro
- Amazon Linux AMI 2011.09, EBS boot, 32-bit EC2 m1.small
- Amazon Linux AMI 2011.09, EBS boot, 32-bit EC2 c1.medium
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Results
• Small
- 27MB zip
- 64MB memory
• Works with Tomcat tools (it is Tomcat)
- Eclipse, Netbeans, Intellij
- YourKit, JRebel, NewRelic, etc.....
• Tightly integrated
- All about the code you don’t write
• Hundreds of hours of testing
- Unit, Integration, Compliance
• Certified
- Java EE 6 Web Profile portability
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Doing itYourself
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Perils of doing it yourself
• Wasted time you could spend coding
• Actually slower, not faster
- Tomcat will scan all your jars
- ... so will your JSF implementation
- ... so will your CDI implementation
- ... so will your JAX-RS implementation
- ... so will your JPA implementation... and so on
• Bloated memory from duplicate classes
• Incomplete parts
- OpenJPA missing JTA/EXTENDED EntityManagers
- OpenWebBeans runs 60% of CDI TCK
- Tomcat has no “java:global/” JNDI, @DataSourceDefinition, and
more
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Perils of doing it yourself
• Incomplete integration
- connection, transaction, security propagation
- increased cohesion in specifications
• Get by with a little help from friends
- No way to share bug fixes
- If only there was community for Tomcat integration....
• Under Tested
- 1000s of integration tests required
- Each upgrade is a mystery
- If only there was a community for sharing tests....
• No portability
- Hard changing parts
- Even harder changing servers
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Arquillian
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
All your bugs
are belong to us
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
TomEE + Arquillian = Bliss
• TomEE Remote Adapter
- For separate running TomEE process
- Managed and Unmanaged
• TomEE Embedded Adapter
- Runs TomEE in the test, embedded
• Tomcat + TomEE.war file
- Start with a Tomcat install
- Deploys the TomEE.war
• OpenEJB Embedded Adapter
- Everything but Servlet, JSP, JSF
- Much Faster
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Maven
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
All programs evolve until
they can send email
-- Letts’ Law
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
tomee-maven-plugin
• Configure and setup servers from scratch
- download and unzip fresh server
- add, remove jars from <tomee>/libs/
- install config files
• Manage Server
- start, stop, restart
• Manage Applications
- download apps
- deploy, undeploy
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
tomee-maven-plugin
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Tools and Platforms
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Tuesday, June 4, 13
#TomEE @dblevins
Jelastic
35
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Validation
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Validation
• Compiler style handing of issues
• All issues reported in one deploy
• Avoid “inching along” cycles
• Save the user time
• Teach the user
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
OverworkedBean
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Business Interface
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Validation Results
FAIL ... OverworkedBean: Missing required "name" attribute on class-level @EJB usage
FAIL ... OverworkedBean: Missing required "beanInterface" attribute on class-level @EJB usage
FAIL ... OverworkedBean: Missing required "type" attribute on class-level @Resource usage
FAIL ... OverworkedBean: Mistaken use of @Resource on an EntityManager reference. Use @PersistenceConte
FAIL ... OverworkedBean: Mistaken use of @Resource on an EntityManagerFactory reference. Use @Persisten
WARN ... OverworkedBean: Ignoring @PostConstruct used on interface org.superbiz.Overworked method comeIn
WARN ... OverworkedBean: Ignoring @PreDestroy used on interface org.superbiz.Overworked method stayLater
WARN ... OverworkedBean: Ignoring @RolesAllowed used on interface org.superbiz.Overworked method doThisR
WARN ... OverworkedBean: Ignoring @TransactionAttribute used on interface org.superbiz.Overworked method
WARN ... OverworkedBean: Ignoring @TransactionAttribute used on interface org.superbiz.Overworked method
WARN ... OverworkedBean: @Remove is ignored for beans of type Stateless. Method: stayLater
WARN ... OverworkedBean: @Init is ignored for beans of type Stateless. Method: comeInEarly
WARN ... OverworkedBean: Corrected invalid injection-target-name: setMyNumber
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Configuration
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Tomcat Options
•No rip and replace
• System Level
- conf/server.xml
• App Level
- META-INF/context.xml
• Standard configuration options still work
- Resources available too all components: EJBs, CDI, JSF
• Connection pooling still not JTA aware!
• All Security done with Tomcat Realms
- EJB security
- WebService Security
- Use your custom Realm implementation
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Additional Options
• System Level
- conf/tomee.xml
- conf/system.properties
• Process Level
- plain -D properties
• App Level
- META-INF/context.xml
- META-INF/resources.xml
- META-INF/application.properties
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
conf/tomee.xml
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Not Case-Sensitive
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Be as Brief as you Want
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
...really
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
...really brief
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Human Readable Durations
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Comments Welcome
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Do it in the App
• META-INF/resources.xml
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Hate XML?
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
conf/system.properties
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Plain Java Properties
• JAVA_OPTS in a script
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Mixed
• conf/tomee.xml
• META-INF/resources.xml
• JAVA_OPTS in a script
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Extending
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Extending (configuration)
• META-INF/resources.xml
• Injectable via @Resource
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Extending (runtime events)
• CDI-style @Observes
• Registered via <Service> in META-INF/resources.xml
• Not quite CDI (yet)
• 27 client-side events
• 12 server-side events
• more events coming...
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Failover Client-Side Events
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Management and
Monitoring
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Management and Monitoring
• JMX
- Webapp JMX deployment / apps (Tomcat)
- EJB Servers / Containers / Invocation stats (OpenEJB)
- JMS Topic / Queue / Subscriber / Broker (ActiveMQ)
- PersistenceUnit redeploy
- Database Pools
- Discovered servers / peers
- more coming...
• REST (soon)
- Just idea at this point
- Tiny bit available via ‘tomee’ console
- Would be great to have REST equivalents of all JMX beans
Tuesday, June 4, 13
#TomEE @dblevins63
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Tuning
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Scanning
• META-INF/scan.xml
• Usable in any jar
• Speeds loading of large jars
• Match packages
• Match classes
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Clust...^H...
Cloud Features
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Cloud
• Existing
- Super tiny size
- Certified on EC2 t1.micro, m1.small, c1.medium
- TCP and UDP server discovery
- Standard Tomcat clustering... er... cloudstering
- EJB client load-balancing and failover (stateless)
- Maven based provisioning
• Desired
- Multi-server console w/ monitoring and deployment
- Queue based auto-scaling (add/remove nodes)
- Cloud scoped @Singletons
- Cloud-wide @Observers and Events
- Cloud-wide Timers and @Schedule methods
- Amazon BeanStalk w/ TomEE
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
Cloud Feature Requests?
Tuesday, June 4, 13
Apache #TomEE - #JavaEE on #Tomcat / @dblevins
thank you!
tomee.apache.org
@dblevins
dblevins@apache.org
Tuesday, June 4, 13

Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins

  • 1.
    David Blevins Apache TomEE: JavaEE6 Web Profile on Tomcat @dblevins #TomEE Tuesday, June 4, 13
  • 2.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins What is Apache TomEE? Tuesday, June 4, 13
  • 3.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Tomcat + JavaEE = TomEE • Java EE 6 Web Profile certified stack, pronounced “Tommy” • Tomcat • All Apache components - OpenJPA - OpenWebBeans - OpenEJB - MyFaces - BeanVal - CXF & ActiveMQ • CoreValues - Be Small - Be Certified - Be Tomcat Tuesday, June 4, 13
  • 4.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins What is a “Web Profile”? Tuesday, June 4, 13
  • 5.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins The Web Profile • Introduced in Java EE 6 • About half the specs as the Full Profile - 12~ in the Web Profile - 24~ in the Full Profile • Legacy-free, contains no - CMP EntityBeans - CORBA - JAX-RPC • Missing some good stuff - JAX-RS - JAX-WS - JMS - Connectors (surprisingly useful) Tuesday, June 4, 13
  • 6.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Flavors of TomEE • Apache TomEE Web Profile (Java EE 6 Certified) - JPA - CDI - EJB - JSF - BeanValidation - JavaMail * • Apache TomEE JAX-RS (Java EE 6 Certified) *NEW* - JAX-RS • Apache TomEE Plus (NOT Java EE 6 Certified) - JAX-WS - Connector - JMS Tuesday, June 4, 13
  • 7.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Demo Tuesday, June 4, 13
  • 8.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins The Birth of TomEE Tuesday, June 4, 13
  • 9.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Milestones • October 2011 - JavaOne - 1.0 beta release - JavaEE 6 Web Profile Certified • April 2012 - 1.0 final release <fast, fast, fast> • October 2012 - JavaOne - 1.5 release <filling gaps> • April 2013 - 1.5.2 release <maturity> Tuesday, June 4, 13
  • 10.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Website Traffic Tuesday, June 4, 13
  • 11.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins User List Traffic Tuesday, June 4, 13
  • 12.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Jelastic Tuesday, June 4, 13
  • 13.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Jelastic Tuesday, June 4, 13
  • 14.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Tuesday, June 4, 13
  • 15.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins User Feedback Tuesday, June 4, 13
  • 16.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins “There is also one point to note. TomEE is insanely fast! ” -- Łukasz Budnik, CXF JAX-RS on Apache TomEE @ DZone “From an architect that switched from <XXX> to Tomee. I can tell you Tomee kicks <XXX>'s ass in every way. Memory, speed, reliability, validation, you name it.” -- Zeeman, User List “If you are concerned about performance and footprint, but can accept that you'll have to solve problems yourself, go TomEE. (TomEE seems to be _much_ faster than <XXX>)” -- Jonathan Fisher, User List Tuesday, June 4, 13
  • 17.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins “An ideal fit for a private cloud.” -- Rohid Dev, American Express “We have completely replaced <XXX> with TomEE+ at my dept and have no regrets.” -- Miles Poindexter, Condé Nast “It's an amazingly pure, stable and simple to manage JEE6 web profile container.” -- Pete Keys, Starbucks Tuesday, June 4, 13
  • 18.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Making TomEE Tuesday, June 4, 13
  • 19.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Files Added Tuesday, June 4, 13
  • 20.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Files Modified Tuesday, June 4, 13
  • 21.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Testing • Our own tests (hour+) - Arquillian based - Each test run 4 to 5 times • Certification Tests on Amazon EC2 (hundred+ machine hours) - t1.micro linux images, lot’s of them - 100 spot instances going at once! - Each has 613MB memory max - Pass complete Web Profile TCK with default jvm memory (tiny!) • Current certified OSs - Amazon Linux AMI 2011.09, EBS boot, 32-bit EC2 t1.micro - Amazon Linux AMI 2011.09, EBS boot, 32-bit EC2 m1.small - Amazon Linux AMI 2011.09, EBS boot, 32-bit EC2 c1.medium Tuesday, June 4, 13
  • 22.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Results • Small - 27MB zip - 64MB memory • Works with Tomcat tools (it is Tomcat) - Eclipse, Netbeans, Intellij - YourKit, JRebel, NewRelic, etc..... • Tightly integrated - All about the code you don’t write • Hundreds of hours of testing - Unit, Integration, Compliance • Certified - Java EE 6 Web Profile portability Tuesday, June 4, 13
  • 23.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Doing itYourself Tuesday, June 4, 13
  • 24.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Perils of doing it yourself • Wasted time you could spend coding • Actually slower, not faster - Tomcat will scan all your jars - ... so will your JSF implementation - ... so will your CDI implementation - ... so will your JAX-RS implementation - ... so will your JPA implementation... and so on • Bloated memory from duplicate classes • Incomplete parts - OpenJPA missing JTA/EXTENDED EntityManagers - OpenWebBeans runs 60% of CDI TCK - Tomcat has no “java:global/” JNDI, @DataSourceDefinition, and more Tuesday, June 4, 13
  • 25.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Perils of doing it yourself • Incomplete integration - connection, transaction, security propagation - increased cohesion in specifications • Get by with a little help from friends - No way to share bug fixes - If only there was community for Tomcat integration.... • Under Tested - 1000s of integration tests required - Each upgrade is a mystery - If only there was a community for sharing tests.... • No portability - Hard changing parts - Even harder changing servers Tuesday, June 4, 13
  • 26.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Arquillian Tuesday, June 4, 13
  • 27.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins All your bugs are belong to us Tuesday, June 4, 13
  • 28.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins TomEE + Arquillian = Bliss • TomEE Remote Adapter - For separate running TomEE process - Managed and Unmanaged • TomEE Embedded Adapter - Runs TomEE in the test, embedded • Tomcat + TomEE.war file - Start with a Tomcat install - Deploys the TomEE.war • OpenEJB Embedded Adapter - Everything but Servlet, JSP, JSF - Much Faster Tuesday, June 4, 13
  • 29.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Maven Tuesday, June 4, 13
  • 30.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins All programs evolve until they can send email -- Letts’ Law Tuesday, June 4, 13
  • 31.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins tomee-maven-plugin • Configure and setup servers from scratch - download and unzip fresh server - add, remove jars from <tomee>/libs/ - install config files • Manage Server - start, stop, restart • Manage Applications - download apps - deploy, undeploy Tuesday, June 4, 13
  • 32.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins tomee-maven-plugin Tuesday, June 4, 13
  • 33.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Tools and Platforms Tuesday, June 4, 13
  • 34.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Tuesday, June 4, 13
  • 35.
  • 36.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Validation Tuesday, June 4, 13
  • 37.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Validation • Compiler style handing of issues • All issues reported in one deploy • Avoid “inching along” cycles • Save the user time • Teach the user Tuesday, June 4, 13
  • 38.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins OverworkedBean Tuesday, June 4, 13
  • 39.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Business Interface Tuesday, June 4, 13
  • 40.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Validation Results FAIL ... OverworkedBean: Missing required "name" attribute on class-level @EJB usage FAIL ... OverworkedBean: Missing required "beanInterface" attribute on class-level @EJB usage FAIL ... OverworkedBean: Missing required "type" attribute on class-level @Resource usage FAIL ... OverworkedBean: Mistaken use of @Resource on an EntityManager reference. Use @PersistenceConte FAIL ... OverworkedBean: Mistaken use of @Resource on an EntityManagerFactory reference. Use @Persisten WARN ... OverworkedBean: Ignoring @PostConstruct used on interface org.superbiz.Overworked method comeIn WARN ... OverworkedBean: Ignoring @PreDestroy used on interface org.superbiz.Overworked method stayLater WARN ... OverworkedBean: Ignoring @RolesAllowed used on interface org.superbiz.Overworked method doThisR WARN ... OverworkedBean: Ignoring @TransactionAttribute used on interface org.superbiz.Overworked method WARN ... OverworkedBean: Ignoring @TransactionAttribute used on interface org.superbiz.Overworked method WARN ... OverworkedBean: @Remove is ignored for beans of type Stateless. Method: stayLater WARN ... OverworkedBean: @Init is ignored for beans of type Stateless. Method: comeInEarly WARN ... OverworkedBean: Corrected invalid injection-target-name: setMyNumber Tuesday, June 4, 13
  • 41.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Configuration Tuesday, June 4, 13
  • 42.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Tomcat Options •No rip and replace • System Level - conf/server.xml • App Level - META-INF/context.xml • Standard configuration options still work - Resources available too all components: EJBs, CDI, JSF • Connection pooling still not JTA aware! • All Security done with Tomcat Realms - EJB security - WebService Security - Use your custom Realm implementation Tuesday, June 4, 13
  • 43.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Additional Options • System Level - conf/tomee.xml - conf/system.properties • Process Level - plain -D properties • App Level - META-INF/context.xml - META-INF/resources.xml - META-INF/application.properties Tuesday, June 4, 13
  • 44.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins conf/tomee.xml Tuesday, June 4, 13
  • 45.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Not Case-Sensitive Tuesday, June 4, 13
  • 46.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Be as Brief as you Want Tuesday, June 4, 13
  • 47.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins ...really Tuesday, June 4, 13
  • 48.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins ...really brief Tuesday, June 4, 13
  • 49.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Human Readable Durations Tuesday, June 4, 13
  • 50.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Comments Welcome Tuesday, June 4, 13
  • 51.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Do it in the App • META-INF/resources.xml Tuesday, June 4, 13
  • 52.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Hate XML? Tuesday, June 4, 13
  • 53.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins conf/system.properties Tuesday, June 4, 13
  • 54.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Plain Java Properties • JAVA_OPTS in a script Tuesday, June 4, 13
  • 55.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Mixed • conf/tomee.xml • META-INF/resources.xml • JAVA_OPTS in a script Tuesday, June 4, 13
  • 56.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Extending Tuesday, June 4, 13
  • 57.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Extending (configuration) • META-INF/resources.xml • Injectable via @Resource Tuesday, June 4, 13
  • 58.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Extending (runtime events) • CDI-style @Observes • Registered via <Service> in META-INF/resources.xml • Not quite CDI (yet) • 27 client-side events • 12 server-side events • more events coming... Tuesday, June 4, 13
  • 59.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Tuesday, June 4, 13
  • 60.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Failover Client-Side Events Tuesday, June 4, 13
  • 61.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Management and Monitoring Tuesday, June 4, 13
  • 62.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Management and Monitoring • JMX - Webapp JMX deployment / apps (Tomcat) - EJB Servers / Containers / Invocation stats (OpenEJB) - JMS Topic / Queue / Subscriber / Broker (ActiveMQ) - PersistenceUnit redeploy - Database Pools - Discovered servers / peers - more coming... • REST (soon) - Just idea at this point - Tiny bit available via ‘tomee’ console - Would be great to have REST equivalents of all JMX beans Tuesday, June 4, 13
  • 63.
  • 64.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Tuning Tuesday, June 4, 13
  • 65.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Scanning • META-INF/scan.xml • Usable in any jar • Speeds loading of large jars • Match packages • Match classes Tuesday, June 4, 13
  • 66.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Clust...^H... Cloud Features Tuesday, June 4, 13
  • 67.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Cloud • Existing - Super tiny size - Certified on EC2 t1.micro, m1.small, c1.medium - TCP and UDP server discovery - Standard Tomcat clustering... er... cloudstering - EJB client load-balancing and failover (stateless) - Maven based provisioning • Desired - Multi-server console w/ monitoring and deployment - Queue based auto-scaling (add/remove nodes) - Cloud scoped @Singletons - Cloud-wide @Observers and Events - Cloud-wide Timers and @Schedule methods - Amazon BeanStalk w/ TomEE Tuesday, June 4, 13
  • 68.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins Cloud Feature Requests? Tuesday, June 4, 13
  • 69.
    Apache #TomEE -#JavaEE on #Tomcat / @dblevins thank you! tomee.apache.org @dblevins dblevins@apache.org Tuesday, June 4, 13