Fun with EJB 3.1 and Open EJB
Upcoming SlideShare
Loading in...5
×
 

Fun with EJB 3.1 and Open EJB

on

  • 4,617 views

Fun with EJB 3.1 and Open EJB @ JAX London

Fun with EJB 3.1 and Open EJB @ JAX London

Statistics

Views

Total Views
4,617
Views on SlideShare
4,223
Embed Views
394

Actions

Likes
3
Downloads
108
Comments
0

8 Embeds 394

http://blogs.oracle.com 227
http://blog.arungupta.me 101
http://blogs.sun.com 50
https://stbeehive.oracle.com 7
http://www.base10.net.br 5
url_unknown 2
http://www.slideshare.net 1
http://planets.sun.com 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Fun with EJB 3.1 and Open EJB Fun with EJB 3.1 and Open EJB Presentation Transcript

  • David Blevins / Apache Software FoundationFun with EJB 3.1 //And OpenEJB
  • 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
  • Specification InvolvementVersions • EJB 2.1 (Monson-Haefel) • EJB 3.0 (Blevins) • EJB 3.1 (Blevins) • EJB 3.2* (Blevins) 3
  • 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
  • Primer
  • 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
  • EJB through 3.0
  • 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
  • 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
  • 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
  • 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
  • EJB through 3.0Packaging • Java EE Server • Standalone EJB jar file • No standard mechanism for 3rd party libs • Combined in an EAR file 12
  • EJB 3.1
  • EJB 3.1Components • @SingletonViews • @LocalBean • @AsynchronousEnvironment • Global JNDI Names 14
  • EJB 3.1Lifecycle • Singletons • @Startup • @DependsOn • Stateful • @StatefulTimeout • @AfterBegin • @BeforeCompletion • @AfterCompletion 15
  • EJB 3.1Services • @ConcurrencyManagement • @Lock • @AccessTimeout • @Interceptors • @AroundTimeout • @Schedule 16
  • 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
  • Next Gen EJB
  • 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
  • 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
  • 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
  • Apache TomEE: Tomcat with a Kick 2:25 - 3:15 | Beatrice Suite 1 WednesdayDavid Blevins & Jonathan Gallimore
  • Thank You!openejb.apache.org David Blevinsdblevins@apache.org twitter.com/dblevins