• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Creating a generic bean  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

I am a newbie to EJBs - so this may be a very naive query.

Consider this scenario - we have two database tables :
1. EmployeeManager with columns
ManagerEmployeeID and EmployeeID

eg,
100 - 101
100 - 102
100 - 103

and
2. DepartmentLocations with columns

DepartmentID and LocationOD
eg,
105 - 110
105 - 1002

etc

The process to get all employees under a manager and all locations of a department is the same.
I would like to create a generic EJB which could retrieve data for any such table. Ok - more clearly, we should be able to dynamically set the column name of the primary key and the table name from where the data must be retrieved.

Is this possible with a CMB ? Any pointers/tutorials/sample code would be hugely appreciated.

Thanks
Sathya
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!