If you create a WebLogic domain for Oracle Service Bus, it will ask you to create database schemas using the Repository Creation Utility or RCU. The OSB WebLogic domain will require connectivity to these database schemas to start up successfully.
So if there comes a chance that the customer decides to migrate their database to another server, that would mean you have to update the data sources defined within the OSB WebLogic domain. You can change these from the XML files within the $DOMAIN_HOME/config/jdbc folder, but that’s something we can automate via WLST.
In this post I am going to share a simple set of work instructions to do just that - how to update OSB data source connections in the event of database server migrations via WLST.
In this scenario, the OSB WebLogic 12.1.3 domain uses GridLink connections, so it’s important to get two pieces of information:
The new JDBC connection string
The new ONS nodes
Once you have these, you can update the script below:
Here is the work instruction that you can follow to update the data source connection strings of your OSB WebLogic domain:
Create a backup of the JDBC Configuration. We will back up the jdbc folder inside the WebLogic domain i.e. $DOMAIN_HOME/config/jdbc.
Create a backup of the fmwconfig folder. Create a backup of the $DOMAIN_HOME/config/fmwconfig folder.
Shutdown the OSB managed servers.
Run the updateOSB_DS.py
Modify the following JPS configuration files under $DOMAIN_HOME/config/fmwconfig - replace the OLD JDBC connection string:
jps-config-jse.xml
jps-config.xml
Start OSB Managed Servers
That’s it! The OSB Managed Servers should be running and all deployments should be running or active.