Previously i was really confused about the JNDI namefor an ejb. and the ejb-reference for an EJB But after trying hard i got some notes from a Book (pdf) on a Site ,Quickly i will frame What i wanna discuss and need your help on. What is got from that book is that the ejb-ref name is a kind of Nick name for the ejb itself. and what happenes is that when we develop the application we and we use an reference or accessing the EJB. that we call as an ejb-ref for that EJB. Now there coud be a possibility that the person who is developing the bean . may not deploy it under the same JNDI location as we have refered while coding the bean and know that person has only the class files which he can not modify , or lets we dont wanna him to modify our coding, and By default all the lookup for the bean are prefered under the location "java:comp/env/ejb" this is whtat being recoomened by the EJb specification,. in that case our ejb-refernce can be mapped to the JNDI name (Exact JNDI name ) by the deployer using some technology called as SYMBOLIC LINKS>!! so.. The reason i have givensuch a long details of my view as i WANT some one to .. tell me that whether i have got the right thing or not.. buz i was not able to .. figure out the reason that why do we need both the JNDI name and ejb-refernce for the EJB's when the job can be done with the either!!!..
SO plz ANY ONE WHO IS CONFIDENT IN THIS SUBJECT HELP HELP ME!! I HAVE POSTED THIS TWICE BEFORE BUT NO ONE HELPED ME!..
Horsehockey! EJB-Refs can be used from any J2EE component type including Servlets and Application Clients. Read the specs. They should be used REGARDLESS of who calls the EJB, simply because they give the deployer the freedom to change the underlying JNDI name of the EJB without having your client code change... Kyle
thxs kylie and rest of all for replying! thats what was confusing me that if they both perform the same thing then wats the use of having both ! Kylie does it makes any difference on the performance if we ejb-ref or jndi and also coud you tell me how to link the ejb-ref to a specific JNDI at the tim eof deployment .. i only know that we need to use some SYMBOLIC links for that!