Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Stereotypes???

 
Luke Murphy
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my class diagram for part two, I intend to include stereotypes such as:
<<Entity>>
<<Stateless>>
<<ManagedBean>>

However, it is not clear to me whether this is ok or not in UML.

All you can get is fuzzy definitions for Stereotypes.

In the Cade book, he does @Entity, @Stateless, @ManagedBean but
- afaik this is no more UML compliant than <<Entity>>
- a lot of modelling tools don't even support this.


Any comments appreciated...
 
Ravi Iyer
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Luke. I used StarUml that provides <<asdf>> stereotype marking too.
If you include "EJB Types" as part of your uml design you should get EJB specific stereotypes too.
What I did additionally was - before converting uml to image I ran a "UML 2.0" compliance check provided in the tool.
That passed and I think I am satisfied with that.
If the examiner expects @Type marking a.k.a Sheila, then I'm pretty sure I shall have to rewrite :-)
Assuming either way is ok by them and actual design is more important.

Rgds
 
Luke Murphy
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi Iyer wrote:Hi Luke. I used StarUml that provides <<asdf>> stereotype marking too.
If you include "EJB Types" as part of your uml design you should get EJB specific stereotypes too.
What I did additionally was - before converting uml to image I ran a "UML 2.0" compliance check provided in the tool.
That passed and I think I am satisfied with that.
If the examiner expects @Type marking a.k.a Sheila, then I'm pretty sure I shall have to rewrite :-)
Assuming either way is ok by them and actual design is more important.

Rgds

StarUML has a UML 2.0 compliance check? I though that hadn't been upgraded in years?

I am using visual paradigm - good tool.

 
P Das
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What the basic question touches upon here is called "profile". I am not aware of an existing EJB profile that complies with EJB 3.x. If you are happy with older EJB versions and your assignment mentions that it is ok to use, say, EJB 2.x, I guess you can add EJB profile of StarUML or another tool. Otherwise, you may use MOF (Meta Object Facility), to create your own profile to extend the core profile of UML. However, that would enhance your compliance level to UML 2.x.

Sun Education does not provide enough guidelines to the candidates on this aspect and using UML 2.x (with MOF) is exponentially more difficult than using UML 1.x; hence, it is extremely difficult to suggest a foolproof solution. The following are no solution to your problem but only some alternatives.

1) You can use UML 2.x with MOF to create a new EJB 3.0 profile. This is probably the best alternative but most difficult, too.
2) Use UML 1.x and use other mechanisms [I would not recommend using stereotypes, since then you should, ideally, use alternative (1)], e.g. end 1/end 2 names, annotation notes, assumptions, etc.
3) Leave the EJBs for the component diagram only; here, again, you will face some problems but they might not be too complex.
4) Use sterotypes with UML 1.x - probably this is most popular.

Why not others also chip in to find 'the' solution?
 
Luke Murphy
Ranch Hand
Posts: 300
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
P Das wrote:What the basic question touches upon here is called "profile". I am not aware of an existing EJB profile that complies with EJB 3.x. If you are happy with older EJB versions and your assignment mentions that it is ok to use, say, EJB 2.x, I guess you can add EJB profile of StarUML or another tool. Otherwise, you may use MOF (Meta Object Facility), to create your own profile to extend the core profile of UML. However, that would enhance your compliance level to UML 2.x.

Sun Education does not provide enough guidelines to the candidates on this aspect and using UML 2.x (with MOF) is exponentially more difficult than using UML 1.x; hence, it is extremely difficult to suggest a foolproof solution. The following are no solution to your problem but only some alternatives.

1) You can use UML 2.x with MOF to create a new EJB 3.0 profile. This is probably the best alternative but most difficult, too.
2) Use UML 1.x and use other mechanisms [I would not recommend using stereotypes, since then you should, ideally, use alternative (1)], e.g. end 1/end 2 names, annotation notes, assumptions, etc.
3) Leave the EJBs for the component diagram only; here, again, you will face some problems but they might not be too complex.
4) Use sterotypes with UML 1.x - probably this is most popular.

Why not others also chip in to find 'the' solution?


Interesting.

Some useful links on this:

Rational have a number of profiles (for EJB and JPA):

See here: http://publib.boulder.ibm.com/infocenter/rsawshlp/v7r5m0/index.jsp?topic=/com.ibm.xtools.transform.uml2.ejb3.java.jpa.doc/topics/rujpaprofile.html

And I found an EJB 3.0 profile here:

http://www.uml-diagrams.org/profile-diagrams-examples.html#ejb-30

I am not sure how "official" these profiles are. So if you use them would you be breaking an assignment requirement?

 
P Das
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Currently, UML standards are maintained by OMG, not Rational/IBM.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic