• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UML representation of EJB and JSPs

 
carl marais
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How should we be representing EJBs on our class diagrams. After searching through a number of different books and resources on how to represent the J2EE components in UML in particular class diagrams I have found the following suggestions:
For EJB
1) Class diagram should not show implementation details leave the specifics to the component diagram.
2)Show each element (remote, home , bean [,primary key])as a seperate class on the diagram use the EJBRealizeRemote and EJBRealizeHome <<stereotypes>>
3) Use the folder symbol stereotype it with EJBEntityBean or EJBSessionBean (probably even EJBMessageBean) and place the Remote, Home and optionally Primary Key Class inside. (This is used in the book Developing Enterprise Applications with J2EE and UML by Khawar Ahmed and Cary Umrysh which I am sure will become recommended reading for this certification)
4) Show all the methods home, remote and bean on the same class element. These additional dividers (horizontal lines) are added to seperate the different methods catagories. (Together 4.2 approach)
JSP
1) dont put them on a class diagram they should only be on the class diagram.
2) JSPs are split into a ServerPage and a ClientPage element. The serverPage is the compiled component which runs in the container and the clientpage is the html page it produces. This server page can additionally be shown to be an agregation of forms, headers and footers. (Approach used in book)
3) Model them as you would servelts but with the JSP sterotype
I am inclined to feel that Home and Remote interfaces add clutter and am inclined to want them off the class diagrams. The Idea of splitting the JSP into two elements makes little sense to me and again adds clutter. So I would go no JSPs on class diagram and represent EJB as a class and show more information on the component diagram.
What approach do other people use/suggest.
Carl

 
herve attia
Ranch Hand
Posts: 138
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by carl marais:

3) Use the folder symbol stereotype it with EJBEntityBean or EJBSessionBean (probably even EJBMessageBean) and place the Remote, Home and optionally Primary Key Class inside. (This is used in the book Developing Enterprise Applications with J2EE and UML by Khawar Ahmed and Cary Umrysh which I am sure will become recommended reading for this certification)

For stereotype, I refer to the Sun EJB/UML mapping
http://developer.java.sun.com/developer/technicalArticles/J2EE/patterns/UseOfUML.html
and I invite you to download and take a look to the draft pdf file from http://jcp.org/aboutJava/communityprocess/review/jsr026/
Regards,

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic