Publish/subscribe verification with JNDI

 

To run the PSIVT in JNDI mode, two administered objects must be retrievable from a JNDI namespace:

We can define these objects by using the WebSphere MQ JMS Administration Tool (see Using the WebSphere MQ JMS administration tool) and using the following commands:

DEFINE TCF(ivtTCF)
This command defines the TopicConnectionFactory.
DEFINE T(ivtT) TOPIC(MQJMS/PSIVT/Information)
This command defines the Topic.

These definitions assume that a default queue manager, on which the broker is running, is available. For details on configuring these objects to use a non-default queue manager, see Administering JMS objects. These objects must reside in a context pointed to by the -url command-line parameter described below.

To run the test in JNDI mode...

PSIVTRun [ -t ]  -url "<providerURL>" [ -icf <initCtxFact> ]
where:

-t

means turn tracing on (by default, tracing is off)

providerURL

Enclose the providerURL string in quotation marks ("). This is the JNDI location of the administered objects. If the default initial context factory is in use, this is an LDAP URL of the form:

"ldap://hostname.company.com/contextName"

If a file system service provider is used, (see initCtxFact below), the URL is of the form:

"file://directorySpec"

initCtxFact

is the classname of the initial context factory. The default is for an LDAP service provider, and has the value:
com.sun.jndi.ldap.LdapCtxFactory

If a file system service provider is used, set this parameter to:

com.sun.jndi.fscontext.RefFSContextFactory

If the test completes successfully, output is similar to the non-JNDI output, except that the create QueueConnectionFactory and Queue lines indicate retrieval of the object from JNDI.


uj10740_