aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes dynamic entity beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "dynamic entity beans" Watch "dynamic entity beans" New topic
Author

dynamic entity beans

Neil Goldsmith
Ranch Hand

Joined: Nov 02, 2001
Posts: 34
In our design, we have a GUI that allows our customers to create tables and rows in those tables on the fly. We want to map these tables to entity beans, but the dilemma is, you don't know ahead of time what the tables/rows will look like, so how do you precreate entity beans that map that data? We also have a very distributed system, so creating entity beans on the fly and mapping them to all the appservers would be challenging.
I was looking for some feedback on possible solutions for this problem.
In the old world, we simply used SQL and pulled table names/rows out of the dynamic data provided by the customer. We want to use entity beans for the added benefits you get from them, but how do you make them dynamic to support a dynamic data model?
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3879
The answer is you don't. Don't use Entity beans for this. Use standard Java objects and JDBC just like "in the old days". A generic Java design that represents the SQL metadata as "tables" containing "rows" made up of "columns" might be your best bet. You can still get the rest of the J2EE advantages (transactions, security, etc.) by using Session beans to wrap these things.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamic entity beans
 
Similar Threads
How to implement Relationships in tables
Entity Bean Question
Entity Beans/IIOP
EJB 2.0 and DTOs?
live customer project involving entity beans