JTR 5.0 API Documentation

jtr.jms
Class JMSHelper

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

public class JMSHelper
extends java.lang.Object

This helper class performs the injection of the following JMS related objects into a concrete runner implementing the IRunnerJMS interface:
1. queues
2. topics
3. connection factories
4. connections
5. sessions
The information required for performing these steps is retrieved from the jms configuration associated with the current runner.
The attributes named property that you can find into the jms section of the jtr.xml file refers to the name of the properties your runner bean should expose.

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

Constructor Summary
JMSHelper()
           
 
Method Summary
static void inject(IRunner target, JMSConfig jmsConfig)
          Performs the injection of all the JMS related objects into the given runner.
Note: you are not required to invoke this method from your concrete IRunner implementation: the JTR runtime will take care for you.
protected static void injectConnectionFactories(IRunner target, JMSConfig jmsConfig)
           
protected static void injectConnections(IRunner target, JMSConnectionFactory jmscf, javax.jms.ConnectionFactory cf, java.lang.String configKey)
           
protected static void injectQueues(IRunner target, JMSConfig jmsConfig)
           
protected static void injectQueueSessions(IRunner target, JMSConnection jmsc, javax.jms.QueueConnection qc)
           
protected static void injectTopics(IRunner target, JMSConfig jmsConfig)
           
protected static void injectTopicSessions(IRunner target, JMSConnection jmsc, javax.jms.TopicConnection tc)
           
protected static void injectXAQueueSessions(IRunner target, JMSConnection jmsc, javax.jms.XAQueueConnection xaqc)
          injectXAQueueSessions
protected static void injectXATopicSessions(IRunner target, JMSConnection jmsc, javax.jms.XATopicConnection xatc)
          injectXATopicSessions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JMSHelper

public JMSHelper()
Method Detail

inject

public static void inject(IRunner target,
                          JMSConfig jmsConfig)
                   throws JMSInjectionException
Performs the injection of all the JMS related objects into the given runner.
Note: you are not required to invoke this method from your concrete IRunner implementation: the JTR runtime will take care for you.

Parameters:
target - The concrete IRunner to be injected
jmsConfig - The JMS configuration associated with the above IRunner
Throws:
JMSInjectionException - Something went wrong during the injection

injectQueues

protected static void injectQueues(IRunner target,
                                   JMSConfig jmsConfig)
                            throws JMSInjectionException,
                                   LocatorException,
                                   java.lang.IllegalAccessException,
                                   java.lang.reflect.InvocationTargetException
Throws:
JMSInjectionException
LocatorException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

injectTopics

protected static void injectTopics(IRunner target,
                                   JMSConfig jmsConfig)
                            throws JMSInjectionException,
                                   LocatorException,
                                   java.lang.IllegalAccessException,
                                   java.lang.reflect.InvocationTargetException
Throws:
JMSInjectionException
LocatorException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException

injectConnectionFactories

protected static void injectConnectionFactories(IRunner target,
                                                JMSConfig jmsConfig)
                                         throws LocatorException,
                                                java.lang.reflect.InvocationTargetException,
                                                java.lang.IllegalAccessException,
                                                java.lang.IllegalAccessException,
                                                java.lang.reflect.InvocationTargetException,
                                                JMSInjectionException,
                                                javax.jms.JMSException
Throws:
LocatorException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
JMSInjectionException
javax.jms.JMSException

injectConnections

protected static void injectConnections(IRunner target,
                                        JMSConnectionFactory jmscf,
                                        javax.jms.ConnectionFactory cf,
                                        java.lang.String configKey)
                                 throws javax.jms.JMSException,
                                        JMSInjectionException,
                                        java.lang.reflect.InvocationTargetException,
                                        java.lang.IllegalAccessException
Throws:
javax.jms.JMSException
JMSInjectionException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException

injectXATopicSessions

protected static void injectXATopicSessions(IRunner target,
                                            JMSConnection jmsc,
                                            javax.jms.XATopicConnection xatc)
                                     throws javax.jms.JMSException,
                                            java.lang.reflect.InvocationTargetException,
                                            java.lang.IllegalAccessException
injectXATopicSessions

Parameters:
target - IRunner
jmsc - JMSConnection
xatc - XATopicConnection
Throws:
javax.jms.JMSException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException

injectXAQueueSessions

protected static void injectXAQueueSessions(IRunner target,
                                            JMSConnection jmsc,
                                            javax.jms.XAQueueConnection xaqc)
                                     throws javax.jms.JMSException,
                                            java.lang.reflect.InvocationTargetException,
                                            java.lang.IllegalAccessException
injectXAQueueSessions

Parameters:
target - IRunner
jmsc - JMSConnection
xaqc - XAQueueConnection
Throws:
javax.jms.JMSException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException

injectQueueSessions

protected static void injectQueueSessions(IRunner target,
                                          JMSConnection jmsc,
                                          javax.jms.QueueConnection qc)
                                   throws javax.jms.JMSException,
                                          java.lang.reflect.InvocationTargetException,
                                          java.lang.IllegalAccessException
Throws:
javax.jms.JMSException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException

injectTopicSessions

protected static void injectTopicSessions(IRunner target,
                                          JMSConnection jmsc,
                                          javax.jms.TopicConnection tc)
                                   throws javax.jms.JMSException,
                                          java.lang.reflect.InvocationTargetException,
                                          java.lang.IllegalAccessException
Throws:
javax.jms.JMSException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException

The JTR Project is licensed under GPL version 2