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 queue connection factory properties files
We can use properties files to create or change WebSphere MQ queue connection factory properties.
Determine the changes to make to your WebSphere MQ queue connection factory configuration or its configuration objects.
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 queue connection factory object and its configuration properties.
Run administrative commands using wsadmin to create or change a properties file for a WebSphere MQ queue connection factory, validate the properties, and apply them to the configuration.
Actions for WebSphere MQ queue connection factory properties files. We can create, modify, and delete MQ queue 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 a WebSphere MQ queue connection factory and its properties.
- Create a properties file for an MQQueueConnectionFactory object.
Open an editor and create a WebSphere MQ queue 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. The example defines a WebSphere MQ queue connection factory named myJndiName under a JMSProvider at cell scope:
# # Header # ResourceType=MQQueueConnectionFactory ImplementingResourceType=JMSProvider ResourceId=Cell=!{cellName}:JMSProvider=WebSphere MQ JMS Provider:MQQueueConnectionFactory=jndiName#myJndiName #DELETE=true # #Properties # wmqServerSvrconnChannel=null diagnoseConnectionUsage=false #boolean,default(false) CCSID=null rcvExit=null wmqServerName=null sslConfiguration=null host=null category=null tempModel=null replyWithRFH2=AS_REPLY_DEST #ENUM(AS_REPLY_DEST|ALWAYS),default(AS_REPLY_DEST) secExit=null name=myName #required xaRecoveryAuthAlias=null description=null useConnectionPooling=true #boolean,default(true) 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) msgRetention=true #boolean,default(true) jndiName= myJndiName #required queueManager=null sendExit=null authMechanismPreference=BASIC_PASSWORD #ENUM(BASIC_PASSWORD|KERBEROS),default(BASIC_PASSWORD) sendExitInitData=null maxBatchSize=10 #integer,default(10) tempQueuePrefix=null XAEnabled=true #boolean,default(true) providerType=null #readonly channel=null rcvExitInitData=null port=0 #integer,default(0) authDataAlias=null sslPeerName=null rescanInterval=6000 #integer,default(5000) compressHeaders=NONE #ENUM(SYSTEM|NONE),default(NONE) failIfQuiesce=true #boolean,default(true) clientID=null localAddress=null sslCRL=null 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) EnvironmentVariablesSection # # #Environment Variables cellName=WASCell06- Run applyConfigProperties to create a WebSphere MQ queue connection factory 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 queue connection factory.
- Obtain a properties file for the WebSphere MQ queue connection factory that to change.
We can extract a properties file for an MQQueueConnectionFactory object 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 to change a WebSphere MQ queue connection factory configuration.
- If you no longer need a WebSphere MQ queue connection factory, you can delete the entire WebSphere MQ queue 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 queue connection factory object.
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