v a [
http://community.jboss.org/people/hipa] created the discussion
"Re: Dynamic classloading issue"
To view the discussion, visit:
http://community.jboss.org/message/560138#560138
--------------------------------------------------------------
Yes, I have read it. I have this line in jboss-app.xml:
<loader-repository>org.test:loader=jboss-test.ear</loader-repository>
When I added just this part from the documentation to my
deploy/ejb3-connectors-jboss-beans.xml:
<bean name="remoting:serverConfiguration"
class="org.jboss.remoting.ServerConfiguration">
<property name="invokerLocatorParameters">
<map keyClass="java.lang.String"
valueClass="java.lang.String">
<entry>
<key>loaderport</key>
<value>5544</value>
</entry>
</map>
</property>
<property name="serverParameters">
<map keyClass="java.lang.String"
valueClass="java.lang.Object">
<entry>
<key>remoteClassLoaders</key>
<value>
<list elementClass="java.lang.ClassLoader">
<value>jboss-test.ear:classloader</value>
</list>
</value>
</entry>
</map>
</property>
...
</bean>
nothing happened. The only lines in log were:
13:28:59,808 TRACE
[org.jboss.remoting.serialization.impl.java.JavaSerializationManager] Creating
ObjectOutputStream
13:28:59,809 TRACE [org.jboss.remoting.serialization.impl.java.JavaSerializationManager]
Creating ObjectInputStreamWithClassLoader
13:28:59,809 TRACE [org.jboss.remoting.transport.socket.SocketServerInvoker] passed
through ServerSocketRefresh.release()
13:28:59,825 TRACE [org.jboss.remoting.transport.socket.ClientSocketWrapper] reset
timeout: 60000
13:28:59,884 TRACE [org.jboss.remoting.transport.socket.ServerSocketWrapper]
ServerSocketWrapper[Socket[addr=/ip,port=40042,localport=3873].bc9678] wrote CLOSING
13:28:59,885 TRACE [org.jboss.remoting.transport.socket.SocketWrapper]
ServerSocketWrapper[Socket[addr=/ip,port=40042,localport=3873].bc9678] closing socket
13:28:59,885 TRACE [org.jboss.remoting.transport.socket.SocketWrapper]
ServerSocketWrapper[Socket[addr=/ip,port=40042,localport=3873].bc9678] closed socket
13:28:59,885 DEBUG [org.jboss.remoting.transport.socket.ServerThread]
WorkerThread#20[10.0.4.75:40042] closed socketWrapper:
ServerSocketWrapper[Socket[addr=/ip,port=40042,localport=3873].bc9678]
I also needed to add this (documentation has nothing about it):
<bean name="org.jboss.ejb3.RemotingConnector"
class="org.jboss.remoting.transport.Connector">
<property name="invokerLocator">
<value-factory bean="ServiceBindingManager"
method="getStringBinding">
...
<parameter>socket://${jboss.bind.address}:${port}?*loaderport=4873*</parameter>
...
</value-factory>
</property>
<property name="serverConfiguration">
<inject bean="ServerConfiguration" />
</property>
</bean>
Then log becames:
13:37:22,331 DEBUG
[org.jboss.remoting.marshal.MarshallerLoaderHandler] MarshallerLoaderHandler received
invocation with param of load_class and data type of null
13:37:22,331 DEBUG [org.jboss.remoting.marshal.MarshallerLoaderHandler]
MarshallerLoaderHandler: loading class: *my interface*
13:37:22,331 TRACE [org.jboss.remoting.loading.ClassUtil] trying to load class: *my
interface* from path: *my interface class file*
13:37:22,332 TRACE [org.jboss.remoting.loading.ClassByteClassLoader] getResourceAsStream
=>*my interface* = null
13:37:22,332 DEBUG [org.jboss.remoting.marshal.MarshallerLoaderHandler] unable to load
class *my interface*
13:37:22,332 DEBUG [org.jboss.remoting.marshal.MarshallerLoaderHandler]
MarshallerLoaderHandler: returning class: *my interface*: ClassBytes [class=*my
interface*,value=null]
Still confused why there is no any example of remote class
loading in the documentation.
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/560138#560138]
Start a new discussion in JBoss Remoting at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]