What is the best method to rename a data source and adjust any code referencing the old data source?

We want to rename a data source from jdbc/datasourceA to jdbc/datasourceB.  At the same time we want all existing code to now reference the new data source jdbc/datasourceB.  Any recommendations?

 

We have tried editing the name of the data source but then there are errors that things like expressions can't find the data source as its still looking for jdbc/datasourceA.  So now we are wondering how to find everywhere in the code that the old data source is referenced.  We did not use constants but will consider that going forward.

  Discussion posts and replies are publicly visible

Parents
  • You can add the new data source from the Admin console. once the connection is verified you go to the data store where you want to change the data source name , change it in the drop down and publish same. Later you can deactivate or remove the old named data source. This is a pretty safe way of doing it as if something goes wrong you have got your old config to roll back to.
Reply
  • You can add the new data source from the Admin console. once the connection is verified you go to the data store where you want to change the data source name , change it in the drop down and publish same. Later you can deactivate or remove the old named data source. This is a pretty safe way of doing it as if something goes wrong you have got your old config to roll back to.
Children
No Data