W
WJ
I realize this is a question better suited for comp.lang.java.databases.
I posted this there and received no response. I also bought a Tomcat
book but have not been able to find the answer in there either.
I am connecting Tomcat 5 to an MS-SQL database. Everything works fine.
But in order to get the pooling to work, I have to create a SQL user
and set my app's database to that user's default database. This is fine
if I only need to connect to one database.
But I'd like to use that login to connect to two databases.
In Weblogic, I am able to define the database in the Connection
Pool string, e.g. database@machinename:1433.
So I can have the same username connect to multiple databases by
defining the target database in the app server's connection pool.
Is there a way to do this in Tomcat 5?
When I configure my Data Source, I use
jdbc:microsoft:sqlserver://localhost:1433 for the
Data Source URL. There does not appear to be a place
to define the database name from the Servlet Container side.
I use com.microsoft.jdbc.sqlserver.SQLServerDriver for the JDBC Driver
Class.
I posted this there and received no response. I also bought a Tomcat
book but have not been able to find the answer in there either.
I am connecting Tomcat 5 to an MS-SQL database. Everything works fine.
But in order to get the pooling to work, I have to create a SQL user
and set my app's database to that user's default database. This is fine
if I only need to connect to one database.
But I'd like to use that login to connect to two databases.
In Weblogic, I am able to define the database in the Connection
Pool string, e.g. database@machinename:1433.
So I can have the same username connect to multiple databases by
defining the target database in the app server's connection pool.
Is there a way to do this in Tomcat 5?
When I configure my Data Source, I use
jdbc:microsoft:sqlserver://localhost:1433 for the
Data Source URL. There does not appear to be a place
to define the database name from the Servlet Container side.
I use com.microsoft.jdbc.sqlserver.SQLServerDriver for the JDBC Driver
Class.