Share on Google+Share on Google+

EJB 3.1 - EJB Interfaces are Optional

Advertisement
In EJB 3.1, now you do not need to define any interfaces for Session Beans, just like JPA Entities and Message Driven Beans.

In EJB 3.1, now you do not need to define any interfaces for Session Beans, just like JPA Entities and Message Driven Beans. All you have to do is annotate a POJO with the @Stateless or @Stateful to get a fully functional EJB.

  1. The Singleton Beans A new feature of Singleton Beans is added in EJB 3.1 that is used to store application-wide shared data. The JEE container maintains a single shared instance of an EJB 3.1 Singleton that can cache state across the application tier. Like all other EJBs, Singletons are simply annotated POJOs.
  2. Support for direct use of EJBs in the servlet container, including simplified packaging options. Like the web.xml file that resides in the WEB-INF directory, you would be able to place an EJB jar into the WEB-INF/lib directory.
  3. Support for stateful web services via Stateful Session Bean web service endpoints.

EJB Tutorial

Advertisements

Posted on: April 3, 2006 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.