This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi Ranchers I am trying to configure my application to invoke one EJB from another. I am trying to use <ejb-ref> tag in ejb-jar.xml (using WSAD 4.0.3). But i'm not able to look-up the ejb. My questions: 1) <ejb-ref-name> is the JNDI name. isn't it? 2) if I give the value for above as "MyEJB", then do I have to look-up as "java:comp/env/ejb/MyEJB" ? Is this the case for remote EJBs only (in a diff. container) or for local EJBs also (same container)? I am confused with using the JNDI. Any assistance is appreciated. Could somebody please point me in the right direction. good ol' Google is consuming a lot of time. Thanks.
1. no. the ref name is the name that you will use form java:comp. in the websphere bindings there's the mapping between the ref name and the jndi name. so lets say your ref anme is MyEjb so you will access it from java:comp/env/MyEjb. 2.it is true for both local or remote , but they need to be stored in the same jndi server.
Hi Vin, One question here. Are you trying to test your lookup within WSAD (I mean WTE) or from a deployed application onto WebSphere ? Unfortunately, it does not work exactly the same way in both. Your code will lookup from "java:comp/env/ejb/MyEJB". But as its name says, it is a reference. Once deployed, you have to map a real EJB/JNDI name to this reference. With WebSphere, this is done during the deployment process or thu the "EJB reference" tabpage of the admin console. With WSAD, as far as I know, there is no UI to do it. But I hopethis IBM document could help you
/ JeanLouis<br /><i>"software development has been, is, and will remain fundamentally hard" (Grady Booch)</i><br /> <br />Take a look at <a href="http://www.epfwiki.net/wikis/openup/" target="_blank" rel="nofollow">Agile OpenUP</a> in the Eclipse community