How to do a EJB lookup.


I’m working with EJB3. I trying to do JDNI lookup from an Application Designer Adapter for a session bean.
But I get various class not found, class cast exception.
Can anyone tell me how to do the lookup right?
Where to put the @remote annotated interfaces, i seems the Application Designers own classloader can’t load them.

Thanks stephan.

I tested this:

@EJB(name=“ejb/ServiceManagementJNDI”) IServiceManagement management;

and that:
InitialContext ctx = new InitialContext();
management = (IServiceManagement) ctx.lookup(“ejb/ServiceManagementJNDI”);

I seems to work, but
java.lang.ClassCastException: de.epoq.dycide2.server._IServiceDycideManagement_Wrapper

java.lang.ClassCastException: de.epoq.dycide2.server._IServiceManagement_Wrapper
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at com.softwareag.cis.server.InteractionModel.invokeMethodInternally(