• Post Reply Bookmark Topic Watch Topic
  • New Topic

can any one help me!?? EXPERTS??

 
perry arora
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends need you r help.

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!..
 
Sri Basavanahally
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you aware that typically <ejb-ref> is used for accessing one EJB from another EJB ?
If you are using a "regular" client for an EJ, you use the jndi-name, to look-up the EJB.
Hope that helps..
 
Kyle Brown
author
Ranch Hand
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
perry arora
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!

thxs!
b bye
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ejb-ref is the symbolic link. You specify an ejb-ref in the standard ejb-jar.xml file, and map the ejb-ref-name into a real JNDI name using a vendor-specific deployment descriptor.
 
perry arora
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thxs

Bu i need some more information!
Can any one give it..
Plzz
thxs
bye
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why dont you read the spec.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!