-
Bug
-
Resolution: Done
-
Major
-
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 jndiProps.put("org.jboss.ejb.client.scoped.context",true); // 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 remoteBean.doSomething();
See the referenced forum thread for details