Bootstrap FreeKB - IBM WebSphere - List Connection Factories using wsadmin
IBM WebSphere - List Connection Factories using wsadmin

Updated:   |  IBM WebSphere articles

If you are not familiar with wsadmin.sh (Linux) / wsadmin.bat (Windows), check out my article Getting Started with wsadmin.

A Connection Factory is typically scoped to a cell, node, cluster, or application server. For example, let's say there are Connection Factories scoped to a cluster. In this scenario, you will first want to use the wsdamin command to get the ID of the cluster

The following wsadmin command can be used to get the name and ID the clusters in your cell using jython.

~]$ /opt/WebSphere/AppServer/profiles/your_profile/bin/wsadmin.sh -lang jython -c "print AdminClusterManagement.listClusters()"
WASX7209I: Connected to process "dmgr" on node your_node using SOAP connector;  The type of process is: DeploymentManager
---------------------------------------------------------------
 AdminClusterManagement: List server clusters
 Usage: AdminClusterManagement.listClusters()
 Return: List of the clusters in the cell.
---------------------------------------------------------------
 
cluster is found: myCluster(cells/your_cell/clusters/myCluster|cluster.xml#ServerCluster_1404931637566
['myCluster(cells/your_cell/clusters/myCluster|cluster.xml#ServerCluster_1404931637566']

 

Using the cluster ID, you can then use listWMQConnectionFactories to list the Connection Factories in the cluster. In this example, there is one Connection Factory named foo scoped to myCluster.

AdminTask.listWMQConnectionFactories('myCluster(cells/your_cell/clusters/myCluster|cluster.xml#ServerCluster_1404931637566)')

 

Which should return something like this.

foo(cells/your_cell/clusters/myCluster|resources.xml#MQConnectionFactory_1512498549419)

 

The Connection Factory should also be in the ${WAS_INSTALL_ROOT}/profiles/your_profile/config/cells/your_cell/nodes/your_node/resources.xml file on the server.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 18f26d in the box below so that we can be sure you are a human.