tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephan Beutel <beu...@axivion.com>
Subject Re: Context.xml for multiple datasources
Date Wed, 09 Feb 2011 11:49:20 GMT
  Am 09.02.2011 12:12, schrieb chris derham:
>>   That's right, my code doesn't support a variable amount of databases at
>> the moment because
>> the databases are configured in Spring (inside my war file).
>> But if I use the context to configure this list of datasources, the admin
>> can create databases as he need.
>> And that's the reason why my configuration has to take place in the server
>> context and not hardcoded in the Spring configuration.
>> In Spring I can add more databases as I want, but I have to rebuild my war
>> file after change the datasource.
>> With a context configuration my war file can handle as many databases as
>> the admin configures.
>> The switch is done by the key of the map.
>>
> So why don't you have a string resource in the context that provides the
> jndi names of all the jndi data sources, e.g.
> mydatasourceJndiNames=name1,name2,name3. Then have some code the lazily
> loads this string, splits it, and then loads these via jndi into your map?
>
> Chris
>
That's the thing I work on at the moment.
But I thought it could be defined by a map in context.xml like in Spring.

Stephan

-- 
*Stephan Beutel (B.Eng.)*
Senior Software Developer

Axivion GmbH
Nobelstr. 15
70569 Stuttgart
Germany

Tel: +49 711 6204378-66
Fax: +49 711 6204378-99

Mail: beutel@axivion.com <mailto:beutel@axivion.com>
URL: http://www.axivion.com

Geschaeftsfuehrung: Stefan Bellon, Thomas Eisenbarth, Sebastian Rummler
Sitz der Gesellschaft: Stuttgart
Registergericht: Amtsgericht Stuttgart, HRB 720590


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message