-
1. Re: How to prevent RMI calls inside same VM with EJB Session
starksm64 Aug 4, 2004 9:31 AM (in response to tbo)The only rmi call this could be is the JNDI naming service. This would indicate that you are not using the no arg ctor of the InitialContext and are supplying a provider url which triggers the rmi call. If its not the naming service, show the trace for the call.
-
2. Re: How to prevent RMI calls inside same VM with EJB Session
tbo Aug 4, 2004 10:07 AM (in response to tbo)Thank you M.Stark for your support,
We thought about this idea and in that case we had removed the line "java.naming.provider.url=jnp://<@IP>:1101" from the jndi.properties file.
It seems in reading your post that it could be a bad factory used in the jndi.properties file. It contains now only 2 lines :
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
I do not understand your expression :"no arg ctor", is there a mistake character ?
In docs, it seems that this factory is default factory, so it does not seems to be the default... Any idea to help us ?
We go on investiguate in that way...
Thank you. -
3. Re: How to prevent RMI calls inside same VM with EJB Session
tbo Aug 4, 2004 11:46 AM (in response to tbo)To complete our recent answer, first, we do not specify any url provider in the jndi.properties (as explained upper) so it may be auto-generated by the container.
Then, in our source code, we call the constructor InitalContext with no arguments :
initialContext = new InitialContext();
Then for remote object (all EJB sessions objects) :
Object obj = initialContext.lookup(ejbReferenceComponent);
Object home = PortableRemoteObject.narrow(obj, homeClass);
<String ejbReferenceComponent> is a parameter to identify EJBs.
<Class homeClass> is a parameter to identify waiting class.
Is it possible that the JBOSS implementation (transparent for them) can make a lookup using RMI access instead of local stub access ?
Thank you for your support. -
4. Re: How to prevent RMI calls inside same VM with EJB Session
darranl Aug 4, 2004 11:56 AM (in response to tbo)'no arg ctor' = No argument constructor
-
5. Re: How to prevent RMI calls inside same VM with EJB Session
starksm64 Aug 4, 2004 11:59 AM (in response to tbo)The show a stack trace for one of the rmi calls in the optimize it output. You have to explicitly enable call by value semantics through a jboss.xml configuration (or standardjboss.xml) setting.
-
6. Re: How to prevent RMI calls inside same VM with EJB Session
tbo Aug 4, 2004 12:00 PM (in response to tbo)Thank you darranl, we supposed indeed that this was the translation, as indiquated in our third post...
-
7. Re: How to prevent RMI calls inside same VM with EJB Session
tbo Aug 4, 2004 1:17 PM (in response to tbo)Thank you M. Stark for your support.
I haven't found any tags in jboss.xml or standardjboss.xml to force jboss to do a call by reference or by value. How can I achieve that ? -
8. Re: How to prevent RMI calls inside same VM with EJB Session
istij Aug 23, 2004 12:25 PM (in response to tbo)By using local interfaces instead of remote interfaces you can prevent RMI calls (with local interfaces you will have direct method invocation -- using pass by reference), but you can use both (local and remote) interfaces also. For further inf. please check:
http://www.onjava.com/pub/a/onjava/2001/05/10/ejb.html
http://www.ftponline.com/javapro/2002_08/online/j2ee_rdahbura_08_14_02/
http://www.devx.com/getHelpOn/10MinuteSolution/16677/1954?pf=true