jQuery in Action, 2nd edition
The moose likes JDBC and the fly likes How to get connected to 2 databases Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "How to get connected to 2 databases" Watch "How to get connected to 2 databases" New topic
Author

How to get connected to 2 databases

Swaroop Reddy
Ranch Hand

Joined: Feb 25, 2009
Posts: 34
Hello sir,
we have developed 2 webapplications in servlets.1 application has one database and other application has other.now i want to run 2 applications from one system is there any possibility to configure both DB's in one xml file if so please let me know .I am using tomcat5.0

and also is there possibility to run 2 versions of tomcats on one system?


Thanks in advance


Mr.Reddy
Jan Cumps
Bartender

Joined: Dec 20, 2006
Posts: 2343

Yes and Yes
is there any possibility to configure both DB's in one xml file
Yes. You can set up several datasources in Tomcat.



is there possibility to run 2 versions of tomcats on one system
Yes, but the two instances will need to use different ports. You will have to change the configuration of at least one tomcat, so that it does not use the default ports.


OCUP UML fundamental
ITIL foundation
Swaroop Reddy
Ranch Hand

Joined: Feb 25, 2009
Posts: 34
Yes. You can set up several datasources in Tomcat.




Hi can you help me out how to set up several data sources in one tomcat.

But one thing for one application I am using seperate xml file for datasource configurations,In the same tomcat only i need to configure the other datasource.no where I am using server.xml for configuring datasource
 
I agree. Here's the link: jrebel
 
subject: How to get connected to 2 databases
 
Similar Threads
Two systems on one tomcat 6 server.
Similar GUI's
exception in deploying my webapp in tomcat4.1
Inter-process communication between two JVMs
Notification when the system is shutdown