tags:

views:

359

answers:

0

When calling remote EJB3 (Glassfish) from another EJB module, it is usual to have interfaces available, they are included as JAR file so that when you do JNDI lookup everything works as expected.

I have a situation where EJB3 JNDI name is determined at runtime, and my attempts to access the EJBs retrieved from JNDI in usual way fail, container complains ClassNotFound for remote interface classes. This is odd to me, since all the interface classes extend a parent interface for which I DO have a dependency in my calling EJB module, i.e.:

IParent ejbRef = (IParent) JndiLocator.getObject("jndinameRemote");

Is this possible with EJB3, without the need to have an exact remote EJB interface bytecode available in my JAR?

Bozo