Tomcat doesn't have "a" datasource, but it can support as many datasources as you want.
Most of the time I configure my datasources on a per-application basis, so I just put all that info in the context.xml file for the webapp along with all the other app config information. JBoss, however, goes for server-wide configurations. The view from the application is the same, however.
Using JMX to configure Tomcat is usually overkill, since you can't usually modify a database connection pool on the fly - you do it before the app goes online and (usually) leave it alone as long as the app is running, since otherwise you're in much the same situation as someone attempting to change tires on a moving automobile.
There are a number of ways to do what you're asking, but I'm actually not sure if they're worth the trouble.
When it comes to destroying a civilization, gas chambers cannot hold a candle to echo chambers.
posted 8 years ago
thanks for the answer...
i think i will solve this issue with java IO and jdom. so just insert the datasource in the xml file.
i thought using jmx would be a nicer way because i could develop against the api.
That which doesn't kill us makes us stronger. I think a piece of pie wouldn't kill me. Tiny ad:
how do I do my own kindle-like thing - without amazon