• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

dynamic entity beans

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
reply
    Bookmark Topic Watch Topic
  • New Topic