JTR 5.0 API Documentation

jtr.jms
Class AdministeredObjectsLocator

java.lang.Object
  extended by jtr.jms.AdministeredObjectsLocator

public class AdministeredObjectsLocator
extends java.lang.Object

This static class exposes methods useful for retrieving JMS administered objects.
They include:
1. ConnectionFactory
2. QueueConnectionFactory
3. TopicConnectionFactory
4. Destination
5. Queue
6. Topic
The retrieval is based on the information provided with the enterprise jtr-configuration element.

Since:
1.1
Version:
5.0
Author:
Francesco Russo (frusso@dev.java.net)

Constructor Summary
AdministeredObjectsLocator()
           
 
Method Summary
static javax.jms.ConnectionFactory getConnectionFactory(java.lang.String jndiName, java.util.Hashtable environment)
          Retrieves a ConnectionFactory using the provided JNDI name.
The initial context is created according to the input environment: it represents the set of properties specified into the enterprise element of the jtr.xml configuration file the current IRunner concrete implementation refers to.
Note: this method returns ConnectionFactory instances, so you should cast them to whatever you might actually need (QueueConnectionFactory, TopicConnectionFactory).
static javax.jms.Destination getDestination(java.lang.String jndiName, java.util.Hashtable environment)
          Retrieves a Destination using the provided JNDI name.
The initial context is created according to the input environment: it represents the set of properties specified into the enterprise element of the jtr.xml configuration file the current IRunner concrete implementation refers to.
Note: this method returns Destination instances, so you should cast them to whatever you might actually need (Queue, Topic).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdministeredObjectsLocator

public AdministeredObjectsLocator()
Method Detail

getConnectionFactory

public static javax.jms.ConnectionFactory getConnectionFactory(java.lang.String jndiName,
                                                               java.util.Hashtable environment)
                                                        throws LocatorException
Retrieves a ConnectionFactory using the provided JNDI name.
The initial context is created according to the input environment: it represents the set of properties specified into the enterprise element of the jtr.xml configuration file the current IRunner concrete implementation refers to.
Note: this method returns ConnectionFactory instances, so you should cast them to whatever you might actually need (QueueConnectionFactory, TopicConnectionFactory).

Parameters:
jndiName - The actual name of the JMS administered object
environment - The set of properties required for creating the initial context
Returns:
ConnectionFactory The concrete ConnectionFactory
Throws:
LocatorException - Something went wrong while retrieving the JMS administered object

getDestination

public static javax.jms.Destination getDestination(java.lang.String jndiName,
                                                   java.util.Hashtable environment)
                                            throws LocatorException
Retrieves a Destination using the provided JNDI name.
The initial context is created according to the input environment: it represents the set of properties specified into the enterprise element of the jtr.xml configuration file the current IRunner concrete implementation refers to.
Note: this method returns Destination instances, so you should cast them to whatever you might actually need (Queue, Topic).

Parameters:
jndiName - The actual name of the JMS administered object
environment - The set of properties required for creating the initial context
Returns:
Destination The concrete Destination
Throws:
LocatorException - Something went wrong while retrieving the JMS administered object

The JTR Project is licensed under GPL version 2