• Post Reply Bookmark Topic Watch Topic
  • New Topic

CMP vs. BMP With Multiple Schemas

 
Edward Singleton
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am attempting to develop an entity bean that is required to map to different schemas that contain the same table names. In other words, our production database has one schema (creator), but our test database has multiple schemas. A table is defined in each schema to allow for testing at different levels.

Is it possible to map an EJB-CMP to such an environment, or am I limited to EJB-BMP?
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes it is; all you have to do is to deploy your bean multiple times, once for each database schema, using the sane bean and interface classes for each deployment. Actually WebLogic used to recommend a Read-Mostly pattern, where every bean was deployed twice: once for writing to database and once for reading only (as an aggressive caching strategy).
Regards.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!