3

I have a simple EAR packaged application and several Session beans. There resources that need to get a references so I have an old school service locator for them. It seems that WebSphere 8.5.5 does not make us of the java:module and java:app portable jndi bindings according to the spec. So.

InitialContext c = new InitialContext();
//works - but it is Websphere specific
c.lookup("ejblocal:com.MyService"); 

//Update to original post WORKS - 
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

Any ideas or hint? 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

Thanks in advance.

javapapo
  • 1,342
  • 14
  • 26
  • 1
    Have you looked at http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.base.doc%2Fae%2Fcejb_bindingsejbfp.html ? – trikelef Jul 05 '13 at 22:31
  • 1
    Hi, yes I have gone through this particular documentation. It clear enough, the problem is that when I acquire the InitialContext, every attempt I make to get a look using java:global or similar standard convetions fail with a NamingException. The class that I am performing the lookup is a non managed Bean (an old school Service Locator). When I additionally list() entries on the initial context I resolve to a list of different name spaces , like ejb,etc,jdbc, most probably it is the root JNDI list! Still have not found a solution. Maybe my init of the InitialContext, is not right? – javapapo Jul 05 '13 at 22:57
  • Still having problems :( https://www.ibm.com/developerworks/community/forums/html/topic?id=c80f4fda-8c7d-44f2-b0cd-a9a8229c8b58 – javapapo Sep 26 '13 at 10:07
  • Eventually we managed to discover that WAS 8.5 is using the java:global namespace correctly, the module and package namespaces are not used (our code was trying to locate with java:module ) etc. – javapapo Sep 30 '13 at 17:54
  • Same problem here with WAS 8.5.2 and EJB 3.1 – Andrés Oviedo Feb 28 '14 at 07:57

0 Answers0