File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Showing Entity EJB in Class 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 "Showing Entity EJB in Class Diagram ?" Watch "Showing Entity EJB in Class Diagram ?" New topic

Showing Entity EJB in Class Diagram ?

Muhammad Asif
Ranch Hand

Joined: Jul 13, 2001
Posts: 202
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 ?

Kai Witte
Ranch Hand

Joined: Jul 17, 2004
Posts: 356

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 Witte's business website Kai Witte's private homepage
Jan Cumps

Joined: Dec 20, 2006
Posts: 2565

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

OCUP UML fundamental and ITIL foundation
dinesh pande
Ranch Hand

Joined: Apr 07, 2003
Posts: 124
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.
Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
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.

Panindrakumar Balellugari

Joined: Sep 07, 2004
Posts: 14
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.

Pham Huy Anh
Ranch Hand

Joined: Aug 23, 2006
Posts: 41
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 ?
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?
Sivasundaram Umapathy
Ranch Hand

Joined: Aug 10, 2002
Posts: 360
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.

Co-Author - SCMAD Exam Guide - ISBN:9780070077881
Author - Java certification success, Part 4: SCEA
I agree. Here's the link:
subject: Showing Entity EJB in Class Diagram ?
It's not a secret anymore!