-
1. Re: Dynamic class loading of EJB3 entities
mikeboo Nov 23, 2005 11:10 AM (in response to mikeboo)... I'm using jboss-4.0.3SP1 and the client runs with following VM-arguments:
-Djava.security.manager=java.rmi.RMISecurityManager
-Djava.security.policy=client.policy
-Djava.rmi.server.codebase=http://localhost:8083/ -
2. Re: Dynamic class loading of EJB3 entities
starksm64 Nov 26, 2005 9:41 PM (in response to mikeboo)This is a remoting issue. The implementation used by the ejb3 layer does not use the legacy class download service. See, http://labs.jboss.com/portal/jbossremoting/docs/guide/ch04.html#d0e816
-
3. Re: Dynamic class loading of EJB3 entities
noclouds Dec 15, 2005 9:12 AM (in response to mikeboo)Hi,
I've exactly the same problem and I don't understand the explanations in the guide.
Could anyone explain it for a remoting newbie!?
Best Regards -
4. Re: Dynamic class loading of EJB3 entities
tom.elrod Jan 3, 2006 1:56 PM (in response to mikeboo)Sure. I'll also try to do a better job in the docs for the next release (as is only explained in the context of loading marshallers currently).
The remote classloading (which only works from the client loading classes from the server, btw), is done via a seperate service, which is called the loader. By default, the loader is not present on the server side. In order to enable the loader server to run, will need to add the following to the remoting connector configuration:<attribute name="loaderport" isParam="true">5401</attribute>
Note, this attribute must be set within the invoker element.
This tells the remoting server that it needs to start a loader running on the port specified. Then, on the client side, when it receives a response from the server and is unmarshalling the response, if it tries to load a class that is not present locally, it will look to see if a loader has been specified. If it has been, it will call to that loader server and load the class dynamically.
If getting the invoker locator url from the server, are good to go, as will already have the loaderport parameter set. Otherwise, if creating the locator url yourself on the client, then would need to make sure the loader parameter is specified. For example:socket://myhost:12345/?loaderport=5401
I am guessing you are using ejb3, which in the latest version it pulls the locator url from the server so you should be set (only need to make sure is there on the server side configuration).
Hope that helps.
-Tom