Originally posted by Vinays Singh:
Hello Friends
Should we display entities discovered in class diagram like Flight,Seat etc in sequecne diagrams? Cade has not shown in his diagrams but I am not sure if this is the perfect way
[ March 16, 2006: Message edited by: Vinays Singh ]
Cade has not showed entities in his diagram because yours approach was based in access the legacy systems using direct calls, wrapped by the DAO
pattern to abstract the system access. Since the major part of the subsystems are
java based, the application could just access the data. It is not really showed how cade�s makes yours persistence.
This is the essence of abstraction and architecture. You could explain how the system works, without any details. The big picture provide by UML models, says to you how to understand the system. In the case of cade's diagrams, you can supouse this:
- Maybe the persistence has been implemented by CORBA calls, accessing corba objects that wrapps the persistence using C++ objects.
- Maybe there are Java Objects that already implement the persistence in the subsystem, and the cade's application do not need to implement the persistence again.
Try to suppose how the system works, without any details. The can make your system more flexible, since there are no dependency between components. If you say that an enterprise bean calls an DAO component to store an customer, you are creating an architecture that provides a pool of solutions about how to implement the persistence.
If you decid to use Entity Beans (maybe because you are worried with concorrent access or distributed transactions), you can use Entity Beans. To show in the class diagram, only use the stereotype <<EntityBean>>, and in yours assumptions, write down wich type of entity is: CMP or BMP. And of course, justify it.
In the sequence diagrams, use the same approach, using the stereotypes. But remember that is not a good approach access the Entity Bean directly by the web or client tier. Use remote facades (SLSB or SFSB) accessing the Entities by local interfaces (javax.ejb.EJBLocalHome). So, in the sequence diagrams, should be something like this:
_____________________________<<SessionEJB>>____________<<EntityEJB>>
[CustomerDelegate] -------> [CustomerFacade] ---------> [Customer]
Good Luck!