Java SOAP/WebSphere MQ listener
The Java(TM) SOAP/WebSphere MQ listener is implemented in the class com.ibm.mq.soap.axis.transport.jms.SimpleJavaListener.
The Java SOAP/WebSphere MQ listener calling syntax is:
java com.ibm.mq.soap.axis.transport.jms.SimpleJavaListener -u wmqUri
-a [LowMsgIntegrity|HighMsgIntegrity|DefaultMsgIntegrity] [-d msecs]
[-i passContext|ownContext] [-n numListenerThreads] [-v]
[-x none|onePhase|twoPhase] [-?]
where
- -u
- Specifies the URI of the service to be invoked. This parameter is required.
- -a
- Allows the default behavior to be customized when it is not possible
to write a failed request message to the dead letter queue.
- DefaultMsgIntegrity
- For non-persistent messages, the listener displays a warning message
and continues to execute with the original message being discarded. For persistent
messages, it displays an error message, backs out the request message so it
remains on the request queue and exits. This default mode applies if the -a
flag is omitted, or if it is specified with no option.
- LowMsgIntegrity
- For both persistent and non-persistent messages, the listener displays
a warning and continues to execute, discarding the message.
- HighMsgIntegrity
- For both persistent and non-persistent messages, the listener displays
an error message, backs out the request message so it remains on the request
queue and exits. This mode is mutually exclusive with the -x none option.
If these options are both specified, the listener displays an error message
and exit.
- -d
- Time, in milliseconds, for the SOAP/WebSphere MQ listener to stay alive after
no request messages have been received (on any thread, if you
are running multiple threads). If set to -1, the listener stays alive
indefinitely. This is the default.
- -i
- Specifies whether or not the listener should attempt to pass identity
context.
- passContext
- The listener uses the sender's context. This is the default.
- owncontext
- The listener uses the context under which it was started
For more details of context passing, see Context.
- -n
- Specifies the number of SOAP/WebSphere MQ listener threads required. The default
is 10.
- -v
- Display warning messages if any of the following options are specified
in the -u argument:
- reply to queue
- timeout
- expiry
- persistence
- priority
- targetService
These options apply only to SOAP/WebSphere MQ clients.
If you use the same URI for the listener and don't want to be
warned that you are using redundant parameters, omit the -v parameter
to suppress the warning messages. Whether or not -v is set or
warning messages are output, the listener executes as normal.
- -x
- Indicates what form of transactional control the listener should run
under. Options can be set on this flag as follows:
- onePhase
- WebSphere MQ one-phase support is used. If the system fails during processing,
the request message can be redelivered to the application. WebSphere MQ transactions
assure that the message is written exactly once. This is the default.
- twoPhase
- Two-phase support is used. This is based on WebSphere MQ coordination. As long
as other resources are coordinated resource managers and the service is written
appropriately the message is delivered exactly once with a single committed
execution of the service. This option applies only to server bindings (see The connectionFactory parameter).
- none
- No transactional support. If the system fails during processing, the
request message might be lost, even if it is persistent. The service might
or might not have executed, and response, report or dead-letter queue messages
might or might not have been written. If the -x none option
is used, then the "-a LowMsgIntegrity" option is mandated and the listener
exits on start-up with an error message if the latter is not specified.
The queue of the URI determines the queue that the listener
will monitor for service requests. If you are starting the listener manually,
you normally run this command from a command prompt. The CLASSPATH should
first be correctly set up by invoking the amqwsetcp.sh script.
The Axis configuration directory defaults to the current working directory
and the Axis configuration filename defaults to server-config.wsdd.
- -?
- Provide a usage statement. The usage statement is displayed and the
listener then exits.
For example:
java com.ibm.mq.soap.transport.jms.SimpleJavaListener
-u "jms:/queue?destination=myQ&connectionFactory=()
&initialContextFactory=com.ibm.mq.jms.Nojndi"
-n 20
In the above example, the Java virtual machine is invoked to run
the program com.ibm.mq.soap.transport.jms.SimpleJavaListener.
Two arguments are supplied, the WebSphere MQ URI, which is identified with the -u
qualifier, and the number of listener threads to start, which is identified
with the -n parameter. The URI has the same form as for the client, but is
used in a slightly different way. Optional values in the URI can be used
to control the way the connection occurs (client/server bindings, which queue manager, and so on). These are: connectQueueManager,
binding, clientChannel, clientConnection, sslCipherSuite, sslPeerName, sslKeyResetCount,
sslKeyStore, sslKeystorePassword, ssFipsRequired, sslTrustStore,
sslTrustStorePassword, and sslLDAPCRLServers. Other optional values
in the URI are only relevant to clients and are ignored, but a warning message can be issued; see the explanation of the
-v parameter.