users@glassfish.java.net

Glassfish 3.1.1 remote EJB dynamic classloading

From: Xavier Callejas <xavier_at_sistemasaereos.com.sv>
Date: Thu, 4 Aug 2011 11:57:16 -0600

Hi,

I have a Stateless session bean inside a EJB module implementing a remote
interface, this session bean has a methods and class definitions:

@Stateless
public class MyBean {

   ...

   @Override
   public MyInterface getSomeData() {
           return new MyInterfaceImp();
   }

   ...

   class MyInterfaceImp implements MyInterface, Serializable {

   ...

   }

}


The MyInterface interface is inside a common library jar that is in the path
of the server module and also in the client, but the MyInterfaceImp is only
sinde in the server module.

For this scenario the client is a web application deployed in the same
Glassfish instance.

In the client I call this method but I receive a exception:

org.omg.CORBA.MARSHAL: ADVERTENCIA: IOP00810011: Exception from readValue on
ValueHandler in CDRInputStream vmcid: OMG minor code: 11 completed: Maybe

...

If I also put the implementation of MyInterfaceImp in the shared common jar
the EJB call is completed without error.

I have read several aritcles about class loading but I haven't understood how
to configurate Glassfish v3 for dynamic class loading with EJB.

Please help.

Thank you in advance.

Xavier.