Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Generic Session Beans

 
sergio lasdan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I generated, with netbeans 6.8, session beans for my jpa entity classes.
The generated session beans are very likely similar to the dao classes in jpa context.
In the means, they include methods for CRUD operations.

Netbeans generates a session bean for each entity class. That means, if I want to modify a global behavior of a specific method, I have to run on all the classes.
The content methods are all very the same, except each session class is dedicated to the correspondent session bean.

I think of doing a parent session class, that accepts a generic entity class, that contains all the redundant implementation (CRUD).

The question is:
Anyway I can know the class type of the generic entity?
It's like doing dynamic class casting.


Thank you
 
Peter Wagner
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

what about generic DAO pattern? (IBM generic DAO pattern)

Best regards,

peter

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic