What are the deprecated EJB 1.0 conventions with respect to EJB 1.1?

sachin mahishi

This are the list of changes which can be found in Chapter 1 of EJB 1.1 specification It is as follows:-

EJB 1.1 attempts to provide a high degree of application compatibility for enterprise beans that were written for the EJB 1.0 specification. Principally, the deployment descriptor of EJB 1.0 based enterprise beans must be converted to the EJB 1.1 XML format. However, the EJB 1.0 enterprise bean code does not have to be changed or re-compiled to run in an EJB 1.1 Container, except in the following situations:

  • The bean uses the javax.jts.UserTransaction interface. The package name of the javax.jts interface has changed to javax.transaction, and there have been minor changes to the exceptions thrown by the methods of this interface. An enterprise bean that uses the javax.jts.UserTransaction interface needs to be modified to use the new name javax.transaction.UserTransaction.
  • The bean uses the getCallerIdentity() or isCallerInRole(Identity iden-tity) methods of the javax.ejb.EJBContext interface. These method were depre-cated in EJB 1.1 because the class java.security.Identity is deprecated in Java 2 platform. While a Container Provider may choose to provide a backward compatible imple-mentation of these two methods, the Container Provider is not required to do so. An enterprise bean written to the EJB 1.0 specification needs to be modified to use the new methods to work in all EJB 1.1. Containers.
  • The bean is an entity bean with container-managed persistence. The required return value of ejbCreate(...) is different in EJB 1.1 than in EJB 1.0. An enterprise bean with con-tainer- managed persistence written to the EJB 1.0 specification needs to be recompiled to work with all EJB 1.1 compliant Containers.
  • The bean is an entity bean whose finders do not define the FinderException in the meth-ods’ throws clauses. EJB 1.1 requires that all finders define the FinderException.
  • The bean is an entity bean that uses the UserTransaction interface. In EJB 1.1, an entity bean must not use the UserTransaction interface.
  • The bean uses the UserTransaction interface and implements the SessionSynchro-nization interface at the same time. This is disallowed in EJB 1.1.
  • The bean violates any of the additional semantic restrictions defined in EJB 1.1 but which were not defined in EJB 1.0.
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact