I have a Java EE web application (WebSphere 7). The code looks up EJBs on the app server by doing JDNI look ups.
In my development environment (Eclipse / IBM RAD), the EAR project is called customerEAR, so the JNDI lookup is like this:
ejblocal:customerEAR.ear/customerEJB.jar/CustomerService@com.mydomain.service.CustomerServiceLocal
But when the EAR is deployed on the production application server, the lookup fails and the log file states that the EJB is available at:
ejblocal:server1-dev-customerEAR.ear/customerEJB.jar/CustomerService@com.mydomain.service.CustomerServiceLocal
It’s possible that the guy deploying the EAR to the server is actually renaming the EAR file from customerEAR.ear to server1-dev-customerEAR.jar — or maybe WebSphere is renaming stuff on deployment? I can’t get hold of the deployment guy to find out for sure.
But, regardless, my question is:
Is there a cleaner way to do the lookup of the EJBs? Like, by using a shorter lookup name, or a “relative path” instead of the “full path”?
Any suggestions are greatly appreciated, thanks!
Rob
Since the deployment guy insists on renaming my EAR before deploying it, I managed to get this to work, I managed to get it working by shortening this:
ejblocal:customerEAR.ear/customerEJB.jar/CustomerService@com.mydomain.service.CustomerServiceLocalto this:
ejblocal:com.mydomain.service.CustomerServiceLocal