Hi Michael,

Your problem is that the marshalling is handled by RMI.
The marshalling starts from the classloader of the remote object.

One fix is to include a jmx-rmi-adaptor.sar in your ear.
This would bind a RemoteObject into jnp that has visibility into
your ear's LoaderRepository.

<?xml version="1.0" encoding="UTF-8"?>
<server>
  <mbean code="org.jboss.jmx.adaptor.rmi.RMIAdaptorService"
         name="jboss.jmx:type=Connector,name=RMI,ear=foo">
    <constructor>
       <arg type="java.lang.String" value="bar"/>
    </constructor>
  </mbean>
</server>

This will bind into jndi at jmx:<yourhost>:rmi:bar

We should look at using a proxy for the RMIAdaptor
and handling the marshalling ourselves based on the MBean classloader
of the ObjectName.
In fact, this wouldn't be RMI specific, it would work with any
invoker.

Regards,
Adrian

>From: Michael Bartmann <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: [EMAIL PROTECTED]
>Subject: [JBoss-user] JMX and ear-scope
>Date: Tue, 10 Sep 2002 18:59:07 +0200
>
>Suppose I have two classes ClassA (an MBean) and ClassB (implements 
>Serializable).
>Both classes live inside an ear-scope.
>There is an instance of ClassA which is registered with the JMX-server.
>ClassA has a method "void m(ClassB b)".
>This method m is called through an RMIAdaptor from an other JVM,
>providing a non-null instance of ClassB (the parameter class ClassB is 
>known
>on the client side).
>
>This does not work with a current JBoss from Branch_3_2.
>
>Who is responsible for loading ClassB on the server-side when
>de-serializing the jmx invocation?
>
>Is this even supposed to work?
>
>Thanks,
>Michael Bartmann
>
>PS.:
>The whole thing of course worked when ClassB is only the return type of a 
>method,
>because the server only has to serialize an already loaded class.
>
>
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by: OSDN - Tired of that same old
>cell phone?  Get a new here for FREE!
>https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390
>_______________________________________________
>JBoss-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/jboss-user




_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com



-------------------------------------------------------
In remembrance
www.osdn.com/911/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to