You can use properties files to create or change WebSphere® MQ queue connection
factory properties.
Before you begin
Determine the changes that you want to make to your WebSphere MQ queue connection
factory configuration or its configuration objects.
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.
About this task
Using 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 your configuration.
Table 1. Actions
for WebSphere MQ queue
connection factory properties files. You 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 the deleteConfigProperties command. |
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. You 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 the applyConfigProperties command to create a WebSphere MQ queue connection
factory 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 WebSphere MQ
queue connection factory.
- Obtain a properties file for the WebSphere MQ queue connection factory that
you want to change.
You 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 your system.
- Run the applyConfigProperties command 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
You can use the properties file to configure and manage
the WebSphere MQ queue
connection factory object.
What to do next
Save the changes to your configuration.