Help coderanch get a
new server
by contributing to the fundraiser
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

can I ommit the ServiceLocator from the component diagram?

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am currently designing my component diagram, and I feel the ServiceLocator component is cluttering it. Every EJB dependency relationship has to use the service locator to lookup the bean. In my case I have 3 Session Facades plus a few other Entity Beans. If every EJB dependency needs a service locator then I have too many lines crossing each other in the diagram.
I was thinking about providing just one example of an EJB lookup via service locator in a separate component diagram and saying in my assumptions document that every EJB dependency relationship in the main component diagram uses the service locator.Would anyone think this is acceptable?
 
Leonardo Penha
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
another question:
do we need a Service Locator to lookup local entity beans? in my project I access local entity beans from both session facades and other entity beans.
 
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Leonardo Penha:
Hi,
I am currently designing my component diagram, and I feel the ServiceLocator component is cluttering it.


I'd say your question might violate forum - and Suns's - rules concerning the exam, but I'll leave it to the moderators to decide.
 
Leonardo Penha
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am sorry if I am violating the forum rules. But in my opinion I am not. I am not getting into specifics about the exam assignment or about my solution. Any application can benefit from using a Service Locator which is a well-known pattern.
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Leonardo Penha:
Hi,
I am currently designing my component diagram, and I feel the ServiceLocator component is cluttering it. Every EJB dependency relationship has to use the service locator to lookup the bean. In my case I have 3 Session Facades plus a few other Entity Beans. If every EJB dependency needs a service locator then I have too many lines crossing each other in the diagram.
I was thinking about providing just one example of an EJB lookup via service locator in a separate component diagram and saying in my assumptions document that every EJB dependency relationship in the main component diagram uses the service locator.Would anyone think this is acceptable?


IMHO:
Could that be that the ServiceLocator is a class but not a component?
Component diagrams should contain components (EJB, JSP, etc) but not classes.
Tibor
 
Leonardo Penha
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know...Cade's book shows the Service Locator as a component in the component diagram...
 
Ranch Hand
Posts: 1327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i showed both ejb tier and webtier service locators
 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I will show both Locators and make a note that dependencies are implicite because I don�t want to clutter the diagram.
Roger
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Leonardo Penha:
Hi,
I am currently designing my component diagram, and I feel the ServiceLocator component is cluttering it. Every EJB dependency relationship has to use the service locator to lookup the bean. In my case I have 3 Session Facades plus a few other Entity Beans. If every EJB dependency needs a service locator then I have too many lines crossing each other in the diagram.
I was thinking about providing just one example of an EJB lookup via service locator in a separate component diagram and saying in my assumptions document that every EJB dependency relationship in the main component diagram uses the service locator.Would anyone think this is acceptable?


The component diagram (Figure 3) in this BluePrints example does show ServiceLocator:
http://java.sun.com/blueprints/code/adventure/1.0/docs/architecture.html#75601
Regards,
Nalla
 
Leonardo Penha
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
that component diagram is not in accorance with UML, is it?
also it does not have business objects. the facade accesses the DAO.
if I implement the business objects pattern as local entity beans do I need to use a service locator to look up each of them? I think so, but I am not sure. But even if I do use it, do I have to show it in the diagram? I think this usage of the service locator will clutter my diagram. That is why I am thinking about documenting this and not showing the service locator.
 
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Leonardo Penha:
that component diagram is not in accorance with UML,...


It certainly is not a UML component diagram. However, its probably a good hint about what belongs in an architecture.
Your other question is largely an EJB-related question, so I would say that discussion about when to lookup does not violate SCEA rules.
When to show lookups for SCEA might be, though.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic