[
http://jira.jboss.com/jira/browse/JBREM-962?page=comments#action_12418069 ]
Ron Sigal commented on JBREM-962:
---------------------------------
org.jboss.remoting.marshal.MarshallerLoaderHandler, which is the ServerInvocationHandler
for the classloader Connector, now is able to search
org.jboss.mx.loading.HeirarchicalLoaderRepository3s, which allows it to find scoped
classes. In order to make it possible to inform the MarshallerLoaderHandler about the
HeirarchicalLoaderRepository3s to be search, a <repositories> section has been added
to the MBean Connector definition. This section should be added to the Connector for
which the "loaderport" parameter is defined. A client connected to such a
Connector will be able to connect to the associated classloader Connector and download
classes from any of the repositories listed in the <repository> section.
For example, to allow an EJB3 to get scoped classes in an EAR where the jboss-app.xml is
<!DOCTYPE jboss-app PUBLIC "-//JBoss//DTD J2EE Application 1.4//EN"
"http://www.jboss.org/j2ee/dtd/jboss-app_4_0.dtd">
<jboss-app>
<loader-repository>jboss.remoting:loader=titan.ear</loader-repository>
</jboss-app>
the EJB3 Connector should look something like the following:
<mbean code="org.jboss.remoting.transport.Connector"
name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3">
<depends>jboss.aop:service=AspectDeployer</depends>
<attribute name="Configuration">
<config>
<invoker transport="socket">
<attribute
name="serverBindAddress">${jboss.bind.address}</attribute>
<attribute name="serverBindPort">3873</attribute>
<attribute name="loaderport"
isParam="true">3883</attribute>
</invoker>
<repositories>
<repository>jboss.remoting:loader=titan.ear</repository>
</repositories>
<handlers>
<handler
subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</config>
</attribute>
</mbean>
That is, the classloader Connector is informed about the HeirarchicalLoaderRepository3
with ObjectName "boss.remoting:loader=titan.ear".
Remote classloading does not work with Isolated EARs
----------------------------------------------------
Key: JBREM-962
URL:
http://jira.jboss.com/jira/browse/JBREM-962
Project: JBoss Remoting
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 2.2.2.SP4
Environment: EAP4.3
Reporter: Magesh Kumar B
Assigned To: Ron Sigal
Fix For: 2.2.2.SP8
When user has enabled isolation in a ear file containing an EJB3 jar file, the
implementation classes are not serialized and a ClassNotFoundException is thrown. I have
attached a sample called HelloEJB3.zip that contains all files needed for deploying this
test case. Using EAP4.3 do "ant deploy" and then do "ant test".
When the jboss-app.xml is removed the application client works fine. This fails in the
isolated mode with the below exception:
Caused by: java.lang.ClassNotFoundException: org.jboss.ejb3.user.UserImpl
at
org.jboss.remoting.serialization.ClassLoaderUtility.loadClass(ClassLoaderUtility.java:82)
at
org.jboss.remoting.loading.RemotingClassLoader.loadClass(RemotingClassLoader.java:76)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at
org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.resolveClass(ObjectInputStreamWithClassLoader.java:174)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at
org.jboss.aop.joinpoint.InvocationResponse.readExternal(InvocationResponse.java:122)
at java.io.ObjectInputStream.readExternalData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at
org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObjectVersion2_2(JavaSerializationManager.java:239)
at
org.jboss.remoting.serialization.impl.java.JavaSerializationManager.receiveObject(JavaSerializationManager.java:133)
at
org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.read(SerializableUnMarshaller.java:120)
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.versionedRead(MicroSocketClientInvoker.java:919)
at
org.jboss.remoting.transport.socket.MicroSocketClientInvoker.transport(MicroSocketClientInvoker.java:613)
at
org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:122)
at org.jboss.remoting.Client.invoke(Client.java:1634)
at org.jboss.remoting.Client.invoke(Client.java:548)
at
org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:53)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:74)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at
org.jboss.ejb3.stateless.StatelessRemoteProxy.invoke(StatelessRemoteProxy.java:107)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira