Friday, December 17, 2010

Changing connections for an existing JDBC adapter

So you have your adapter setup with all 40 fields mapped and the 2 table join with a nice complex where clause.  Now you find out you need to use a different connection for whatever reason.  If you don't know, it looks like you have to delete and recreate your adapter.  There isn't anywhere in the adapter to change the connection.

Enter the WmART package.
For each adapter service, call pub.art.service:setAdapterServiceNodeConnection.  Pass in the serviceName (copy and paste from the navigator) and the new connection alias name.  Now the adapter will point to the new connection alias!

6 comments:

  1. A trick if you are using CrossVista to do deployments (which is a 3rd party tool that replaces WmDeployer and manual source control) is that it allows you to run a regex or xpath over the adapter services during promotion. Really handy for the ones that need a hard wired schema/catalog.. But also works for re-pointing the adapter connection itself if you run a promotion to the same repository then re-deploy..

    But the pub.art one works a treat. If only you could simply move adapter connections!

    ReplyDelete
  2. Thanks for reminding. :) Long time I didn't need that, hence I completely forgot where the service stored is :)

    ReplyDelete
  3. i love you, you've saved my day!!

    ReplyDelete
  4. Thanks Kevin, It saved lot of time.

    ReplyDelete