-1

We are having an application which is already developed(Very OLD application,That time ORM was not in Market) and use Oracle as a database using JDBC. Now we are in situation where we have to connect different database like Postgres. We can not use ORM or such tool at this stage when application is completely developed. Is there any way so that we can provide multiple db support for our application using JDBC.

Lalit Chattar
  • 1,914
  • 8
  • 27
  • 49

1 Answers1

0

You can create multiple Datasource connections using the Apache commons DBCP package.

If you have a Spring Application you can easily have this configured in your spring application context.

http://javarevisited.blogspot.in/2012/06/jdbc-database-connection-pool-in-spring.html

Connection Pooling with Apache DBCP

Or you can have them defined as JNDI in your web server like JBOSS

Community
  • 1
  • 1
arnabkaycee
  • 1,634
  • 13
  • 26