Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Representation of SessionBeans in UML Sequence Diagrams

 
Kumar Amit
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,

I want to show interaction between my presentation layer(JSF BackingBeans) and business tier (SessionBean) in sequence diagrams which then invoke JPA entity manager. Can you guide as to what I should show in sequence diagram - Business Interface of the session bean or the actual stateless session bean or BOTH?

Cheers

Amit
 
Kumar Amit
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, do we need to show business exceptions in sequence diagrams?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would pick one for the session bean and go with that. Neither option is wrong. For business exceptions, if they are part of the main flow, you should show them. If they are things that are truly unexpected, it isn't needed.
 
Kumar Amit
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jeanne Boyarsky wrote:I would pick one for the session bean and go with that. Neither option is wrong. For business exceptions, if they are part of the main flow, you should show them. If they are things that are truly unexpected, it isn't needed.

Thanks for the reply Jeanne. If I show stateless Session Bean implementation class instead of business interface in sequence diagram then how to show dependency injection in the diagram between Backing Bean and Session Bean interface?

Can we show dependency injection using bean implementation class instead of Business interface?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My diagram was high level than that. I didn't show DI per se. Just a uses relationship.
 
Sharma Ashutosh
Bartender
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have shown Interface as well as the SLSB.
Regarding DI, I just mentioned in the sequence diagram as UML comment(Dog eared box that Interface will be injected into JSF/Business Delegate).

I used Business Delegate to take care of all the exceptions. One can use intercepting filter also for that purpose.
 
Kumar Amit
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sharma Ashutosh wrote:I have shown Interface as well as the SLSB.
Regarding DI, I just mentioned in the sequence diagram as UML comment(Dog eared box that Interface will be injected into JSF/Business Delegate).

I used Business Delegate to take care of all the exceptions. One can use intercepting filter also for that purpose.


Hi Ashutosh,

Do you mean you showed both session bean's business interface and session bean itself in the sequence diagram? If so how did you showed call between business interface and the bean?

e.g.

BackingBean->Session bean's Business interface->Session bean class->JPA/entity
 
Sharma Ashutosh
Bartender
Posts: 346
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple arrow with stereotype <<uses>>
 
Kumar Amit
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ashutosh and Jeanne.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic