• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can I ommit the ServiceLocator from the component diagram?

 
Leonardo Penha
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Jim Bedenbaugh
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Tibor Hegyi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
I don't know...Cade's book shows the Service Locator as a component in the component diagram...
 
Billy Tsai
Ranch Hand
Posts: 1304
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i showed both ejb tier and webtier service locators
 
Roger Zacharias
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • 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
 
Nalla Senthilnathan
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
Juan Rolando Prieur-Reza
Ranch Hand
Posts: 237
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic