2 Replies Latest reply on Sep 26, 2006 3:11 AM by marvin655321

    IIOP-implementation for EJB 3.0 not standard-compliant?

    marvin655321

      Hello,

      at
      http://fisheye.jboss.org/browse/JBoss/jboss-ejb3/src/test/org/jboss/ejb3/test/iiop
      I found tests for making EJB 3.0-compliant session beans accessible via IIOP. Within these tests there are two session beans - one stateless and one stateful. Within the code of both of them there are remote business interfaces declared via the javax.ejb.Remote-Annotation. Both of the business interfaces extend javax.ejb.EJBObject. Within the EJB 3.0-standard (EJB Core Contracts and Requirements) on page 94 - regarding Session Bean's Business Interfaces - there is stated that business interfaces must not extend javax.ejb.EJBObject.

      Within a similar example of mine, I left out the extension of javax.ejb.EJBObject of the remote business interface. As a consequence I got a java.lang.ClassCastException on deploying the beans into a Jboss 4.0.4GA-container with jboss-EJB-3.0 RC9-FD installed, which states that no javax.ejb.EJBObject was found.

      Am I fatally wrong or is the implementation of IIOP for session beans for EJB 3.0 based on the extension of javax.ejb.EJBObject for remote business interfaces? If this is not standard-compliant, are there plans under way to make the implementation standard-compliant?

      Best regards,

      Jens

        • 1. Re: IIOP-implementation for EJB 3.0 not standard-compliant?
          wolfc

          Within the EJB3 specs there is a distinction between a business interface and a remote interface (for session beans chapter 4.6.6 vs 4.6.7).
          A business interface must not extend EJBObject, a remote interface must extend EJBObject.
          IIOP interoperability only works on remote interfaces (chapter 15), thus they must extend EJBObject.
          Note: the specs only allow for EJB 2.1 remote client view beans, but with the current implementation no EJBHome is required for stateless and service beans.

          • 2. Remote business interface which extends EJBObject within imp
            marvin655321

            Hello,

            The difference between remote interfaces and remote business interfaces is absolutely clear to me. I also understood that a remote interface must extend EJBObject while this is permitted for remote business interfaces (must not extend). The point was that with the annotation javax.ejb.Remote remote business interfaces are declared and not remote interfaces. I came to this conclusion by reading the chapter of the standard mentioned by you (4.6.6 and 4.6.7) as well as the API-specification regarding the annotation at http://java.sun.com/products/ejb/docs.html which is referenced from your site and belongs to the standard AFAIK. Therefore the implementation mentioned in my first posting would be not standard-compliant because it declares a remote business interface which implements EJBObject. Will this be changed in the near future?

            Best regards,

            Jens