webMethods

webMethods

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.

 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
2 Views
0 Files
0 Shares
0 Downloads

Comments

Thu June 22, 2023 04:27 AM