aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes can I ommit the ServiceLocator from the component diagram? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "can I ommit the ServiceLocator from the component diagram?" Watch "can I ommit the ServiceLocator from the component diagram?" New topic
Author

can I ommit the ServiceLocator from the component diagram?

Leonardo Penha
Ranch Hand

Joined: Feb 15, 2002
Posts: 68
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<br />SCJP, SCJD, SCWCD, SCEA, SCMAD, SCDJWS
Leonardo Penha
Ranch Hand

Joined: Feb 15, 2002
Posts: 68
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

Joined: Nov 09, 2001
Posts: 171
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.


Regards,
Jim
SCJP, SCJD, SCWCD, SCEA Part I
Leonardo Penha
Ranch Hand

Joined: Feb 15, 2002
Posts: 68
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

Joined: May 13, 2002
Posts: 8
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

Joined: Feb 15, 2002
Posts: 68
I don't know...Cade's book shows the Service Locator as a component in the component diagram...
Billy Tsai
Ranch Hand

Joined: May 23, 2003
Posts: 1304
i showed both ejb tier and webtier service locators


BEA 8.1 Certified Administrator, IBM Certified Solution Developer For XML 1.1 and Related Technologies, SCJP, SCWCD, SCBCD, SCDJWS, SCJD, SCEA,
Oracle Certified Master Java EE 5 Enterprise Architect
Roger Zacharias
Ranch Hand

Joined: Jul 01, 2003
Posts: 49
I will show both Locators and make a note that dependencies are implicite because I don�t want to clutter the diagram.
Roger


SCEA
Nalla Senthilnathan
Ranch Hand

Joined: Jul 13, 2003
Posts: 40
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

Joined: Feb 15, 2002
Posts: 68
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

Joined: Jun 20, 2003
Posts: 236
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.


Juan Rolando Prieur-Reza, M.S., LSSBB, SCEA, SCBCD, SCWCD, SCJP/1.6, IBM OOAD, SCSA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: can I ommit the ServiceLocator from the component diagram?