Point-to-point verification with JNDI
To run the IVT with JNDI, the LDAP server must be running and must be configured to accept Java™ objects. If the following message occurs, it indicates that there is a connection to the LDAP server, but that the server is not correctly configured:
Unable to bind to objectThis message means that either the server is not storing Java objects, or the permissions on the objects or the suffix are not correct. For more help in this situation, see the documentation for your LDAP server.Also, the following administered objects must be retrievable from a JNDI namespace:
- MQQueueConnectionFactory
- MQQueue
A script, named IVTSetup on UNIX, or IVTSetup.bat on Windows systems, is provided to create these objects automatically. Enter the command:
IVTSetupThe script invokes the WebSphere MQ JMS Administration tool (see Using the WebSphere MQ JMS administration tool) and creates the objects in a JNDI namespace.
The MQQueueConnectionFactory is bound under the name ivtQCF (for LDAP, cn=ivtQCF). All the properties are default values:
TRANSPORT(BIND) PORT(1414) HOSTNAME(localhost) CHANNEL(SYSTEM.DEF.SVRCONN) VERSION(1) CCSID(819) TEMPMODEL(SYSTEM.DEFAULT.MODEL.QUEUE) QMANAGER()The MQQueue is bound under the name ivtQ (cn=ivtQ). The value of the QUEUE property becomes QUEUE(SYSTEM.DEFAULT.LOCAL.QUEUE). All other properties have default values:
PERSISTENCE(APP) QUEUE(SYSTEM.DEFAULT.LOCAL.QUEUE) EXPIRY(APP) TARGCLIENT(JMS) ENCODING(NATIVE) VERSION(1) CCSID(1208) PRIORITY(APP) QMANAGER()Once the administered objects are created in the JNDI namespace, run the IVTRun (IVTRun.bat on Windows systems) script using the following command:
IVTRun [ -t ] -url "<providerURL>" [ -icf <initCtxFact> ]where:
- -t
- turns 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.LdapCtxFactoryIf a file system service provider is used, set this parameter to:
com.sun.jndi.fscontext.RefFSContextFactoryIf the test completes successfully, the output is similar to the non-JNDI output, except that the create QueueConnectionFactory and Queue lines indicate retrieval of the object from JNDI. The following shows an example.
5724-H72, 5655-L82, 5724-L26 (c) Copyright IBM Corp. 2002,2005. All Rights Reserved. Websphere MQ classes for Java(tm) Message Service 6.0 Installation Verification Test Using administered objects, please ensure that these are available Retrieving a QueueConnectionFactory from JNDI Creating a Connection Creating a Session Retrieving a Queue from JNDI Creating a QueueSender Creating a QueueReceiver Creating a TextMessage Sending the message to SYSTEM.DEFAULT.LOCAL.QUEUE Reading the message back again Got message: JMS Message class: jms_text JMSType: null ... ...Although not strictly necessary, it is good practice to remove objects that are created by the IVTSetup script from the JNDI namespace. A script called IVTTidy (IVTTidy.bat on Windows systems) is provided for this purpose.
uj10700_