aspose file tools
The moose likes Object Relational Mapping and the fly likes Generic Session Beans Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply Bookmark "Generic Session Beans" Watch "Generic Session Beans" New topic
Author

Generic Session Beans

sergio lasdan
Greenhorn

Joined: Nov 03, 2009
Posts: 1
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

Joined: Oct 29, 2009
Posts: 3
Hi,

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

Best regards,

peter

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Generic Session Beans
 
Similar Threads
Cade component diagram and DAO
A little confused about Part 2, please help
Need help with design structure and looking up EntityManager and UserTransaction in helper's helper
JSF Exception
jaxb be converting bean to xml