Creating a JMS InitialContext object

A JMS client application must instantiate a JMS InitialContext object and set these properties:

When instantiating a JMS InitialContext from a base client, specify the user name with the SECURITY_PRINCIPAL property, and specify the password with the SECURITY_CREDENTIALS property. The default for both properties is an empty string.

This example runs the JMS client application JMSClientClass and sets the InitialContext factory, URL, user name, and password properties at runtime:

java -D java.naming.factory.initial=com.sybase.jms.InitialContextFactory 
-Djava.naming.provider.url=iiop://stack:9000 
-DSECURITY_PRINCIPAL=”jagadmin” -DSECURITY_CREDENTIALS=”sybase”
JMSClientClass