Hi,

I have a classloader problem in the IIOP container invoker code and would
really appreciate some helpful hints... Classloader wizards: to understand
the problem you do not have to know anything about CORBA/IIOP, so please
read on!

The problem only shows up with entity beans. When the IIOP container
invoker creates a CORBA reference for such a bean, it embeds the beanīs
primary key into the CORBA reference. When handling a bean invocation, the
container invoker extracts the PK from the CORBA reference and passes this
PK to the container as the first argument of a MethodInvocation. 

A ClassNotFoundException is thrown when the container invoker attempts to
extract the PK from the CORBA reference (got the stack trace below running
RMH's well-known cabin bean): 

java.lang.ClassNotFoundException: com.titan.cabin.CabinPK
        at org.jboss.system.ServiceLibraries.loadClass(ServiceLibraries.java:372)
        at org.jboss.system.URLClassLoader.loadClass(URLClassLoader.java:111)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:195)
        at java.io.ObjectInputStream.resolveClass(ObjectInputStream.java:654)
        at java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java:918)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:366)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
        at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1186)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
        at org.jboss.ejb.CacheKey.readExternal(CacheKey.java:118)
        at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:1212)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:386)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:236)
        at 
org.jboss.ejb.plugins.iiop.server.IIOPContainerInvoker.toObject(IIOPContainerInvoker.java:896)
        at 
org.jboss.ejb.plugins.iiop.server.IIOPContainerInvoker._invoke(IIOPContainerInvoker.java:665)
        at org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java:239)
        at org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:456)
        at org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:581)

I've found a way of circumventing the problem, but am not satisfied with
it. Things work if I wrap the PK into a MarshalledObject before embedding
it into the CORBA reference, and do the opposite thing when extracting the
PK from the reference. Runs fine, but is very slow... The bank test takes
forever to run.

This code is in org.jboss.ejb.plugins.iiop.server.IIOPContainerInvoker,
under contrib/iiop. Insertion/extraction of the PK is done through the  
methods toByteArray() and toObject(). Each of these methods has two
implementations, one of them commented out. The commented out
implementation "solves" the problem in the way described above.

Suggestions are very welcome!

Cheers,

Francisco








_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to