Work with IBM MQ topic connection factory properties files
Use properties files to create or change IBM MQ topic connection factory properties.
Determine the changes to make to the IBM MQ topic connection factory configuration.
Start the wsadmin scripting tool. To start wsadmin using the Jython language, run the wsadmin -lang Jython command from the bin directory of the server profile.
Use a properties file to create, modify, or delete an IBM MQ topic connection factory object and its configuration properties.
Run administrative commands using wsadmin to create or change a properties file for an IBM MQ topic connection factory, validate the properties, and apply them to the configuration.
Action Procedure create Set properties and then run the applyConfigProperties command. modify Edit properties and then run the applyConfigProperties command. delete Uncomment #DELETE=true and run the deleteConfigProperties command. Optionally, we can use interactive mode with the commands:
AdminTask.command_name('-interactive')
Tasks
- Create an IBM MQ topic connection factory and its properties.
- Create a properties file for an MQTopicConnectionFactory object.
Open an editor and create an IBM MQ topic connection factory properties file. We can copy the example properties file in this step into an editor and modify the properties as needed for our situation.
An example properties file for an MQTopicConnectionFactory object with a name of myName and a JNDI name of tcfJndiName under a JMSProvider named IBM MQ JMS Provider at cell scope follows. The example includes an associated ConnectionPool (connectionPool attribute of MQTopicConnectionFactory).
# # Header # ResourceType=MQTopicConnectionFactory ImplementingResourceType=GenericType ResourceId=Cell=!{cellName}:JMSProvider=IBM MQ JMS Provider:MQTopicConnectionFactory=jndiName#tcfJndiName #DELETE=true # #Properties # wmqServerSvrconnChannel=null diagnoseConnectionUsage=false #boolean,default(false) CCSID=null rcvExit=null wmqServerName=null sslConfiguration=null pubSubCleanup=SAFE #ENUM(STRONG|SAFE|ASPROP|NONE),default(SAFE) host=null category=null brokerControlQueue=null tempModel=null directAuth=BASIC #ENUM(BASIC|CERTIFICATE),default(BASIC) secExit=null proxyPort=0 #integer,default(0) name=tcfName #required xaRecoveryAuthAlias=null description=null brokerCCSubQ=null wildcardFormat=topicWildcards #ENUM(characterWildcards|allWildcards|topicWildcards),default(topicWildcards) useConnectionPooling=true #boolean,default(true) pubSubCleanupInterval=3600000 #long,default(3600000) manageCachedHandles=false #boolean,default(false) wmqServerEndpoint=null provider=IBM MQ JMS Provider #ObjectName(JMSProvider),readonly ccdtUrl=null providerVersion=null sslResetCount=0 #integer,default(0) secExitInitData=null pollingInterval=5000 #integer,default(5000) tempTopicPrefix=null brokerPubQueue=null proxyHostName=null brokerVersion=MQSI #ENUM(MA0C|MQSI),default(MQSI) queueManager=null jndiName=tcfJndiName #required sendExit=null authMechanismPreference=BASIC_PASSWORD #ENUM(BASIC_PASSWORD|KERBEROS),default(BASIC_PASSWORD) sendExitInitData=null multicast=DISABLED #ENUM(DISABLED|NOT_RELIABLE|RELIABLE|ENABLED),default(DISABLED) maxBatchSize=10 #integer,default(10) statRefreshInterval=60000 #integer,default(60000) XAEnabled=true #boolean,default(true) providerType=null #readonly rcvExitInitData=null channel=null port=0 #integer,default(0) authDataAlias=null sslPeerName=null rescanInterval=5000 #integer,default(5000) compressHeaders=NONE #ENUM(SYSTEM|NONE),default(NONE) failIfQuiesce=true #boolean,default(true) brokerSubQueue=null clientID=null localAddress=null publishAckInterval=25 #integer,default(25) brokerQueueManager=null sslCRL=null sparseSubscriptions=false #boolean,default(false) substore=MIGRATE #ENUM(QUEUE|MIGRATE|BROKER),default(MIGRATE) logMissingTransactionContext=true #boolean,default(true) transportType=BINDINGS #ENUM(BINDINGS_THEN_CLIENT|DIRECTHTTP|BINDINGS|DIRECT|CLIENT),default(BINDINGS) sslCipherSuite=null compressPayload=NONE #ENUM(ZLIBHIGH|ZLIBFAST|RLE|NONE),default(NONE) qmgrType=QMGR #ENUM(QSG|QMGR),default(QMGR) sslType=NONE #ENUM(CENTRAL|SPECIFIC|NONE),default(NONE) cloneSupport=false #boolean,default(false) msgSelection=BROKER #ENUM(CLIENT|BROKER),default(BROKER) # # SubSection 1.0.0.2 # ConnectionPool attributes # ResourceType=ConnectionPool ImplementingResourceType=GenericType ResourceId=Cell=!{cellName}:JMSProvider=IBM MQ JMS Provider:MQTopicConnectionFactory=jndiName#tcfJndiName:ConnectionPool= AttributeInfo=connectionPool # # #Properties # stuckThreshold=0 #integer,default(0) unusedTimeout=1800 #long,default(1800) maxConnections=10 #integer,default(10) stuckTimerTime=0 #integer,default(0) testConnectionInterval=0 #integer,default(0) minConnections=1 #integer,default(1) surgeThreshold=-1 #integer,default(-1) connectionTimeout=180 #long,default(180) purgePolicy=FailingConnectionOnly #ENUM(EntirePool|FailingConnectionOnly),default(FailingConnectionOnly) surgeCreationInterval=0 #integer,default(0) numberOfUnsharedPoolPartitions=0 #integer,default(0) stuckTime=0 #integer,default(0) agedTimeout=0 #long,default(0) reapTime=180 #long,default(180) testConnection=false #boolean,default(false) numberOfSharedPoolPartitions=0 #integer,default(0) freePoolDistributionTableSize=0 #integer,default(0) numberOfFreePoolPartitions=0 #integer,default(0) EnvironmentVariablesSection # #Environment Variables cellName=WASCell06- Run the applyConfigProperties command to create an MQTopicConnectionFactory configuration.
Running the applyConfigProperties command applies the properties file to the configuration. In this Jython example, the optional -reportFileName parameter produces a report named report.txt:
AdminTask.applyConfigProperties(['-propertiesFileName myObjectType.props -reportFileName report.txt '])
- Modify an existing IBM MQ topic connection factory.
- Obtain a properties file for the IBM MQ topic connection factory to change.
We can extract a properties file for an MQTopicConnectionFactory using the extractConfigProperties command.
- Open the properties file in an editor and change the properties as needed.
Ensure that the environment variables in the properties file match the system.
- Run the applyConfigProperties command.
- If we no longer need an IBM MQ topic connection factory, we can delete the entire IBM MQ topic connection factory object.
To delete the entire object, specify DELETE=true in the header section of the properties file and run the deleteConfigProperties command; for example:
AdminTask.deleteConfigProperties('[-propertiesFileName myObjectType.props -reportFileName report.txt]')
Use the properties file to configure and manage the IBM MQ topic connection factory.
What to do next
Save the changes to the configuration.
Extracting properties files Create server, cluster, application, or authorization group objects using properties files and wsadmin scripting Deleting server, cluster, application, or authorization group objects using properties files PropertiesBasedConfiguration .