Set properties with the set method
You can set Queue properties by first creating an instance of com.ibm.mq.jms.MQQueue using the default constructor. Then we can fill in the required values by using public set methods. This method means that we can use symbolic names for the property values. However, because these values are vendor-specific, and are embedded in the code, the applications become less portable.
The following code fragment shows the setting of a queue property with a set method.
com.ibm.mq.jms.MQQueue q1 = new com.ibm.mq.jms.MQQueue(); q1.setBaseQueueManagerName("HOST1.QM1"); q1.setBaseQueueName("Q1"); q1.setPersistence(DeliveryMode.NON_PERSISTENT); q1.setPriority(5);Table 1 shows the symbolic property values that are supplied with WebSphere MQ JMS for use with the set methods.
Symbolic values for queue properties Property Admin tool keyword Values expiry UNLIM
APPJMSC.MQJMS_EXP_UNLIMITED
JMSC.MQJMS_EXP_APPpriority APP
QDEFJMSC.MQJMS_PRI_APP
JMSC.MQJMS_PRI_QDEFpersistence APP
QDEF
PERS
NONJMSC.MQJMS_PER_APP
JMSC.MQJMS_PER_QDEF
JMSC.MQJMS_PER_PER
JMSC.MQJMS_PER_NONtargetClient JMS
MQJMSC.MQJMS_CLIENT_JMS_COMPLIANT
JMSC.MQJMS_CLIENT_NONJMS_MQencoding Integer(N)
Integer(R)
Decimal(N)
Decimal(R)
Float(N)
Float(R)
NativeJMSC.MQJMS_ENCODING_INTEGER_NORMAL
JMSC.MQJMS_ENCODING_INTEGER_REVERSED
JMSC.MQJMS_ENCODING_DECIMAL_NORMAL
JMSC.MQJMS_ENCODING_DECIMAL_REVERSED
JMSC.MQJMS_ENCODING_FLOAT_IEEE_NORMAL
JMSC.MQJMS_ENCODING_FLOAT_IEEE_REVERSED
JMSC.MQJMS_ENCODING_NATIVEmulticast ASCF
DISABLED
NOTR
RELIABLE
ENABLEDJMSC.MQJMS_MULTICAST_AS_CF
JMSC.MQJMS_MULTICAST_DISABLED
JMSC.MQJMS_MULTICAST_NOT_RELIABLE
JMSC.MQJMS_MULTICAST_RELIABLE
JMSC.MQJMS_MULTICAST_ENABLEDSee The ENCODING property for a discussion of encoding.
uj24430_