As Will said, when defining the JDBC adapter, you choose which connection you would like to use for the adapter. However, I don’t think there is any way of changing the connection the adapter works on short of deleting the adapter and creating a new one, which I find unflexible.
I have no idea how to get the connection object in a custom java service. Unless anyone else knows this, you’ll need to provide url, user, pwd like you do now, which unfortunately means you have (at least) two places to update connection information if the database moves.
The best way is to bend the adapters to your will and avoid custom JDBC services, if at all possible. If you really do need to customize, send me a mail and I can give you a small tool class I created pre-WM for managing database connections so you only need to enter the connection information once.
#webMethods#Integration-Server-and-ESB#Adapters-and-E-Standards