Hi I have posted the very same question @StackOverflow. It seems that using custom (simple) JNDI code I can not locate EJB references that according to the server are properly deployed. My lookup code works only using the ejblocal Websphere name space but when I try to use the EJB 3.1 portable JNDI features I fail
InitialContext c = new InitialContext(); //works - but it is Websphere specific c.lookup("ejblocal:com.MyService"); //DOES NOT WORK - c.lookup("java:global/myAppEar/myModuleJar/MyServiceImpl!com.MyService"); //DOES NOT WORK c.lookup("java:module/MyServiceImpl!com.MyService"); //DOES NOT WORK c.lookup("java:module/MyServiceImpl"); MyService (plain java interface) @Local(MyService.class) MyServiceImpl implements MyService
in the server logs I can see that the server is reporting that is binding the ejbs either on its ejblocal space or in java:global . I could find a related bug on Websphere 8.0 but I suppose according to their documentation, it is resolved in version 8.5.5.
My application is packaged as an EAR with different ejb-modules, that are properly defined in the application.xml. As already elaborated the server during app start, reports that is binding my session beans
[4/7/2013 9:19:59:099 EEST] 00000036 AbstractEJBRu I CNTR0167I: The server is binding the comXXXXX.CyberReceiptService interface of the CyberReceiptServiceImpl enterprise bean in the xxxx-main.jar module of the xxxxxxEAR application. The binding location is: java:global/xxxxxEAR/xxxx-main/CyberReceiptServiceImpl!com.xxxxx.CyberReceiptService
Do i need to specify something during the initial context object creating, do I need to go through some specific websphere configuration or is it a bug?