*
The moose likes EJB and other Java EE Technologies and the fly likes Multiple Tables catered by a single BMP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Multiple Tables catered by a single BMP" Watch "Multiple Tables catered by a single BMP" New topic
Author

Multiple Tables catered by a single BMP

Gaurav Jain
Ranch Hand

Joined: Mar 11, 2004
Posts: 108
Can multiple tables be catered by a single BMP or if there are x tables then x BMP's need to be created??
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
BMP entity beans' persistence is all done by the bean developer. That means that you can use whatever method you want to load/store the bean's state -- even multiple tables, datasources, anything.
However, note that where entity beans are persisted when using a database is a deployment/server issue. I'm sure some allow you to persist a CMP entity bean to multiple tables if necessary (subsets going to each, that is). In fact, I seem to recall JBoss giving this ability, although my memory sometimes plays cruel jokes on me. You'll have to investigate by looking at the jboss-cmp DTD. (This of course would alleviate you from having to deal with all the BMP issues -- a very good thing!)
By the way, that was my Martha joke for the day. Exciting huh?


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
 
wood burning stoves
 
subject: Multiple Tables catered by a single BMP