pub.art.service:setAdapterServiceNodeConnection -- runtime s

What is the recommended usage of the pub.art.service:setAdapterServiceNodeConnection service? I have run a small test with this service and it appears that this service actually changes the code of the adapter service that it is called on. Is this service recommended to be a run time service? Or is it more of a development tool used to copy adapter services and change the connection?

I have a list of adapter services that run on three different, but identical database servers. I want to dynamically change the database connection before running each service. Since pub.art.service:setAdapterServiceNodeConnection actually changes the adapter service, is it possible that the service could become confused if it is run several times simultaneously? This solution would be the best because it means that we only have one set of code to maintain.

Or is pub.art.service:setAdapterServiceNodeConnection a development tool used to copy adapter services and change the adapter connection on the copied service. In my case I would have 3 sets of identical adapter services each using a different connection. Now I have to maintain three sets of code. This seems like the safest solution since the adapter service code is actually changed.

I have the exact same business requirement. Request expert advice at the earliest.

Hi,

I consider setAdapterServiceNodeConnection as a Development Util Service to ease the creation of AdapterServices for different Connections.

If you want to use the same AdapterService for different destinations without having to exchange the underlying connection everytime, you can just pass the ConnetionName in the proper parameter of the adapter service.
Make sure that the content of the adapter service is valid for each connection/destination it will be executed against.

Regards,
Holger

1 Like

Thank you so much Holger for clarifying and assisting with the query.