I'm wondering how to show a combination of a session bean and a collection of local entity beans (with CMR) in the deployment diagram. I'll try to explain the situation with an example: The Petstore contains a number of customer related classes (Customer, Account, Profile, ContactInfo, CreditCard, Address). Say (different from the Petstore) I have defined a CustomerManager session EJB that acts as a facade for all these related classes that are implemented as local entity beans with CMR. How do I show this in a component diagram? My first approach is to show this as a package (subsystem) called Customer and attach an interface to this package (lollipop) that represents the local (or remote) interface of the CustomerManager session bean as this is the entry point. The session EJB and the entity EJB are shown inside this package as components. There are depencencies from the session bean to the entity beans. -Is this as valid/reasonable approach? -Do I have to show dependencies between the entity EJBs? -Does anyone have another approach?? A related question: Do I have to show the entity EJBs in the sequence diagrams or is it suffient to keep the sequence diagrams at the facade level?
-Is this as valid/reasonable approach? -Do I have to show dependencies between the entity EJBs? -Does anyone have another approach??
Why not just use stereotypes for local interfaces? <<localEntityBean>> would do fine and it will appear just above the lollypop head on top of the bean name. Yes, you should show the dependencies between the entity EJBs. BTW, avoid entity bean interdependencies if possible. They make the application harder to maintain and extend over a period of time. Make your session beans manage such dependencies.
Do I have to show the entity EJBs in the sequence diagrams or is it suffient to keep the sequence diagrams at the facade level?
You should show the interactions between the facade, session beans and the entity beans. It is a good idea to trace the call all the way upto the DAO level, but not necessary to do so. What you can omit are the details such as getting the home reference, creating the remote reference and showing the container calling the bean implementation. IMO is sufficient to show the client using the EJB remote reference.
Hope that helps, -Ajith Disclaimer : These are personal opinions only and does not reflect the opinion of Sun and/or their evaluators. Please use your own judgement when submitting the solution. [ October 06, 2003: Message edited by: Ajith Kallambella ]
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Originally posted by Art van de Belt: local entity beans (with CMR) in the deployment diagram. ... How do I show this in a component diagram? ... My first approach is to show this as a package ...
Art, It seems that your view of deployment, component and package diagrams is a getting in your way. I believe that... 1. CMR should not appear on any of these three diagrams, ever. 2. Class diagrams can show CMR fields. Notes can add clarification. 3. Sequence diagrams, by their judicious exhibition of ejbGetXXX, ejbFindXXX, or ejbSelectXXX is also an excellent vehicle for communicating your intentions with regard to CMR fields.
Juan Rolando Prieur-Reza, M.S., LSSBB, SCEA, SCBCD, SCWCD, SCJP/1.6, IBM OOAD, SCSA