Hi,

Well the obvious solution is to add a catalog_id column to all your tables
and use only one database, but since you aren't proposing to do that there
must be some reason that won't work for you.

I believe what you have to do is, for each catalog you wish to add, create
an mbean XADataSourceLoader or ConnectionFactoryLoader, depending on how
much you want to use JCA resource adapters, and configure it to point to
the database you are interested in, with the jndi name for the datasource
you will get the connections from.

There is probably an easier way to create the mbeans dynamically, but one
way appears to be by copying the code in ConfigurationService.java that
initially loads (almost all) the mbeans.  Or, if you changed the create
method to public, it looks like you could add your mbean by constructing an
xml element with the appropriate info and calling create(element) and then
load(element) on the ConfigurationService mbean.

I have not done this, so ymmv.  Hopefully this is helpful and not
misleading.
david jencks

On 2001.05.17 17:03:42 -0400 Xander van der Merwe wrote:
> Hi, we are developing a new product catalog type app against JBoss and
> one 
> of the features we'd like to support is the ability dynamically
> add/remove 
> product catalogs from the site.
> 
> We have:
> 1. A master database plus multiple catalog databases.
> 2. The master database will contain a *catalog registry entry* for each 
> catalog registered in the system (contains info like catalog code, jdbc 
> connection string, etc) - entries are added via some back-office
> web-based 
> admin function.
> 3. When we want to browse/load products from a specific catalog, the idea
> is 
> to look at the catalog registry and obtain the jdbc connection string for
> 
> the specific database - create the connection and proceed.
> 4. The addition of a new catalog database should not involve a new 
> redeployment (we want end users to be able to do this). Only the master 
> database should be specified during the deployment.
> 
> Questions:
> 1. It appears at this stage as if we cannot use CMP for the catalog
> database 
> part at this point since we have to specify the connection string during
> the 
> deployment process and cannot do it dynamically. Is this correct?
> 2. If we have to do it using BMP, how would the best way be support this?
> 3. Any other innovative ideas on how to support this concept?
> 
> Thanks in advance
> Xander
> 
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
> 
> 
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
> 


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to