Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Class Diagram - Entity EJB and domain class  RSS feed

Tomas Cirip
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
let's say I have following domain model:
Deparment ------* Employee
I want to design Deparment as Entity EJB and Employee as Session EJB/DAO for some reason. How do I model it in the class diagram? I have two options:
<<entity EJB>> <<session bean>>
DeparmentBean EmployeeManagerBean
| |
| |
Department --------* Employee

<<session bean>>
<<entity EJB>> V
DepartmentBean ---------* Employee
My questions are:
A) what is the right way to model according to domain model and my design 1 or 2?
B) I don't understand one thing: If I show class Employee in the class diagrams like that, does that mean that there will be class called Employee in system? Does it matter if I use EmployeeVO in sequence diagrams? Do I have to call it EmployeeVO in the class diagram already?
C) If option 2 is the right one, how do I detect that DepartmentBean actually represents Department domain class? Let's say I want to keep good practice of calling EJB XxxBean. For simplicity I did not list all EJB classes. Is domain class just abstract business entity.
I was readin JSR 26 but it doesn't have answers to my questions. Thanks for the response.
Hopefully my textual UML diagrams show well if not, please copy message to notepad or wordpad with for example 'Courier New' font. Thanks
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!