I have three environments i.e. DEV, TEST and PROD. so three databases
I want to update data from any environment to any enviroment only in a particular table.
e.g. suppose I want to update TABLE1 data in PROD database, I have to select the enviroment from a drop down and click "save" in DEV or TEST.
To implement it I need new datasource object and then I need to fire a query to update/insert the data in that perticular enviroment.
Here I have two ways to do it: 1. Explicity fetch my database.properties and get all the configurations and create datasource and fire the query using simple JDBC connection. 2. Use Spring framework, configure it's application context and get it from there and run the configured query.
My application is in Spring2 and for database mapping, i am using iBatis.
I want to know the best way to implement it and tutorial which can help me in implementing it. I searched for it but got confused.