What is RAJNDI?

RAJNDI is a generic connector for JMS servers of which the connection factories are obtained through JNDI

Packaging and shipping

This connector is shipped as rajndi.rar

Usage notes

JNDI names

The jndi names of the connection factories need to be specified. This can be done either as separate values in the deployment descriptor or by properties in the URL or the options field in the deployment descriptor.
NameMeaning
JMSJCA.QueueCFJNDI name of queue connection factory (javax.jms.QueueConnectionFactory)
JMSJCA.TopicCFJNDI name of topic connection factory (javax.jms.TopicConnectionFactory)
JMSJCA.UnifiedCFJNDI name of connection factory (javax.jms.ConnectionFactory)

If the property java.naming.factory.initial is specified, the InitialContext is created using the complete set of properties specified in the URL and or the options field. If the property java.naming.factory.initial is not specified, the InitialContext is created using its default constructor.

Example:

If the following properties are specified, the RAJNDI adapter will try to use STCMS connectionfactories bound in the STCMS JNDI provider.
java.naming.factory.initial=com.stc.jms.jndispi.InitialContextFactory
java.naming.provider.url=stcms://localhost:18007
java.naming.security.principal=Administrator
java.naming.security.credentials=STC
JMSJCA.TopicCF=connectionfactories/xatopicconnectionfactory
JMSJCA.QueueCF=connectionfactories/xaqueueconnectionfactory
JMSJCA.UnifiedCF=connectionfactories/xaconnectionfactory
com.stc.jms.autocommitxa=true
com.stc.jms.jndispi.disconnected=true

These properties can be specified in the Options field or be encoded in the ConnectionURL. Note that if the Options field needs to be limited to one single line, e.g. because of limitation in administrative consoles, the JMSJCA.sep option can be used. Example:

JMSJCA.sep=,java.naming.factory.initial=com.stc.jms.jndispi.InitialContextFactory,java.naming.provider.url=stcms://localhost:18007,java.naming.security. principal=Administrator,java.naming.security.credentials=STC,JMSJCA.TopicCF=connectionfactories/xatopicconnectionfactory,JMSJCA.QueueCF= connectionfactories/xaqueueconnectionfactory,JMSJCA.UnifiedCF=connectionfactories/xaconnectionfactory,com.stc.jms.autocommitxa=true,com.stc.jms. jndispi.disconnected=true

Destinations

When a destination name is prefixed with jndi:// the destination is looked up in the jndi-provider specified as described above. If this prefix is missing, the destination is created using createQueue() or createTopic().

Example:

Extending the previous example, when the destination in the activation spec is jndi://queues/Queue1, the queue Queue1 is looked up in the context queues in the JNDI provider with java.naming.provider.url=stcms://localhost:18007.

The same thing will happen if the destination is specified as lookup://q and q is an administrative object with name jndi://queues/Queue1.