Your SlideShare is downloading. ×
0
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Apache TomEE, Java EE 6 Web Profile on Tomcat - David Blevins
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

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

266

Published on

Apache TomEE is the Java EE 6 Web Profile certified version of Apache Tomcat and combines the simplicity of Tomcat with the power of Java EE. The first half of this session introduces TomEE and shows …

Apache TomEE is the Java EE 6 Web Profile certified version of Apache Tomcat and combines the simplicity of Tomcat with the power of Java EE. The first half of this session introduces TomEE and shows how Tomcat applications leveraging Java EE technologies can become simpler and lighter with a Java EE 6 certified solution built right on Tomcat. The second half focuses on those already familiar with TomEE and goes into detail on latest advancements, testing techniques including Arquillian, clustering features and production considerations.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
266
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
0
Comments
0
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. David BlevinsApache TomEE:JavaEE 6 Web Profile on Tomcat@dblevins#TomEETuesday, June 4, 13
  • 2. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsWhat is Apache TomEE?Tuesday, June 4, 13
  • 3. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsTomcat + 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 TomcatTuesday, June 4, 13
  • 4. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsWhat is a“Web Profile”?Tuesday, June 4, 13
  • 5. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsThe 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 / @dblevinsFlavors 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- JMSTuesday, June 4, 13
  • 7. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsDemoTuesday, June 4, 13
  • 8. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsThe Birth of TomEETuesday, June 4, 13
  • 9. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsMilestones• 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 / @dblevinsWebsite TrafficTuesday, June 4, 13
  • 11. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsUser List TrafficTuesday, June 4, 13
  • 12. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsJelasticTuesday, June 4, 13
  • 13. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsJelasticTuesday, June 4, 13
  • 14. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsTuesday, June 4, 13
  • 15. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsUser FeedbackTuesday, 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 tellyou 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 canaccept that youll have to solve problems yourself, go TomEE.(TomEE seems to be _much_ faster than <XXX>)”-- Jonathan Fisher, User ListTuesday, 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 deptand have no regrets.”-- Miles Poindexter, Condé Nast“Its an amazingly pure, stable and simple to manage JEE6 webprofile container.”-- Pete Keys, StarbucksTuesday, June 4, 13
  • 18. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsMaking TomEETuesday, June 4, 13
  • 19. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsFiles AddedTuesday, June 4, 13
  • 20. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsFiles ModifiedTuesday, June 4, 13
  • 21. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsTesting• Our own tests (hour+)- Arquillian based- Each test run 4 to 5 times• Certification Tests on Amazon EC2 (hundred+ machinehours)- 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.mediumTuesday, June 4, 13
  • 22. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsResults• 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 portabilityTuesday, June 4, 13
  • 23. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsDoing itYourselfTuesday, June 4, 13
  • 24. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsPerils 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, andmoreTuesday, June 4, 13
  • 25. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsPerils 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 serversTuesday, June 4, 13
  • 26. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsArquillianTuesday, June 4, 13
  • 27. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsAll your bugsare belong to usTuesday, June 4, 13
  • 28. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsTomEE + 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 FasterTuesday, June 4, 13
  • 29. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsMavenTuesday, June 4, 13
  • 30. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsAll programs evolve untilthey can send email-- Letts’ LawTuesday, June 4, 13
  • 31. Apache #TomEE - #JavaEE on #Tomcat / @dblevinstomee-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, undeployTuesday, June 4, 13
  • 32. Apache #TomEE - #JavaEE on #Tomcat / @dblevinstomee-maven-pluginTuesday, June 4, 13
  • 33. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsTools and PlatformsTuesday, June 4, 13
  • 34. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsTuesday, June 4, 13
  • 35. #TomEE @dblevinsJelastic35Tuesday, June 4, 13
  • 36. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsValidationTuesday, June 4, 13
  • 37. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsValidation• Compiler style handing of issues• All issues reported in one deploy• Avoid “inching along” cycles• Save the user time• Teach the userTuesday, June 4, 13
  • 38. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsOverworkedBeanTuesday, June 4, 13
  • 39. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsBusiness InterfaceTuesday, June 4, 13
  • 40. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsValidation ResultsFAIL ... OverworkedBean: Missing required "name" attribute on class-level @EJB usageFAIL ... OverworkedBean: Missing required "beanInterface" attribute on class-level @EJB usageFAIL ... OverworkedBean: Missing required "type" attribute on class-level @Resource usageFAIL ... OverworkedBean: Mistaken use of @Resource on an EntityManager reference. Use @PersistenceConteFAIL ... OverworkedBean: Mistaken use of @Resource on an EntityManagerFactory reference. Use @PersistenWARN ... OverworkedBean: Ignoring @PostConstruct used on interface org.superbiz.Overworked method comeInWARN ... OverworkedBean: Ignoring @PreDestroy used on interface org.superbiz.Overworked method stayLaterWARN ... OverworkedBean: Ignoring @RolesAllowed used on interface org.superbiz.Overworked method doThisRWARN ... OverworkedBean: Ignoring @TransactionAttribute used on interface org.superbiz.Overworked methodWARN ... OverworkedBean: Ignoring @TransactionAttribute used on interface org.superbiz.Overworked methodWARN ... OverworkedBean: @Remove is ignored for beans of type Stateless. Method: stayLaterWARN ... OverworkedBean: @Init is ignored for beans of type Stateless. Method: comeInEarlyWARN ... OverworkedBean: Corrected invalid injection-target-name: setMyNumberTuesday, June 4, 13
  • 41. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsConfigurationTuesday, June 4, 13
  • 42. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsTomcat 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 implementationTuesday, June 4, 13
  • 43. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsAdditional 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.propertiesTuesday, June 4, 13
  • 44. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsconf/tomee.xmlTuesday, June 4, 13
  • 45. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsNot Case-SensitiveTuesday, June 4, 13
  • 46. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsBe as Brief as you WantTuesday, June 4, 13
  • 47. Apache #TomEE - #JavaEE on #Tomcat / @dblevins...reallyTuesday, June 4, 13
  • 48. Apache #TomEE - #JavaEE on #Tomcat / @dblevins...really briefTuesday, June 4, 13
  • 49. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsHuman Readable DurationsTuesday, June 4, 13
  • 50. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsComments WelcomeTuesday, June 4, 13
  • 51. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsDo it in the App• META-INF/resources.xmlTuesday, June 4, 13
  • 52. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsHate XML?Tuesday, June 4, 13
  • 53. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsconf/system.propertiesTuesday, June 4, 13
  • 54. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsPlain Java Properties• JAVA_OPTS in a scriptTuesday, June 4, 13
  • 55. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsMixed• conf/tomee.xml• META-INF/resources.xml• JAVA_OPTS in a scriptTuesday, June 4, 13
  • 56. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsExtendingTuesday, June 4, 13
  • 57. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsExtending (configuration)• META-INF/resources.xml• Injectable via @ResourceTuesday, June 4, 13
  • 58. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsExtending (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 / @dblevinsTuesday, June 4, 13
  • 60. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsFailover Client-Side EventsTuesday, June 4, 13
  • 61. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsManagement andMonitoringTuesday, June 4, 13
  • 62. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsManagement 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 beansTuesday, June 4, 13
  • 63. #TomEE @dblevins63Tuesday, June 4, 13
  • 64. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsTuningTuesday, June 4, 13
  • 65. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsScanning• META-INF/scan.xml• Usable in any jar• Speeds loading of large jars• Match packages• Match classesTuesday, June 4, 13
  • 66. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsClust...^H...Cloud FeaturesTuesday, June 4, 13
  • 67. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsCloud• 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/ TomEETuesday, June 4, 13
  • 68. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsCloud Feature Requests?Tuesday, June 4, 13
  • 69. Apache #TomEE - #JavaEE on #Tomcat / @dblevinsthank you!tomee.apache.org@dblevinsdblevins@apache.orgTuesday, June 4, 13

×