Guide to the EJB 3.1 Public Draft

Now that the EJB 3.1 Public Draft is available, here's a list of its main ease-of-use improvements and features, along with their corresponding sections in the spec. This should make it easier to quickly find some of the most relevant material. While it's true that the spec is a bit, shall we say, on the "large" side, I think you'll find that most of the new content is concentrated in a relatively small number of pages. Happy reviewing :-)

  • The "no interface" Local view (3.4.4 , 4.9.8)
  • Portable global JNDI names (4.4)
  • Asynchronous session bean invocations (4.5)
  • Singleton session beans (4.8)
  • Startup / Shutdown callbacks (4.8.1, 4.8.2)
  • Calendar-based timer expressions (18.2.1)
  • Automatic timer creation (18.2.2)
  • Non-persistent Timers (18.2.3)
  • Deployment of EJB components directly in a .war without an ejb-jar (20.4)
  • EJB "Lite" -- a standard lightweight subset of the EJB API (21.1)
  • Embeddable EJB -- an API for executing EJB components within Java SE (Ch. 22)
Comments:

Great stuff. although I still miss the ability to use timers in stateful session beans (to fire of a event for this particular instance some time in the future).

Hopefully the "asynchronous session bean invocation" can be used to safely execute system commands (yes I know that you are not supposed to do that but most of us do it anyway - I mean how many people actually put up a JMS queue to poll a folder for a particular file and such).

Out of curiosity, currently one seam's not to be guarantied the availability of the caller principal object unless you explicitly use security annotations (or their deployment descriptor cousins). This is unfortunate since often you need security more advanced than simple role based one. In Spring, it is trivial to create a a custom security interceptor, with the caller principal injected and use this to enforce specialized security business rules.

Also it would be great if the security module setup was bundled with the application instead of being configured in the container (similar style as in Spring security). I always get a terrible headache whenever I have to register my own JAAS module or configure JDBC realm inside GlassFish. This should go in a config file with the application.

Lastly I note the absence of proxied beans. Currently you can get into a lot of trouble with beans not having their interceptors invoked under all circumstances. Sure you can use CGLIB to accomplish this but it would be nice if the standard EJB interceptors was always invoked.

Anyway, JEE6 is sure looking good with JSF 2, JAX-RS, EJB 3.1, JPA 2.0. So keep up the good work.

Posted by Lars Tackmann on October 01, 2008 at 11:12 PM EDT #

Still some features missing that I prefer:
\* query objects (see my blog)
\* configuration annotations (see my blog)

Posted by Frank Cornelis on October 02, 2008 at 12:15 AM EDT #

This is wonderful great job guys, I think JEE 6 will be in the right direction and it will Rock!!.

Posted by Chekke on October 02, 2008 at 06:36 AM EDT #

thanks for all.

Posted by zahijarir on October 09, 2008 at 07:31 AM EDT #

[Trackback] An overview of ease of development features in the Java EE 6 platform.

Posted by Roberto Chinnici's Blog on November 14, 2008 at 12:20 PM EST #

Great Post !

When are we supposed to have the full spec/implementation complete ?

Posted by David Hofmann on November 16, 2008 at 04:43 AM EST #

We're shooting for Q2 2009 for both. You can try out early versions of some of the new functionality using the latest GlassFish V3 Prelude (http://blogs.sun.com/kensaks/entry/ejb_3_1_in_glassfish) We'll continue to make other new features available for preview as they're being developed.

Posted by Ken Saks on November 17, 2008 at 04:10 AM EST #

this is really helpful article.

Posted by Gautam Roy on December 28, 2008 at 11:42 PM EST #

I am new to EJB. And i am using Eclipse HELIOS .i dont know what are the suitable plugins for eclipse ide. can u provide me some basic example on eclipse ide.

Thanks in Advance.

Posted by gopal on March 06, 2011 at 09:42 PM EST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

Ken Saks is the Spec Lead for Enterprise JavaBeans (EJB) 3.1 and a Senior Staff Engineer in the Java Platform, Enterprise Edition team at SUN.

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today