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 @Annotations 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 "@Annotations in class diagram" Watch "@Annotations in class diagram" New topic

@Annotations in class diagram

Alessandro Aloisi

Joined: Sep 07, 2010
Posts: 15
Hi All,
I'm working on Part 2 and I have a question

On Cade's class diagram, the author uses annotation to describe Session beans, entities, and so on. This use is not UML compliat but if sun loves it....

the question is.... if I want to show declarative security on my solution, is the correct way? am I making it all up?

Any feedback is greatly appreciated


Rahul Mishra
Ranch Hand

Joined: Jan 22, 2006
Posts: 211
Usage of Stereotypes on a class is UML compliant. You can define your own stereotypes or use the ones available by your modeling tool.

So, if you say...<<stateless>> on your class would be fine..
If you say... <<@stateless>> there are no issues..because either one is a stereotype..

However if you use something like @Stateless, I think its invalid UML..i have never bothered to check the UML i cant be sure..

My SCEA experience:
Alessandro Aloisi

Joined: Sep 07, 2010
Posts: 15
I think you are right but I have read many post of people who used this annotation style and passed

Ok, I decided I'll use standard notation

But, what about declarative roles? Where and how do I have to write them? I'm thinking that a note is sufficient ...
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

I think a note is fine. And I used annotations where there were standard Java ones. I think either way is fine on that front.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Alessandro Aloisi

Joined: Sep 07, 2010
Posts: 15
I finally decided to use a constraint in my class diagram to declare pragmatically security

Thanks to all!
I agree. Here's the link:
subject: @Annotations in class diagram
It's not a secret anymore!