Administering JMS objects

This section describes the eight types of object that the administration tool can handle. It includes details about each of their configurable properties and the verbs that can manipulate them.

Object types

Table 9 shows the eight types of administered objects. The Keyword column shows the strings that you can substitute for TYPE in the commands shown in Table 10.

Table 9. The JMS object types that are handled by the administration tool

Object Type Keyword Description
MQQueueConnectionFactory QCF The WebSphere MQ implementation of the JMS QueueConnectionFactory interface. This represents a factory object for creating connections in the point-to-point domain of JMS.
MQTopicConnectionFactory TCF The WebSphere MQ implementation of the JMS TopicConnectionFactory interface. This represents a factory object for creating connections in the publish/subscribe domain of JMS.
MQQueue Q The WebSphere MQ implementation of the JMS Queue interface. This represents a destination for messages in the point-to-point domain of JMS.
MQTopic T The WebSphere MQ implementation of the JMS Topic interface. This represents a destination for messages in the publish/subscribe domain of JMS.
MQXAQueueConnectionFactory1 XAQCF The WebSphere MQ implementation of the JMS XAQueueConnectionFactory interface. This represents a factory object for creating connections in the point-to-point domain of JMS that use the XA versions of JMS classes.
MQXATopicConnectionFactory1 XATCF The WebSphere MQ implementation of the JMS XATopicConnectionFactory interface. This represents a factory object for creating connections in the publish/subscribe domain of JMS that use the XA versions of JMS classes.
JMSWrapXAQueueConnectionFactory2 WSQCF The WebSphere MQ implementation of the JMS QueueConnectionFactory interface. This represents a factory object for creating connections in the point-to-point domain of JMS that use the XA versions of JMS classes with WebSphere Application Server.
JMSWrapXATopicConnectionFactory2 WSTCF The WebSphere MQ implementation of the JMS TopicConnectionFactory interface. This represents a factory object for creating connections in the publish/subscribe domain of JMS that use the XA versions of JMS classes with WebSphere Application Server.
  1. These classes are provided for use by vendors of application servers. They are unlikely to be directly useful to application programmers.
  2. Use this style of ConnectionFactory if you wish your JMS sessions to participate in global transactions that are coordinated by WebSphere Application Server.

Verbs used with JMS objects

You can use the verbs ALTER, DEFINE, DISPLAY, DELETE, COPY, and MOVE to manipulate administered objects in the directory namespace. Table 10 summarizes their use. Substitute TYPE with the keyword that represents the required administered object, as listed in Table 9.

Table 10. Syntax and description of commands used to manipulate administered objects

Command syntax Description
ALTER TYPE(name) [property]* Attempts to update the given administered object's properties with the ones supplied. Fails if there is a security violation, if the specified object cannot be found, or if the new properties supplied are not valid.
DEFINE TYPE(name) [property]* Attempts to create an administered object of type TYPE with the supplied properties, and tries to store it under the name name in the current context.
Fails if there is a security violation, if the supplied name is not valid or already exists, or if the properties supplied are not valid.
DISPLAY TYPE(name) Displays the properties of the administered object of type TYPE, bound under the name name in the current context.
Fails if the object does not exist, or if there is a security violation.
DELETE TYPE(name) Attempts to remove the administered object of type TYPE, having the name name, from the current context.
Fails if the object does not exist, or if there is a security violation.
COPY TYPE(nameA)
TYPE(nameB)
Makes a copy of the administered object of type TYPE, having the name nameA, naming the copy nameB. This all occurs within the scope of the current context.
Fails if the object to be copied does not exist, if an object of name nameB already exists, or if there is a security violation.
MOVE TYPE(nameA) TYPE(nameB) Moves (renames) the administered object of type TYPE, having the name nameA, to nameB. This all occurs within the scope of the current context.
Fails if the object to be moved does not exist, if an object of name nameB already exists, or if there is a security violation.

Creating objects

Objects are created and stored in a JNDI namespace using the following command syntax:

DEFINE TYPE(name) [property]*

That is, the DEFINE verb, followed by a TYPE(name) administered object reference, followed by zero or more properties (see Properties).

LDAP naming considerations

To store your objects in an LDAP environment, their names must comply with certain conventions. One of these is that object and subcontext names must include a prefix, such as cn= (common name), or ou= (organizational unit).

The administration tool simplifies the use of LDAP service providers by allowing you to refer to object and context names without a prefix. If you do not supply a prefix, the tool automatically adds a default prefix to the name you supply. For LDAP this is cn=.

You can change the default prefix by setting the NAME_PREFIX property in the JMSAdmin configuration file, as described in Using an unlisted InitialContextFactory.

This is shown in the following example.

InitCtx> DEFINE Q(testQueue)
 
InitCtx> DISPLAY CTX
 
    Contents of InitCtx
 
      a  cn=testQueue              com.ibm.mq.jms.MQQueue
 
     1 Object(s)
       0 Context(s)
       1 Binding(s), 1 Administered

Note that although the object name supplied (testQueue) does not have a prefix, the tool automatically adds one to ensure compliance with the LDAP naming convention. Likewise, submitting the command DISPLAY Q(testQueue) also causes this prefix to be added.

You may need to configure your LDAP server to store Java objects. Information to assist with this configuration is provided in Appendix C, LDAP schema definition for storing Java objects.

Properties

A property consists of a name-value pair in the format:

PROPERTY_NAME(property_value)

Property names are not case-sensitive, and are restricted to the set of recognized names shown in Table 11. This table also shows the valid property values for each property.

Table 11. Property names and valid values

Property Short form Valid values (defaults in bold)
BROKERCCDSUBQ CCDSUB
  • SYSTEM.JMS.D.CC.SUBSCRIPTION.QUEUE
  • Any string

BROKERCCSUBQ CCSUB
  • SYSTEM.JMS.ND.CC.SUBSCRIPTION.QUEUE
  • Any string

BROKERCONQ BCON Any string
BROKERDURSUBQ BDSUB
  • SYSTEM.JMS.D.SUBSCRIPTION.QUEUE
  • Any string

BROKERPUBQ BPUB
  • SYSTEM.BROKER.DEFAULT.STREAM
  • Any string

BROKERQMGR BQM Any string
BROKERSUBQ BSUB
  • SYSTEM.JMS.ND.SUBSCRIPTION.QUEUE
  • Any string

BROKERVER BVER
  • V1 - To use the WebSphere MQ broker. Also for use of the WebSphere MQ Integrator V2 or WebSphere MQ Event Broker brokers in compatibility mode.
  • V2 - To use WebSphere MQ Integrator V2 or WebSphere MQ Event Broker brokers in native mode

CCSID CCS Any positive integer
CHANNEL CHAN Any string
CLEANUP CL
  • SAFE
  • ASPROP
  • NONE
  • STRONG

CLEANUPINT CLINT
  • 60000
  • Any positive integer

CLIENTID CID Any string
DESCRIPTION DESC Any string
ENCODING ENC See The ENCODING property
EXPIRY EXP
  • APP - Expiry may be defined by the JMS application.
  • UNLIM - No expiry occurs.
  • Any positive integer representing expiry in milliseconds.

HOSTNAME HOST
  • localhost
  • Any string

MSGBATCHSZ MBS
  • 10
  • Any positive integer

MSGRETENTION MRET
  • Yes - Unwanted messages remain on the input queue
  • No - Unwanted messages are dealt with according to their disposition options

PERSISTENCE PER
  • APP - Persistence may be defined by the JMS application.
  • QDEF - Persistence takes the value of the queue default.
  • PERS - Messages are persistent.
  • NON - messages are non-persistent.

POLLINGINT PINT
  • 5000
  • Any positive integer

PORT
  • 1414 (for TRANSPORT set to BIND or CLIENT); 1506 (for TRANSPORT set to DIRECT)
  • Any positive integer

PRIORITY PRI
  • APP - Priority may be defined by the JMS application.
  • QDEF - Priority takes the value of the queue default.
  • Any integer in the range 0-9.

PUBACKINT PAI
  • 25
  • Any positive integer

QMANAGER QMGR Any string
QUEUE QU Any string
RECEXIT RCX Any string
RECEXITINIT RCXI Any string
SECEXIT SCX Any string
SECEXITINIT SCXI Any string
SENDEXIT SDX Any string
SENDXITINIT SDXI Any string
SSLCIPHERSUITE SCPHS
SSLCRL SCRL
SSLPEERNAME SPEER
STATREFRESHINT SRI
  • 60000
  • Any positive integer

SUBSTORE SS
  • MIGRATE
  • QUEUE
  • BROKER

SYNCPOINTALLGETS SPAG
  • No
  • Yes

TARGCLIENT TC
  • JMS - The target of the message is a JMS application.
  • MQ - The target of the message is a non-JMS, traditional WebSphere MQ application.

TEMPMODEL TM Any string
TOPIC TOP Any string
TRANSPORT TRAN
  • BIND - Connections use WebSphere MQ bindings.
  • CLIENT - For a client connection
  • DIRECT - For direct connection to WebSphere MQ Event Broker broker

USECONNPOOLING UCP
  • Yes
  • No

Many of the properties are relevant only to a specific subset of the object types. Table 12 shows for each property which object types are valid, and gives a brief description of each property. The object types are identified using keywords; refer to Table 9 for an explanation of these.

Numbers refer to notes at the end of the table. See also Property dependencies. Appendix A, Mapping between Administration tool properties and programmable properties shows the relationship between properties set by the tool and programmable properties.


Table 12. The valid combinations of property and object type

Property QCF TCF Q T WSQCF
XAQCF
WSTCF
XATCF
Description
BROKERCCDSUBQ


Y

The name of the queue from which durable subscription messages are retrieved for a ConnectionConsumer
BROKERCCSUBQ
Y


Y The name of the queue from which non-durable subscription messages are retrieved for a ConnectionConsumer
BROKERCONQ
Y


Y Broker's control queue name
BROKERDURSUBQ


Y

The name of the queue from which durable subscription messages are retrieved
BROKERPUBQ
Y


Y The name of the broker input queue (stream queue)
BROKERQMGR
Y


Y The queue manager on which the broker is running
BROKERSUBQ
Y


Y The name of the queue from which non-durable subscription messages are retrieved
BROKERVER
Y(ADNL1D)
Y
Y The version of the broker being used
CCSID Y Y Y Y

The coded-character-set-ID to be used on connections
CHANNEL Y Y



The name of the client connection channel being used
CLEANUP
Y


Y Cleanup Level for BROKER or MIGRATE Subscription Stores
CLEANUPINT
Y


Y The interval between background executions of the publish/subscribe cleanup utility
CLIENTID Y Y(ADNL1D)

Y Y A string identifier for the client
DESCRIPTION Y Y(ADNL1D) Y Y Y Y A description of the stored object
ENCODING

Y Y

The encoding scheme used for this destination
EXPIRY

Y Y

The period after which messages at a destination expire
HOSTNAME(ADNL1C) Y Y(ADNL1D)



The name of the host on which the queue manager or WebSphere MQ Event Broker broker resides. A dotted-decimal TCP/IP address can also be used.
MSGBATCHSZ Y Y

Y Y The maximum number of messages to be taken from a queue in one packet when using asynchronous message delivery
MSGRETENTION Y


Y
Whether or not the connection consumer keeps unwanted messages on the input queue
PERSISTENCE

Y Y

The persistence of messages sent to a destination
PRIORITY

Y Y

The priority for messages sent to a destination
POLLINGINT Y Y

Y Y The interval, in milliseconds, between scans of all receivers during asynchronous message delivery
PORT(ADNL1C) Y Y(ADNL1D)



The port on which the queue manager or broker listens
PUBACKINT
Y


Y The interval, in number of messages, between publish requests that require acknowledgement from the broker
QMANAGER Y Y Y
Y Y The name of the queue manager to connect to
QUEUE

Y


The underlying name of the queue representing this destination
RECEXIT Y Y



Fully-qualified class name of the receive exit being used
RECEXITINIT Y Y



Receive exit initialization string
SECEXIT Y Y



Fully-qualified class name of the security exit being used
SECEXITINIT Y Y



Security exit initialization string
SENDEXIT Y Y



Fully-qualified class name of the send exit being used
SENDEXITINIT Y Y



Send exit initialization string
SSLCIPHERSUITE Y Y



The cipher suite to use for SSL connection
SSLCRL Y Y



CRL servers to check for SSL certificate revocation
SSLPEERNAME Y Y



For SSL, a distinguished name skeleton which must match that provided by the queue manager
STATREFRESHINT
Y


Y The interval, in milliseconds, between transactions to refresh publish/subscribe status
SUBSTORE
Y


Y Where WebSphere MQ JMS should store persistent data relating to active subscriptions
SYNCPOINTALLGETS Y Y

Y Y Whether or not all gets should be performed under syncpoint
TARGCLIENT(ADNL1B)

Y Y

Field indicates whether the WebSphere MQ RFH2 format is used to exchange information with target applications
TEMPMODEL Y


Y
Name of the model queue from which temporary queues are created
TOPIC


Y

The underlying name of the topic representing this destination
TRANSPORT(ADNL1C) Y Y(ADNL1D)

Y(ADNL1A) Y(ADNL1A) Whether connections will use the WebSphere MQ Bindings, a client connection, or WebSphere MQ Event Broker.
USECONNPOOLING Y Y

Y Y Whether or not connection pooling should be used

Notes:

  1. For WSTCF, WSQCF, XATCF, and XAQCF objects, only the BIND transport type is allowed.

  2. The TARGCLIENT property indicates whether the WebSphere MQ RFH2 format is used to exchange information with target applications.

    The MQJMS_CLIENT_JMS_COMPLIANT constant indicates that the RFH2 format is used to send information. Applications that use WebSphere MQ JMS understand the RFH2 format. You should set the MQJMS_CLIENT_JMS_COMPLIANT constant when you exchange information with a target WebSphere MQ JMS application.

    The MQJMS_CLIENT_NONJMS_MQ constant indicates that the RFH2 format is not used to send information. Typically, this value is used for an existing WebSphere MQ application (that is, one that does not handle RFH2).

  3. HOSTNAME, PORT, and TRANSPORT are also used to identify if you are connecting to WebSphere MQ Event Broker and the broker's IP hostname and listening port.

    For more information about using WebSphere MQ Event Broker, see Chapter 11, Programming publish/subscribe applications.

  4. Only the BROKERVER, CLIENTID, DESCRIPTION, HOSTNAME, PORT, and TRANSPORT properties are supported for a TopicConnectionFactory used with a direct connection across TCP/IP to WebSphere MQ Event Broker.

Property dependencies

Some properties have dependencies on each other. This may mean that it is meaningless to supply a property unless another property is set to a particular value. The specific property groups where this can occur are

Client properties
Some properties are only relevant to a connection with the TRANSPORT property set to the value CLIENT. If this property is not explicitly set on a connection factory to one of the values CLIENT or DIRECT, the transport used on connections provided by the factory is WebSphere MQ Bindings. Consequently, none of the client properties on this connection factory can be configured. These are:

  • HOST
  • PORT
  • CHANNEL
  • CCSID
  • RECEXIT
  • RECEXITINIT
  • SECEXIT
  • SECEXITINIT
  • SENDEXIT
  • SENDEXITINIT
  • SSLCIPHERSUITE
  • SSLCRL
  • SSLPEERNAME

If you attempt to set any of these properties without setting the TRANSPORT property to CLIENT (or, for some, DIRECT; see Properties for connecting to WebSphere MQ Event Broker) , there will be an error.

Properties for connecting to WebSphere MQ Event Broker

The only properties used with a direct connection to WebSphere MQ Event Broker are listed in note (ADNL1D) associated with Table 12.

The default values for PORT and BROKERVER are set by the definition of TRANSPORT:

  1. Defining a connection factory with TRANSPORT as CLIENT sets:
    • BROKERVER to V1
    • PORT to 1414
  2. Defining a connection factory with TRANSPORT as DIRECT sets:
    • BROKERVER to V2
    • PORT to 1506

If you explicitly set the value of PORT or BROKERVER, a later change to the value of TRANSPORT will not override your choices.

Exit initialization strings
You must not set any of the exit initialization strings unless the corresponding exit name has been supplied. The exit initialization properties are:

For example, specifying RECEXITINIT(myString) without specifying RECEXIT(some.exit.classname) causes an error.

The ENCODING property

The valid values that the ENCODING property can take are more complex than the rest of the properties. The encoding property is constructed from three sub-properties:

integer encoding
this is either normal or reversed

decimal encoding
this is either normal or reversed

floating-point encoding
this is IEEE normal, IEEE reversed, or z/OS.

The ENCODING is expressed as a three-character string with the following syntax:

{N|R}{N|R}{N|R|3}

In this string:

This provides a set of twelve possible values for the ENCODING property.

There is an additional value, the string NATIVE, which sets appropriate encoding values for the Java platform.

The following examples show valid combinations for ENCODING:

     ENCODING(NNR)
     ENCODING(NATIVE)
     ENCODING(RR3)

SSL properties

When TRANSPORT(CLIENT) is specified, Secure Sockets Layer (SSL) encrypted communication can be enabled using the SSLCIPHERSUITE property. This property must be set to a valid CipherSuite provided by your JSSE provider; and needs to match the CipherSpec named on the SVRCONN channel named by the CHANNEL property.

However, CipherSpecs (as specified on the SVRCONN channel) and CipherSuites (as specified on ConnectionFactory objects) use different naming schemes to represent the same SSL encryption algorithms. If a recognised CipherSpec name is specified on the SSLCIPHERSUITE property, JMSAdmin will issue a warning and map the CipherSpec to its equivalent CipherSuite. See Appendix H, SSL CipherSuites supported by WebSphere MQ for a list of CipherSpecs recognised by WebSphere MQ and JMSAdmin.

The SSLPEERNAME matches the format of the SSLPEER parameter which can be set on channel definitions. It is a list of attribute name and value pairs separated by commas or semicolons. For example:

  SSLPEERNAME(CN=QMGR.*, OU=IBM, OU=WEBSPHERE)

The set of names and values makes up a distinguished name. For more details about distinguished names and their use with WebSphere MQ, see the WebSphere MQ Security book.

The example given will cause the identifying certificate presented by the server to be checked at connect-time. For the connection to succeed, the certificate must have a Common Name beginning "QMGR.", and must have at least two Organizational Unit names, the first of which must be "IBM" and the second "WEBSPHERE". Checking is case-insensitive.

If SSLPEERNAME is not set, no such checking is performed. Note that SSLPEERNAME is ignored if SSLCIPHERSUITE is not specified.

The SSLCRL property specifies zero or more CRL (Certificate Revocation List) servers. Use of this property requires a JVM at Java 2 v1.4. This is a space-delimited list of entries of the form:

  ldap://hostname:[port]

optionally followed by a single "/". If port is omitted, the default LDAP port of 389 is assumed. At connect-time, the SSL certificate presented by the server is checked against the specified CRL servers. See the WebSphere MQ Security book for more about CRL security.

If SSLCRL is not set, no such checking is performed. Note that SSLCRL is ignored if SSLCIPHERSUITE is not specified.

Sample error conditions

This section provides examples of the error conditions that may arise during the creation of an object.

CipherSpec mapped to CipherSuite
InitCtx/cn=Trash> DEFINE QCF(testQCF) SSLCIPHERSUITE(RC4_MD5_US)
  WARNING: Converting CipherSpec RC4_MD5_US to 
  CipherSuite SSL_RSA_WITH_RC4_128_MD5

Invalid property for object
InitCtx/cn=Trash> DEFINE QCF(testQCF) PRIORITY(4)
  Unable to create a valid object, please check the parameters supplied
  Invalid property for a QCF: PRI

Invalid type for property value
InitCtx/cn=Trash> DEFINE QCF(testQCF) CCSID(english)
  Unable to create a valid object, please check the parameters supplied
  Invalid value for CCS property: English

Property clash - client/bindings
InitCtx/cn=Trash> DEFINE QCF(testQCF) HOSTNAME(polaris.hursley.ibm.com)
  Unable to create a valid object, please check the parameters supplied
  Invalid property in this context: Client-bindings attribute clash

Property clash - Exit initialization
InitCtx/cn=Trash> DEFINE QCF(testQCF) SECEXITINIT(initStr)
  Unable to create a valid object, please check the parameters supplied
  Invalid property in this context: ExitInit string supplied
  without Exit string

Property value outside valid range
InitCtx/cn=Trash> DEFINE Q(testQ) PRIORITY(12)
  Unable to create a valid object, please check the parameters supplied
  Invalid value for PRI property: 12

Unknown property
InitCtx/cn=Trash> DEFINE QCF(testQCF) PIZZA(ham and mushroom)
  Unable to create a valid object, please check the parameters supplied
  Unknown property: PIZZA


© IBM Corporation 1997, 2002. All Rights Reserved