Category: JMS options


What's the configuration for nirvana from C++?


When configuring the runtime for use with nirvana you should try the following configuration. We have tested this configuration with nirvana JMS v3.1.4177. The following lookup names are created when you instruct nirvana to set up a sample JMS environment via the supplied menuitem:

Item Lookup name
Queue connection factory QueueConnectionFactory
Queue for testing testqueue
Topic connection factory TopicConnectionFactory
Topic for testing testtopic

The following sections provide example snippets for configuring the runtime for nirvana as a JMS provider for your C++ application. Please use the platform-appropriate path separator as more than one jar file is required at runtime.


xmog_jvm_loader & loader = xmog_jvm_loader::get_jvm_loader();
// ------------------------------------------------------------------
// you have to add one jar file to the classpath
loader.appendToClassPath( "<FQN of jms.jar>;<FQN of nJMSClient.jar>" );

// ------------------------------------------------------------------
// you have configure the JNDI setup
loader.setDashDOption( "java.naming.factory.initial",
                       "com.pcbsys.nirvana.nSpace.NirvanaContextFactory" );
// this assumes swiftmq default setup running on localhost
loader.setDashDOption( "java.naming.provider.url",
                       "nsp://" );

Configuration File


      <Loader name="Default" />
        <!-- set the classpath so it's right for the JMS provider           -->
        <!-- make sure that the fileseparator is correct for your platform  -->
        <add key="ClassPath" 
             value="C:\Nirvana JMS 3.1.4177\lib\jms.jar;C:\Nirvana JMS 3.1.4177\lib\nJMSClient.jar;" />

        <!-- here we configure the JNDI options for our JMS vendor          -->
        <add key="java.naming.factory.initial" value="com.pcbsys.nirvana.nSpace.NirvanaContextFactory" />
        <add key="java.naming.provider.url" value="nsp://" />
        <!-- uncomment the security options if you set username and password on the context --?
        <!--add key="" value="simple" />
        <add key="" value="simple" /-->


Copyright 2006-2011 by Codemesh, Inc., ALL RIGHTS RESERVED

frequently asked questions
home products support customers partners newsroom about us contact us