This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question about PetStore pattern using  RSS feed

 
James Liu
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Today when I looked at petstore source code, I found this:
1. When signonEJB sessionbean calls the UserEJB entitybean local interface, it just simply lookup, it did not use serviceLocator.
2 .Then I found when shoppingClientFacadeLocalEJB session lookup the Customer entitybean, it uses serviceLocator.
3. Then I check the CORE PATTERN books, from the UML, it looks like if you try to lookup the sessionfacade from outside EJB container , using serviceLocator, if a sessionbean calls a entitybean, it does not use serviceLocator.
So anybody can explain this, I am really confuse by this. I am so suprised about this, before I thought we should always use serviceLocator whenever you try to lookup a EJB, I have been using this for a while in our project.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!