• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

entity generalization question

 
rethna pillai
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
Suppose I have a entity named student and there are two kinds of student underGrad and postGrad.Student will be implemented as an entity bean.How can I represent this in class diagram. generalization or assoication..?
Thanks,
 
Levent Gurses
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Extending an entity bean will make your application difficult to map to a RDB source and port to other J2EE application servers. IBM's WebSphere AS supports entity bean inheritance, but you must define your hierarchy in a IBM-specific DD file. This makes it impossible to port to a different AS. The RDB mapping on the other hand, is a choice between a denormalized table structure and introduction of a new table.
I would suggest you rethink the idea of generalizing an entity bean. Sun does discourage the use of non-standard features in the implementation of EJBs. Providing a server neutrality is one of their chief goals.
On the other hand, one can find different ways to implement the same functionality without the use of entity bean inheritance. For instance, instead of reuse by subclassing, you can consider reuse by delegation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic