I have a webapp that runs on a single host. It has one primary
database. But it has many secondary databases. There is one secondary
database for each of my clients that use my app. These client databases
come and go regularly as clients signup and leave. I don't want to
have to edit Tomcat conf files adding and deleting <Resource> tags for
the secondary databases and then have to bounce Tomcat several times a
day as clients come onboard or leave.
I have one <Resource> tag for the primary database. The id/pw and
everything else in the resource tag is the same for all of the
databases. Is there a way to specify/override the url (i.e. the
database name) at runtime to connect to whatever secondary database I
need for the particular client? Or is there a way to clone a datasource
for a different url/database? I still would like to use the one
resource tag in the context.xml.default conf file to specify the id/pw
for the secondary DBs. I'd prefer not to hardcode id/pw in the java
code. But if that is the only option, I can do it.
Hopefully there is some way to dynamically select the db in a datasource
at runtime... (??) Suggestions?
Thanks.
Jerry
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org