Hi all,

Our site uses 3 different databases, as well as two remote databases
(two-phased commit). So far I have only tried CMP using the HSQL. Now that
we are getting ready to move to EJB, how does CMP know which database to
use? If a user on our site is in a specific module, it will use database 1.
If in another area, it would use database 2, and so on. So how do you use a
single bean that can be used in more than one database (both at the same
time, and individually).

My guess is that somehow you have to use the Transaction Management of the
EJB container, start a transaction and indicate what Datasource to use at
that point. Is there any method of specifying more than one DataSource at
deployment?

Lastly, let me explain one thing about our database. We are a media industry
based company. We deal with Radio, TV and Cable. We have one database for
each. The tables in each are named the same, with the same data! In other
words, we need a single entity bean that can be stored in a radio, tv and/or
cable database in the same manner, without requiring 3 separate beans to do
so. Is this possible, and thus, how do you indicate which database the CMP
will use?

Thanks.

Reply via email to