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?
SCJP, SCJD, SCEA
Joined: Aug 13, 2001
Also, do we need to show business exceptions in sequence diagrams?
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.
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?
author & internet detective
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.
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?
BackingBean->Session bean's Business interface->Session bean class->JPA/entity