I've fixed this issue for Remoting release 2.2.2.SP8.
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 searched, a 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 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 "jboss.remoting:loader=titan.ear".
An example case is attached to JBREM-962 "Remote classloading does not work with
Isolated EARs".
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159759#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...