Refactor the Location of a Adapter Connection

Hello,

I have a lot of adapter services using the same JDBC Adapter Connection definition. I would like to move this connection to a different Package. How can I achieve that without rewriting every adapter service? There seems to be no refactoring capabilities provided.

Thanks for your help.

Regards,
Mathias

Hello,
As far as I know…it cannot be moved…as the same problem happened with me too…

Hello,

thanks for your reply. Suvigya - how did you solve this issue? If it is not possible to move a connection, changing the adapter service to use another connection would also be a way. Can I change an adapter service to use a different connection.

Thanks,
Mathias

Hello…
No buddy you even cannot change that…:frowning:
you have to make new ones…

Oh my… this is hard to accept. So I need to delete all my adapter services and recreate them using the new connection.

There must be another way. Where does the server store the information which connection to use for a service. Maybe I can change it on file level with out tooling support?!

hmmm…I also thought for it…but did not try…
Hey, you try to do it…I would also try to find…but I think probability is less…
But we shall try…:slight_smile:

I just found the solution in an older thread which I did not find before I created my post.

[URL]wmusers.com

You can use the service
pub.art.service:setAdapterServiceNodeConnection in the WmART package to change the connection used by a service .

So I will proceed this way:

  1. create the new JDBC connection using Admin console of the JDBC Adapter
  2. Call pub.art.service:setAdapterServiceNodeConnection for each of my adapter services.
    2a. to automate this you could also write a service that uses pub.art.service:listAdapterServices called with adapterTypeName=JDBCAdapter to list all adapter service and then use a loop to update the connection using pub.art.service:setAdapterServiceNodeConnection
  3. check if any adapter services remain using the old connection before deleting it.

Hey…

This is mind blowing buddy…:slight_smile:
Actually I have never used WmART package, so didn’t knew about it, but you have done great job…:slight_smile:
You can do one thing, make a new thread, with title changing of adapter service from one package to another. It will be helpful to others.

Really thanks, even I will have less headache now…:slight_smile:

Regards.