Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > conceptual problem ....please help

Thread Tools

conceptual problem ....please help

Posts: n/a
I have a question on EJB.

suppose I have a SessionBean and an EntityBean.
Now, SessionBean wants to call EntityBean.

I found you can call via EJB references.

like this inside sessionbean you can have

InitialContext namingContext = new InitialContext();
Object ref = namingContext.lookup("java:comp/env/ejb/myBean"); // this
JNDI is a reference

my question is , what BENEFIT i would get if i call via EJB
reference instead of global JNDI name ?

if you are getting confused , see this link

did you see , there is ejb reference name="ejb/TravelAgent"

and also

global websphere binding name


we can call a bean by using either of above.....but we prefer to make a
reference and use EJB reference ......WHY ? what extra benefit i
will get if i make a EJB reference and call by EJB reference ?

thank you

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Conceptual function type problem C++ 6 08-20-2007 09:14 PM
VS.NET Public Namespaces, classes, Function - Conceptual misunderstanding. ASP .Net 3 04-03-2006 03:12 PM
Learning Java 5.0 , a more visual conceptual approach. Help! google 24/7 Java 10 02-24-2006 02:18 PM
conceptual problem Lloyd Dupont ASP .Net 2 01-04-2006 01:56 PM
Problem with a conceptual graph Daniel Ladd C++ 4 07-20-2004 06:35 PM