• 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

Showing Entity EJB in Class Diagram ?

 
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

I want to show my Entity EJB in Class diagram. Should i mark it with <<CMP>> or write notes for it ?

Secondly, should i also show the Component and Home interfaces in class diagram ?
 
Ranch Hand
Posts: 356
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,

you could mark it as <<entity>>, which would express that it is an entity, but not that an EJB entity bean is used. You could also use the stereotype <<EJBEntityBean>>. I do not know if there is a standard way to express that it uses CMP.

Kai
 
Bartender
Posts: 2662
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's a screenshot in figure 6 of this javaboutique article.
There is also the UML/EJBTM Mapping Specification. I don't think it has ever been implemented:

Withdrawn 2004.03.29 due to lack of interest after the original Spec Lead company was acquired. New Spec Lead company has failed to find a Spec Lead who wants to drive JSR-26 to completion. Expert Group was informed of intent to withdraw JSR-26 and it supported that action.

Regards, Jan
 
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Asif,

I am not showing entity ejbs in class diagram. Since the class diagram will be just an extension of the BDM, I am restricting it to just contain the domain model entities and may be some Processor classes indicating that they depend on the modeled entities.

What I mean by a modeled entity is just a class (for example: Flight). The class diagram does'nt worry whether or not it is an entity bean or not.

However, I am showing the actual enterprise beans in the component diagram. The component diagrams would almost look identical to Cade's Case Study. You may want to evaluate if you indeed require entity beans at all for read-only data. Even if I see the need, I would depict them only in Component diagrams.
 
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Muhammad Asif:
I want to show my Entity EJB in Class diagram. Should i mark it with <<CMP>> or write notes for it ?



When you check Mark Cade's (SCEA Study Guide) class diagram you will not find that he shows any Entity Beans. At least he does not use any stereotypes to describe that his domain objects are Entity Beans.

Originally posted by Muhammad Asif:
Secondly, should i also show the Component and Home interfaces in class diagram ?



In contrast to Entity Beans, Mark Cade uses a stereotype for Session Beans namely the stereotype <<Stateless Session Bean>>. And no word about Component or Home interface which I also find more disturbing to a class diagram.
 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no need to mention Home or Remote interfaces in any of the class diagrams. Reason is that its understood that EJB cannot exist without home / remote interface (with exception to MDB) and home / remote do not add any value to the class diagram.

As its been said before you can just use <<SLSB>> or <<SFSB>> or <<CMP>>. Ultimate goal is somebody other than you must be able to understand the class diagram without trouble.

Thanks,
Panindra
 
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I agree with Panindrakumar Balellugari that diagram's goal is make other understand our design.

But, there will be usually many classes (maybe hundred) in a project like SCEA part II. And classes belong to many category (client, presentation layer, business layer, MVC .....). And I see that good architect don't put everything on the class diagram.
1. Which class should be in the diagram?
2. The architecture diagram is abstract. So shall we use Conceptual Class Diagrams ? http://www.agilemodeling.com/artifacts/classDiagram.htm
3. I see that Mark Cade put only the name (and sterotype) on the diagram. How about attribute and method (important and public ones)?
4. If there are interface (of the non-EJB component)and implementation class, should we put all of them or just the interface?
Thanks,
huyanh
 
Ranch Hand
Posts: 360
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Simplicity helps here. Don't clutter the class diagram with low level design details. Keep it very simple. If required, mention the important attributes but don't overdo it.
 
Weeds: because mother nature refuses to be your personal bitch. But this tiny ad is willing:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic