IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.


#TechXchangePresenter
 View Only

How to get JDBC connection password without Integration Server restart 

Thu January 23, 2020 03:16 AM

  1. Connect said Integration Server using designer. Create a package and set dependency of it on WmART and WmJDBCAdapter package.
  2. create a java service in that package. 
  3. Add below imports.
import com.wm.pkg.art.error.DetailedException;

import com.wm.pkg.art.error.DetailedServiceException;

import com.wm.pkg.art.ns.ConnectionDataNode;

import com.wm.pkg.art.ns.ConnectionDataNodeManager;

import com.wm.adapter.wmjdbc.connection.JDBCConnectionFactory;

import    com.wm.util.Debug;

  1. Write below code. Here String connName is actual connection name whose password is required.
String connName = "Your_connection_name";

try {

ConnectionDataNode connectionDataNode = ConnectionDataNodeManager.getConnectionDataNode(connName);

Debug.log(4, ((JDBCConnectionFactory)connectionDataNode.getConnectionResource().getManagedConnectionFactory()).getPassword());

}catch(Exception ex){

throw new ServiceException(ex.getMessage());

}
  1. Run the service. Your password will be in Server logs.

#webMethods
#wiki
#password
#Integration-Server-and-ESB
#jdbc-adapter
#JDBC

Statistics
0 Favorited
7 Views
0 Files
0 Shares
0 Downloads

Comments

Wed October 29, 2025 01:12 AM

What version of webMethods was this made with?

I tried this with version 10.11 and it could not find the imports.

This code is exactly what I'm looking for, I'm was looking for code that could pull the password from the connection info and then use it with code that utilizes java.sql as opposed to the JDBC connector due to having it work that way already.

Thu June 22, 2023 04:27 AM