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?
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.
This message was edited 1 time. Last update was at by James Clark
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.
This message was edited 2 times. Last update was at by Kengkaj Sathianpantarit
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