users@glassfish.java.net

Re: Glassfish 3.1.1 remote EJB dynamic classloading

From: Cheng Fang <cheng.fang_at_oracle.com>
Date: Thu, 04 Aug 2011 17:24:32 -0400

You will need to include MyInterfaceImp class in client classpath.
IIRC, dynamic class downloading is not enabled in GlassFish orb.

-cheng

On 8/4/11 1:57 PM, Xavier Callejas wrote:
>
>
> 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.
>
>