-
1. Re: Does 3.0.6 support passing by Value?
leathurman Mar 7, 2004 2:37 PM (in response to leathurman)Well I thought I would post an update as I still cannot get this to work butI believe I have followed all other posts.
Essentially I have in my jboss.xml the following:
<?xml version="1.0" encoding="UTF-8"?>
<enterprise-beans>
<ejb-name>OrderService</ejb-name>
<jndi-name>cust/OrderService</jndi-name>
<configuration-name>By Value Standard Stateless SessionBean</configuration-name>
</enterprise-beans>
and I have added the following to standardjboss.xml in server.default/conf:
<container-configuration extends="Standard Stateless SessionBean">
<container-name>By Value Standard Stateless SessionBean</container-name>
<call-logging>true</call-logging>
<client-interceptors>
org.jboss.proxy.ejb.HomeInterceptor
org.jboss.proxy.SecurityInterceptor
org.jboss.proxy.TransactionInterceptor
org.jboss.invocation.ByValueInvokerInterceptor
org.jboss.proxy.ejb.StatelessSessionInterceptor
org.jboss.proxy.SecurityInterceptor
org.jboss.proxy.TransactionInterceptor
org.jboss.invocation.ByValueInvokerInterceptor
</client-interceptors>
</container-configuration>
However my calls still fail and looking at the error it appears that I am still using the org.jboss.invocation.InvokerInterceptor.
Is there a way to tell if I have configured the container-configuration correctly.
Regards
Lea. -
2. Re: Does 3.0.6 support passing by Value?
leathurman Mar 7, 2004 3:22 PM (in response to leathurman)Well in order to simplify things I put the container configuration into the jboss.xml.
<container-configurations>
<container-configuration extends="Standard Stateless SessionBean">
<container-name>By Value Standard Stateless SessionBean</container-name>
<client-interceptors>
org.jboss.proxy.ejb.HomeInterceptor
org.jboss.proxy.SecurityInterceptor
org.jboss.proxy.TransactionInterceptor
org.jboss.invocation.ByValueInvokerInterceptor
org.jboss.proxy.ejb.StatelessSessionInterceptor
org.jboss.proxy.SecurityInterceptor
org.jboss.proxy.TransactionInterceptor
org.jboss.invocation.ByValueInvokerInterceptor
</client-interceptors>
</container-configuration>
</container-configurations>
If I comment this out I get an error saying it cannot find the configuration name so I know the bean is configured with the correct name.
But when I put the container config back in JBoss startes but still i get the classcast exception when a make a call from one ear to another in a seperate classloader.
Any ideas. -
3. Re: Does 3.0.6 support passing by Value?
leathurman Mar 9, 2004 6:09 AM (in response to leathurman)Its working! I am not sure if this is of interest to anyone but I thought I would share this with you as I am not sure my solution is 100% correct.
I have app1.ear and app2.ear both of which have their own classloader repositories. An EJB in app1.ear makes a call on an EJB in app2.ear. Both apps run in the same JBoss JVM.
In order to get it to work I had amend the EJB in app1.ear so that instead of using an no argument InitialContext I supplied it with properties. I have also specified the EJB in app2.ear as using a pass by value container configuration.
Whilst this all works I am not sure if I strictly need to do both. Some other posts suggest that you do but in my mind why should I need to create an InitialContext with proprties since I am in the same JVM.