I am currently having a problem with looking up for EJBs deployed in my WebSphere network deployment environment. To lookup for the EJBs, I am using direct JNDI (i.e. without going thru EJB references).
I understand that in the network deployment we have to provide the prefix 'cell/clusters/<myclustername>/ejb/MyEJB'. Rather than having this prefix, is there are better way?
To solve this, a properties file can be introduced or there is a WebSphere API that can obtain the current Cell name. However, by having the properties file, every server would have to have a different properties file. This would not be a good practice and gives more work to the deployment team. And using the WebSphere API, the code cannot be reused in a standalone application (not in a J2EE container).
Any advice would be helpful. Thanks!