org.apache.openejb.resource.activemq
Class ActiveMQFactory

java.lang.Object
  extended by org.apache.openejb.resource.activemq.ActiveMQFactory

public class ActiveMQFactory
extends Object


Constructor Summary
ActiveMQFactory()
           
 
Method Summary
static org.apache.activemq.broker.BrokerService createBroker(URI brokerURI)
           
static String getBrokerMetaFile()
          Returns the prefix metafile name of the poperties file that ActiveMQ should be provided with.
static Collection<org.apache.activemq.broker.BrokerService> getBrokers()
          Returns a map of configured brokers.
static void setThreadProperties(Properties p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActiveMQFactory

public ActiveMQFactory()
Method Detail

getBrokerMetaFile

public static String getBrokerMetaFile()
Returns the prefix metafile name of the poperties file that ActiveMQ should be provided with. This file is located at META-INF/services/org/apache/activemq/broker/ and defines the BrokerFactoryHandler to load.

Returns:
String name - will be either 'amq5factory:' or 'amq4factory:' - note the trailing ':'

setThreadProperties

public static void setThreadProperties(Properties p)

createBroker

public static org.apache.activemq.broker.BrokerService createBroker(URI brokerURI)
                                                             throws Exception
Throws:
Exception

getBrokers

public static Collection<org.apache.activemq.broker.BrokerService> getBrokers()
                                                                       throws Exception
Returns a map of configured brokers. This intended for access upon RA shutdown in order to wait for the brokers to finish.

Returns:
Map(URI, BrokerService)
Throws:
Exception - On error


Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.