JBoss Community

EJB3 support in JBoss AS 7.0.0.Beta2

modified by Scott Marlow in JBoss AS7 Development - View the full document

This document outlines the EJB 3.x support that's currently available in JBoss AS 7.0.0.Beta2

 

Support for EJB 3.x session beans

 

Annotation based support

 

@Stateless, @Stateful, @Singleton :

 

JBoss AS 7.0.0.Beta2 has support for annotation based session beans (i.e. @Stateless, @Stateful and @Singleton). A bean annotated with any of these session bean annotation will be picked up and processed appropriately.

 

Local annotated views:

    

  • @Local and @LocalBean : JBoss AS 7.0.0.Beta2 supports local business interface view and the no-interface view of session beans.

    

  • @Remote view: Currently, there is no support for remote views (for example, exposed via @Remote).

    

  • @RemoteHome and @LocalHome view: Furthermore, there is no support yet for EJB2.x views (via @LocalHome and @RemoteHome)

    

Tansaction management annotations:

    

  • @TransactionManagement : JBoss AS 7.0.0.Beta2 supports both container managed transactions and bean managed transactions, configured through annotations.

    

  • @TransactionAttribute : Various different transaction attributes (configured via @TransactionAttribute annotation) are also supported. Note that JBoss specific way of setting a transaction timeout through an annotation is not yet supported in this version.

    

Concurrency management annotations:

    

  • @ConcurrencnyManagement : Both bean and container managed concurrency support for @Singleton beans is available in JBoss AS 7.0.0.Beta2.

    

  • @Lock : Both READ and WRITE lock support is also available in JBoss AS 7.0.0.Beta2

    

  • @AccessTimeout : Support for configuring an access timeout through the @AccessTimeout annotation is also available in JBoss AS 7.0.0.Beta2.

    

Init on Startup for singleton beans:

    

  • @Startup : Init-on-startup support for singleton beans, through the use of @Startup is available in JBoss AS 7.0.0.Beta2

    

Dependencies configuration for singleton beans:

    

  • @DependsOn : Only a partial support is available for this annotation in JBoss AS 7.0.0.Beta2. The annotation is processed and appropriate dependencies are added between the singleton beans. This works fine against @Startup @Singleton beans. But for normal (lazy) @Singleton beans, the @DependsOn may not work as mandated by the spec. This will be fixed in later versions of JBoss AS 7.0.0.Beta2

    

Resource injection and EJB injection:

    

  • @Resource and @EJB : These annotations are supported in JBoss AS 7.0.0.Beta2. These can be used in container managed components to inject the resources and EJBs respectively.

 

ejb-jar.xml deployment descriptor based support

 

  • Support for session beans: JBoss AS 7.0.0.Beta2 allows you to configure your session beans through the use of ejb-jar.xml. All types of session beans (Stateless, Stateful and Singleton) are supported.

 

  • Transaction Management support: You can configure transaction management semantic through the use of ejb-jar.xml for your session beans. Both bean managed transactions and container managed transactions are supported.

 

  • Support for business views: Currently only business-local and local-bean views are supported through ejb-jar.xml for session beans.

     

  • Support for interceptors: JBoss AS 7.0.0.Beta2 has support for interceptors of EJBs configured via ejb-jar.xml. However, explicit interceptor-ordering isn't yet supported.

 

Merged view of annotations and ejb-jar.xml for EJBs

 

Although there is an initial implementation available in JBoss AS 7.0.0.Beta2 for supporting partial deployment descriptor + partial annotation based EJBs, it's still in its early stages and isn't stable. Upcoming releases will have better support for a merged view of EJBs.

 

 

Where to ask questions or report issues:

 

If you run into any issue while trying out any EJB3 application against JBoss AS 7, then please either report it in the user forums http://community.jboss.org/en/jbossas?view=discussions or subscribe to the AS7 mailing list https://lists.jboss.org/mailman/listinfo/jboss-as7-dev and mail your question there. 

         

    

         

 

Comment by going to Community

Create a new document in JBoss AS7 Development at Community