Search code examples
pythonwebspherejythonwsadmin

jython sricpt: How to modify the maximum connection of connection pool under Websphere MQ Connection factories


I have two connection factories under Resources ->JMS ->Connection Factories.

1) ConnectionFactory

2) IntegrationConnectionFactory

I want to modify the maximum Connection of connection pool under both the connection factories. Resources ->JMS ->Connection Factories -> ConnectionFactory -> Connection Pool -> Maximum Connection.

Can someone please help me to write Jython script to modify the maximum connection of connection pool under connection Factories.


Solution

  • Here is an example,

    wsadmin>confactory = AdminConfig.getid('/J2CConnectionFactory:ConnectionFactory/')
    
    wsadmin>conpool = AdminConfig.showAttribute(confactory, 'connectionPool')
    
    wsadmin>AdminConfig.modify(conpool, '[[maxConnections 50]]')
    
    wsadmin>print AdminConfig.showall(conpool)
    [agedTimeout 0]
    [connectionTimeout 180]
    [freePoolDistributionTableSize 0]
    [maxConnections 50]
    [minConnections 1]
    ...