EJB.1.3 Application Compatibility and Interoperability


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 identity) methods of the javax.ejb.EJBContext interface. These methods were deprecated 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 implementation 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 container-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 methods' 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 SessionSynchronization 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.

The client view of an enterprise bean is the same in EJB 1.0 and EJB 1.1. This means that enterprise beans written to EJB 1.1 can seamlessly interoperate with those written to EJB 1.0, and vice versa.



Java 2 Platform, Enterprise Edition. Platform and Component Specifications
Java 2 Platform, Enterprise Edition: Platform and Component Specifications
ISBN: 0201704560
EAN: 2147483647
Year: 2000
Pages: 399

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net