Glossary:
Nirvana JMS - JMSAdmin
Nirvana's Enterprise Manager tool, provides full integrated support for JNDI using the same Nirvana Channel based context used by the JMSAdmin example. For more information on this, please click here.
The example (jmsdmin.Java) source code demonstrates how to store Nirvana's JMS components into a JNDI service provider. The default service provider for the example Nirvana's own Nirvana Context to store JMS objects references, however any JNDI contect provider can be used, from LDAP through to NIS. The Nirvana context is discussed in more detail here. The Nirvana Context stores references in a channel called /naming/defaultContext.
JMSAdmin creates all requried resources on a Nirvana realm. Example usage is as follows:
Java -DRNAME [-DPRINCIPAL] [-DPASSWORD] -DCONTEXT_FACTORY -DPROVIDER_URL JMSAdmin bind | unbind | list | queueFactory | topicFactory |connectionFactory | queue | topic name / alias
where :
As an example assume we want to create a TOPIC called rates on a Nirvana realm running on our local machine. Typing:
Will create an event in the /naming/defaultContext channel with the following information in the event properties of the event:
The topic rates will automatically be created on the Nirvana realm running on the PROVIDER_URL value. Assuming you wish to reference your local realm as a TopicConnectionFactory named TopicConnectionFactory in JMS use the following command:
This will publish an event to the naming/defaultContext channel with the following information in the event dictionary:
Creating a queue can be achieved using the following command:
Likewise a JMS Queue connection factory called QueueConnectionFactory can be bound into a name space using the following command
Having run both queue related commands the naming/defaultContext channel will contain 4 events, each one pertaining to the 4 objects that have been bound, TopicConnectionFactory, QueueConnectionFactory, rates and movie. The NirvanaContext used with your JMS application will now be able to lookup these objects and use them within your application. |
