org.figure8.join.core.setup
Class ActiveMQConfigurator

java.lang.Object
  extended by org.figure8.join.core.setup.ActiveMQConfigurator

public class ActiveMQConfigurator
extends java.lang.Object

Helper object for configuring ActiveMQ and its ConnectionFactory

Version:
$Revision: 1.2 $
Author:
Laurent Broudoux

Field Summary
static java.lang.String AMQ_BROKER_CONFIG
          Name of ActiveMQ property telling the broker xml configuration path
static java.lang.String AMQ_BROKER_CONFIG_PATH
          Path to the default broker configuration file
static java.lang.String AMQ_BROKER_URL
          Name of ActiveMQ property telling the broker URL to use
static java.lang.String AMQ_EMBEDDED_BROKER
          Name of ActiveMQ property telling if it uses an embedded broker
static java.lang.String AMQ_J2EE_COMPLIANCE
          Name of ActiveMQ property telling J2EE compliance
protected static java.lang.String AMQ_PROPERTIES_PREFIX
          Prefix of application properties related to ActiveMQ.
static java.lang.String AMQ_SETUP_PROPERTY
          Name of application property telling if ActiveMQ has been setup
protected static org.apache.commons.logging.Log log
          Get a commons logger.
 
Constructor Summary
ActiveMQConfigurator()
          Creates a new instance of ActiveMQConfigurator
 
Method Summary
protected  void configureActiveMQ(java.util.Properties properties)
          Do the real job by filling application with ActiveMQ properties.
 void configureMessaging(java.lang.String brokerUrl)
          Configure the ActiveMQ connection factory properties for given broker.
 java.util.Properties getActiveMQProperties()
          Extract ActiveMQ related properties from ApplicationConfig.
 java.lang.String getActiveMQProperty(java.lang.String key)
          Get a specified ActiveMQ property using its key
 ApplicationConfig getApplicationConfig()
           
 void setApplicationConfig(ApplicationConfig config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.commons.logging.Log log
Get a commons logger.


AMQ_PROPERTIES_PREFIX

protected static final java.lang.String AMQ_PROPERTIES_PREFIX
Prefix of application properties related to ActiveMQ.

See Also:
Constant Field Values

AMQ_J2EE_COMPLIANCE

public static final java.lang.String AMQ_J2EE_COMPLIANCE
Name of ActiveMQ property telling J2EE compliance

See Also:
Constant Field Values

AMQ_EMBEDDED_BROKER

public static final java.lang.String AMQ_EMBEDDED_BROKER
Name of ActiveMQ property telling if it uses an embedded broker

See Also:
Constant Field Values

AMQ_BROKER_URL

public static final java.lang.String AMQ_BROKER_URL
Name of ActiveMQ property telling the broker URL to use

See Also:
Constant Field Values

AMQ_BROKER_CONFIG

public static final java.lang.String AMQ_BROKER_CONFIG
Name of ActiveMQ property telling the broker xml configuration path

See Also:
Constant Field Values

AMQ_SETUP_PROPERTY

public static final java.lang.String AMQ_SETUP_PROPERTY
Name of application property telling if ActiveMQ has been setup

See Also:
Constant Field Values

AMQ_BROKER_CONFIG_PATH

public static final java.lang.String AMQ_BROKER_CONFIG_PATH
Path to the default broker configuration file

See Also:
Constant Field Values
Constructor Detail

ActiveMQConfigurator

public ActiveMQConfigurator()
Creates a new instance of ActiveMQConfigurator

Method Detail

setApplicationConfig

public void setApplicationConfig(ApplicationConfig config)
Parameters:
config - ApplicationConfig instance

getApplicationConfig

public ApplicationConfig getApplicationConfig()
Returns:
The ApplicationConfig instance used

getActiveMQProperty

public java.lang.String getActiveMQProperty(java.lang.String key)
Get a specified ActiveMQ property using its key

Parameters:
key - The key of the property to retrieve
Returns:
The property value or null if no property with key

getActiveMQProperties

public java.util.Properties getActiveMQProperties()
Extract ActiveMQ related properties from ApplicationConfig.

Returns:
A set of ActiveMQ properties already present into ApplicationConfig

configureMessaging

public void configureMessaging(java.lang.String brokerUrl)
                        throws BootstrapException
Configure the ActiveMQ connection factory properties for given broker.

Parameters:
brokerUrl - The Url of broker to configure connection factory for
Throws:
BootstrapException - if application conifguration cannot be updated

configureActiveMQ

protected void configureActiveMQ(java.util.Properties properties)
                          throws BootstrapException
Do the real job by filling application with ActiveMQ properties.

Parameters:
properties - ActiveMQ specific properties (starting with "activemq.")
Throws:
BootstrapException - if configuration backup fails


Copyright © 2005-2008 Join. All Rights Reserved.