• 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
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

session EJB with local entity EJBs in component diagram

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


-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 ]
 
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 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.
 
Legend has it that if you rub the right tiny ad, a genie comes out.
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic