Your SlideShare is downloading. ×
0
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
Fun with EJB 3.1 and Open EJB
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

Fun with EJB 3.1 and Open EJB

4,375

Published on

Fun with EJB 3.1 and Open EJB @ JAX London

Fun with EJB 3.1 and Open EJB @ JAX London

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

No Downloads
Views
Total Views
4,375
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
130
Comments
0
Likes
5
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
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. David Blevins / Apache Software FoundationFun with EJB 3.1 //And OpenEJB
    • 2. OpenEJB historyTimeline • 1999 - Founded in Exoffice - EJB 1.1 level • 2001 - Integrated in Apple’s WebObjects • 2002 - Moved to SourceForge • 2003 - Integrated in Apache Geronimo • 2004 - Moved to Codehaus • 2006 - Moved to Apache Incubator • 2007 - Graduated Apache OpenEJB • 2011 - Integrated in Apache TomEE 2
    • 3. Specification InvolvementVersions • EJB 2.1 (Monson-Haefel) • EJB 3.0 (Blevins) • EJB 3.1 (Blevins) • EJB 3.2* (Blevins) 3
    • 4. OpenEJB historyAlways an Embedded EJB Container • Our downfall in early 2000 -- people weren’t ready • Our success after EJB 3.0Always doing the Opposite • EJB always had Inversion of Control • Instead of Remote/Local beans, why not Remote/Local containers? • Instead of putting the App in the Container, put the Container in the App. • WARs the bottom of the food chain? Forget that, put everything in the WAR. EARs are WARs anyway. • Don’t blame EJB because your *server* isn’t testable 4
    • 5. Primer
    • 6. Generic view of ContainersComponents • What “classes” of objects are there?Lifecycle • What “events” do objects want to know about?Views • How are they accessed internally or externally?Services • What “actions” will the container manage for you?Environment • What “resources” will be exposed to you?Packaging • How do you build & run this crazy thing? 6
    • 7. EJB through 3.0
    • 8. EJB through 3.0Components • @Stateless (1.0, 3.0) • @Stateful (1.0, 3.0) • @MessageDriven (2.0, 3.0)Views • @Local (3.0) • @Remote (3.0) • @WebService (2.1, 3.0) 8
    • 9. EJB through 3.0Lifecycle • Dependency Injection (3.0) • @PostConstruct (1.1, 3.0) • @PreDestroy (1.1, 3.0) • Stateful specific • @PrePassivate (1.1, 3.0) • @PostActivate (1.1, 3.0) • SessionSynchronization (1.1) 9
    • 10. EJB through 3.0Services • @TransactionManagement (1.1, 3.0) • @TransactionAttribute (1.1, 3.0) • Security (1.1, 3.0) • @PermitAll (1.1, 3.0) • @DenyAll (1.1, 3.0) • @RolesAllowed (1.1, 3.0) • @Interceptors (3.0) • TimerService (2.0) 10
    • 11. EJB through 3.0Environment • @Resource (1.1, 2.0, 2.1, 3.0) • UserTransaction • DataSource • JMS ConnectionFactory/Topic/Queue • Much more.. • @EJB (1.1, 2.0, 3.0) • @PersistenceContext (3.0) • @PersistenceUnit (3.0) • @WebServiceRef (2.1, 3.0) 11
    • 12. EJB through 3.0Packaging • Java EE Server • Standalone EJB jar file • No standard mechanism for 3rd party libs • Combined in an EAR file 12
    • 13. EJB 3.1
    • 14. EJB 3.1Components • @SingletonViews • @LocalBean • @AsynchronousEnvironment • Global JNDI Names 14
    • 15. EJB 3.1Lifecycle • Singletons • @Startup • @DependsOn • Stateful • @StatefulTimeout • @AfterBegin • @BeforeCompletion • @AfterCompletion 15
    • 16. EJB 3.1Services • @ConcurrencyManagement • @Lock • @AccessTimeout • @Interceptors • @AroundTimeout • @Schedule 16
    • 17. EJB 3.1Packaging • Java EE • EJB jars in WAR files • Java SE VM • Embedded EJBContainer API • Jar scanning a plain classpath • Modules: File/File[]/String/String[] 17
    • 18. Next Gen EJB
    • 19. Next Gen EJBComponents • @ManagedBean (plain cheese pizza, no toppings)Services • Split them out individually (the toppings)Meta Annotations • Rename the annotations to your liking • Summarize complex config easily • Reduce impact of change 19
    • 20. Next Gen EJBInterceptors • Multiple, qualified, @AroundInvoke methods • Middle ground between Loose & Strong typing • aka between Interceptor and Decorator • Fix Invoke signature mismatchApplicationException • Needs finer-grained control 20
    • 21. Next Gen EJBMessage Driven 2.0 • Allow Connector annotations to be used • Eliminate loosely typed activation-config • Allow No-Interface MDBs • Connector Annotations are all that is needed • Psst, MDBs are really just Session beans • Why not allow @Singleton message consumers?Non-AppClient injection • Non-AppClient lookup, check. Where’s injection? • @LocalClient and @RemoteClient 21
    • 22. Apache TomEE: Tomcat with a Kick 2:25 - 3:15 | Beatrice Suite 1 WednesdayDavid Blevins & Jonathan Gallimore
    • 23. Thank You!openejb.apache.org David Blevinsdblevins@apache.org twitter.com/dblevins

    ×