ie.nuigalway.ecrg.jade.jmsagentgateway
Class JMS_Util

java.lang.Object
  |
  +--ie.nuigalway.ecrg.jade.jmsagentgateway.JMS_Util

public class JMS_Util
extends java.lang.Object

General utility class for JMS Interactions

Version:
0.5 12 January 2004
Author:
Edward Curry

Field Summary
private static java.util.HashMap brokerConnections
           
private static org.apache.log4j.Category log
           
 
Constructor Summary
JMS_Util()
           
 
Method Summary
static void closeBrokerConnections()
          Close all connections in the hashmap
static javax.jms.Connection getBrokerConnection(ProviderInfo proInfo)
          Used to create a new broker connection or to retrive one from the hashmap
static void setupBrokerConnection(ProviderInfo proInfo)
          Create a connection to a specified broker and place it in the hashmap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

brokerConnections

private static java.util.HashMap brokerConnections

log

private static org.apache.log4j.Category log
Constructor Detail

JMS_Util

public JMS_Util()
Method Detail

getBrokerConnection

public static javax.jms.Connection getBrokerConnection(ProviderInfo proInfo)
                                                throws java.lang.Exception
Used to create a new broker connection or to retrive one from the hashmap

Parameters:
proInfo - Description of the Parameter
Returns:
QueueConnection A Connection object for the broker
Throws:
java.lang.Exception - Error During Connection Activation

setupBrokerConnection

public static void setupBrokerConnection(ProviderInfo proInfo)
                                  throws java.lang.Exception
Create a connection to a specified broker and place it in the hashmap

Parameters:
proInfo - Server information for connection
Throws:
java.lang.Exception - Error during connection setup

closeBrokerConnections

public static void closeBrokerConnections()
Close all connections in the hashmap