Uploaded image for project: 'EJB Client Library (AS7+)'
  1. EJB Client Library (AS7+)

EJB client context identifier not attached to proxies created via calls to "create..." methods on EJB home views


    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.0.0.Beta1, 1.0.14.Final
    • 1.0.13.Final, 1.1.0.Alpha1
    • None

      EJBCLIENT-34 introduced the feature where the EJB proxy gets associated with a EJB client context identifier if the proxy was scoped to a EJB client context, typically during a JNDI context creation. However, the implementation doesn't take into account the remote views/proxies returned by a call to "create..." methods of EJB home views, resulting in the remote views using an incorrect EJB client context. Typical code where this will fail is:

             final Properties jndiProps = new Properties();
             // create a scoped EJB client context
             // other jndi props
             final Context ctx = new InitialContext(jndiProps);
             final SomeEJBRemoteHome remoteHome = (SomeEJBRemoteHome) ctx.lookup("ejb:/foo/bar/dist/bean!remotehomeinterface");
             // now create the EJB remote object.
             // this returned "SomeEJBRemote" proxy MUST have the same EJB client context identifier that was
             // applicable for the "remoteHome" proxy that we created a few lines above. That way any subsequent
             // invocation on this "remoteBean" will always use the correct EJB client context. However, currently the EJB client context identifier isn't applied to the "remoteBean" because of which the subsequent calls on it fail
             final SomeEJBRemote remoteBean = remoteHome.create();
             // now invoke on the bean. This fails due to the absence of the EJB client context identifier on the proxy

      See the referenced forum thread for details

            jaikiran Jaikiran Pai (Inactive)
            jaikiran Jaikiran Pai (Inactive)
            1 Vote for this issue
            1 Start watching this issue