Network Deployment (Distributed operating systems), v8.0 > Scripting the application serving environment (wsadmin) > Use properties files to manage system configuration > Manage specific configuration objects using properties files > Work with JMS provider properties files
Work with WebSphere MQ topic connection factory properties files
We can use properties files to create or change WebSphere MQ topic connection factory properties.
Determine the changes to make to your WebSphere MQ topic connection factory configuration.
Start wsadmin.sh.
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, you can create, modify, or delete a WebSphere MQ topic connection factory object and its configuration properties.
Run administrative commands using wsadmin to create or change a properties file for a WebSphere MQ topic connection factory, validate the properties, and apply them to the configuration.
Actions for WebSphere MQ topic connection factory properties files. We can create, modify, and delete WebSphere MQ topic connection factory configuration properties.
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 deleteConfigProperties. Optionally, you can use interactive mode with the commands:
AdminTask.command_name('-interactive')
Procedure
- Create an WebSphere MQ topic connection factory and its properties.
- Create a properties file for an MQTopicConnectionFactory object.
Open an editor and create a WebSphere 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 your situation.
An example properties file for an MQTopicConnectionFactory object with a name of myName and a JNDI name of tcfJndiName under a JMSProvider named WebSphere 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=WebSphere 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=WebSphere 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=WebSphere 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 applyConfigProperties to create an MQTopicConnectionFactory configuration.
Run 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 WebSphere MQ topic connection factory.
- Obtain a properties file for the WebSphere MQ topic connection factory that 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 applyConfigProperties.
- If you no longer need a WebSphere MQ topic connection factory, you can delete the entire WebSphere 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]')
Results
We can use the properties file to configure and manage the WebSphere MQ topic connection factory.
What to do next
Save the changes to the configuration.
Extract properties files using wsadmin.sh
Create server, cluster, application, or authorization group objects using properties files and wsadmin scripting
Delete server, cluster, application, or authorization group objects using properties files
Related
PropertiesBasedConfiguration command group using wsadmin.sh