• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Part 2/Assignment Question

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 78
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Great - thanks folks
 
Joe O'Toole
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In my design whereever the association Relationship between the classes I used <<uses>>, otherwise I used other
UML Relationships
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic