Hi,
I'm trying to access EJBs in isolated EARs in JBoss 4.2.2.GA in the same server
instance. Is it possible to only enable Call by Value semantics for 1 EJB and not for all
EJBs deployed in an EAR?
I tried countless combinations and the only one that seemed to work is the below:
I have EJBA in ear1 access EJBB in ear2 both are isolated using loader-repository in their
jboss-app.xml:
| <jboss-app>
| <loader-repository>loader=ear1</loader-repository>
| </jboss-app>
|
| <jboss-app>
| <loader-repository>loader=ear2</loader-repository>
| </jboss-app>
|
enable call by value in the ear-deployer.xml:
| <attribute name="CallByValue">true</attribute>
|
EJBA code to access EJBB:
| Context testcontext = new InitialContext();
| EJBBHome objref =
(EJBBHome)testcontext.lookup("jnp://localhost:1299/ejb/EJBB");
| log.info("Looked up ejbb:" + objref);
| objref.create().doSomething();
|
The call succeeds but as soon as I set CallByValue=false, I get:
| 2009-08-27 15:25:00,401 ERROR [org.jboss.ejb.plugins.LogInterceptor]
TransactionRolledbackException in method: public abstract testearisolation.ear2.EJBB
testearisolation.ear2.EJBBHome.create() throws
javax.ejb.CreateException,java.rmi.RemoteException, causedBy:
| javax.ejb.EJBException: Invalid invocation, check your deployment packaging,
method=public abstract testearisolation.ear2.EJBB testearisolation.ear2.EJBBHome.create()
throws javax.ejb.CreateException,java.rmi.RemoteException
|
I could use my working solution but then if I understand correctly it means all EJBs for
all EARs under this server instance will use Call By Value semantics regardless if its 2
EJBs talking to each other in the same EAR...
Please correct me if im wrong.
Thanks
-Guillaume
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4252132#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...