aspose file tools*
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: 70
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.
 
wood burning stoves
 
subject: Confused on EJB look Up Strategies