Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session Bean details in Part 2

 
Luay Abdulraheem
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,

Suppose I an using a stateless session bean to hold some business logic. In real world, there will be an interface (local or remote) and an implementation to that interface.
For example: StatelessService + StatelessServiceImpl.

Question: In Class, Component and Sequence diagrams, should we show the interface, the Implementation, or both ??

Thanks,
 
Rishi Shehrawat
Ranch Hand
Posts: 218
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have showed interface in class & sequence diagram. In the component diagram i have shown the implementation.
 
Krzysztof Koziol
Ranch Hand
Posts: 133
Eclipse IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Cade and Sheil example interfaces are not used in any of presented diagrams. Should we add interfaces in our designs?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34837
369
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just showed one and implied the other to avoid clutter. I don't think there is harm in showing both. But if both are in the class diagram, you should show both in the sequence diagram. And that's even more clutter.
 
Ranganathan Kaliyur Mannar
Bartender
Posts: 1101
10
Java Netbeans IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't show the interface and read another post where it was mentioned that it was very important - its a relief to read this post that its ok to follow either approach...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic