ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | oscar List | Febuary 2005 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [oscar] RMI class loading


Thanks
I use

Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader())

just before the unmarshalling and it works fine !

stephane.frenot@xxxxxxxxxxxx wrote:

Hello,
on obr I've released a rmiregistry impl..

I use Dynamic-Import a construct like this.
  
Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
  m_registry=LocateRegistry.createRegistry(rmiPort);

In order for the rmiregistry to be able to load classes.

You can try to look at the sources (I think there is just one class,
since the rmiregistry is provided by the jdk).

/stephane
On Mon, Feb 21, 2005 at 10:50:53AM +0100, Virginie Legrand wrote
Hi,

I have a bundle that deals with RMIClassLoader. I wrote a RMIClassLoaderSpi in order to customize class loading in my bundle.

I put the line
          java.rmi.server.RMIClassLoaderSpi=org.test.MyRMIClassLoaderSpi
in the  $oscar/lib/system.properties.


Running the bundle in Oscar is ok, but when i try to unmarshall an object, there is a ClassNotFoundException.

Oscar doesn't seem to know the class. However the MyRMIClassLoaderSpi is in the $CLASSPATH.


What do I do wrong? Or is there a better solution ?

Regards,

virginie






--
You receive this message as a subscriber of the oscar@xxxxxxxxxxxxx mailing 
list.
To unsubscribe: mailto:oscar-unsubscribe@xxxxxxxxxxxxx
For general help: mailto:sympa@xxxxxxxxxxxxx?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws






<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.