Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Part 2/Assignment Question

 
Joe O'Toole
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am trying to do the class diagram for my assignment.

The elements in my class diagram are modeled as entities or sessions(@entity and @session). Based on the requirements in my assignment I would like to have a number of "helper" type classes for the sessions. I understand the application service pattern to be "helpers" to sessions. Hence, was wondering if I could stereotype these classes with @application service. Hence I would end up with @entity, @session, @application service?

Thanks in advance

Joe
 
ntumba lobo
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Instead of using @Session I would rather use the more specific @Stateful and @Stateless, you could lose marks by not being specific enough.

As for the @application I would not personaly use it, I would stick to the default stereotypes @Entity, @Stateful, @Stateless, @MDB and the one for the JSF managed bean (@Managed ?) for the real component classes managed by the container. Any other other class that is not a component managed by the container is a regular class even if it comes from a JEE pattern.

Based on what I did in my own assignment ;-)

Good luck
 
Sadanandam Kurapati
Ranch Hand
Posts: 78
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I completely second Ntumba's suggestions. Be specific about statefull(@Statefull) or stateless(@Stateless) for session beans and also specify @Entity for entities.
Check this thread for more details on stereotypes.

Regards,
Sadanand
 
Joe O'Toole
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great - thanks folks
 
Joe O'Toole
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry - had 1 more question on this general theme.

In Cade's example, everywhere he has a dependency he includes the text "uses" on the dependency line. I find this makes my diagram very cluttered looking. Just wondering if people typically follow that approach

Thanks
Joe
 
Murali Ranga
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my design whereever the association Relationship between the classes I used <<uses>>, otherwise I used other
UML Relationships
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic