IntelliJ Java IDE
The moose likes OO, Patterns, UML and Refactoring and the fly likes EJB3 and Class/Component diagram Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » OO, Patterns, UML and Refactoring
Reply Bookmark "EJB3 and Class/Component diagram" Watch "EJB3 and Class/Component diagram" New topic
Author

EJB3 and Class/Component diagram

Rob Rider
Greenhorn

Joined: May 03, 2009
Posts: 15
Hi All!

Could anybody advice the rigth place for <<Session Bean>> stereotype in Class/Component diagrams? For instance, there is one session bean interface, corresponding implementatiion class and several POJOs which are used from this implementation. All these classes and interface are shown in Class Diagram and as single component (with realization classes inside) in Component Diagram. Where stereotype should be shown - in class diagram, in component diagram for realization class or for whole component?

By the way, could anybody advice a good example of Component Diagram with EJB3?

Thank you in advance!
Rob
Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2159
You can include a << Session EJB >> stereotype for each class is part of the EJB, e.g. interface class and implementation class. Classes of objects that use the EJB should not have the stereotype. The stereotype should be shown were it makes the most sense. You should include it wherever you feel it is appropriate.
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
If you have used EJB 3, Annotations and UML Stereotypes are similar concepts. You can apply Stereotype where you use Annotation.


SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Rob Rider
Greenhorn

Joined: May 03, 2009
Posts: 15
Thanks, but what about component diagram? Should EJB stereotype be applied to whole component or to particular realization class inside component?
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
Rob Rider wrote:Thanks, but what about component diagram? Should EJB stereotype be applied to whole component or to particular realization class inside component?

I'm not sure what you mean by realization class.
About component, you may have a component that contains many Session Beans and apply <<Session Bean>> Stereotype.
Or maybe a component can be a Session Bean (a component can represent a single class), then you can apply <<Session Bean>> Stereotype.

Anyhow, don't get lost, the very reason of applying Stereotypes is for making the diagrams clearer, more understandable, and more specific, if you think in that way, you should know better how you should apply Stereotypes.
Rob Rider
Greenhorn

Joined: May 03, 2009
Posts: 15
Thanks, Kengkaj. It's more clear now.

Rob
 
IntelliJ Java IDE
 
subject: EJB3 and Class/Component diagram
 
Threads others viewed
Stereotypes in class diagram ?
Passed part II&III
use of stereotypes..
UML for Generalization/Realization
How to show multiple stereotypes?
MyEclipse, The Clear Choice