This week's book / license giveaways are in the JDBC and Relational Databases and Java in General forums.
We're giving away four copies each of PostGIS in Action and Java Advanced Topics Training and have the authors on-line!
See this thread and this one for details.
The moose likes Websphere and the fly likes Confused on EJB look Up Strategies Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Websphere
Bookmark "Confused on EJB look Up Strategies" Watch "Confused on EJB look Up Strategies" New topic
Author

Confused on EJB look Up Strategies

sandeeprajsingh tandon
Ranch Hand

Joined: Mar 06, 2009
Posts: 76
We are using the following 2 strategies in 2 of my EJB3.0 Projects to look up Session Beans.

a) A Session bean is annotated with @STATELESS and there is a Local Interface to look up marked with @LOCAL and the look up is performed in the client as

context.lookup(prefs.get(
"MySessionBean",
"MyProject.MySessionBeanLocal"));


b) A Session bean is annotated with @STATELESS and there is a Local Interface to look up marked with @LOCAL and the look up is performed in the client as

ResourceLocator.lookup(MySessionBean.class);
along with this an entry has to be configured in the resource-binding property file
mySessionBean=openejb\:MyProject.mySessionBean

Please let me know the differences, positives and the negatives of the 2 strategies.
WOuld really appreciate any info on this.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Confused on EJB look Up Strategies