Software: Java J2EE
Application hosted on Tomcat Server.
UPDATE
The current software is JAVA Web application containing just JSP and Servlets no frameworks or anything. Simple JSP and Servlets communicating with Oracle DB
I have no issues in re-writing the application, but since the two copies of it will be maintained I want the code to be same and so when applying a change I need to apply them same on both places. Instead of writing two sets of different code I want to keep the code same while and intermediate layer to handle the DB communication
Software with same code is being hosted and run at two different locations miles away(two separate instances).
Initially the back-end database of the application was same(viz. Oracle
).
Now one of the location has stopped the support on oracle and is switching to the Open Source Postgres
.
So now the (to be) scenario is something like this
Software: Java J2EE
Application hosted on Tomcat Server.
Database 1: Oracle
Database 2: Postgres
At any point of time the application will be using only one database as they are running different instances.
Can an intermediate be added that can interpret the request from application and query depending on the database which needs to be used to fetch data. if yes which is the best option for that.
All this so that every time there is a change in the application, the change takes place uniquely on each copies and an overhead of maintaining two different copies can be avoided.