LibraryLink ToToggle FramesPrintFeedback

Hot Deployment

Before deploying a JMS broker, the activemq feature must be installed in the OSGi container. Normally, this feature is installed by default in Fuse ESB, so it should already be available. If the feature was uninstalled at some point, you can re-install it by entering the following command at the console:

karaf@root> features:install activemq

If you have an existing ActiveMQ XML configuration file, you can deploy the broker by copying the configuration file into the following hot deploy directory:

InstallDir/deploy

After deploying, the configured broker starts up immediately.

After deploying the BrokerName broker, Fuse ESB automatically creates a data directory at the following location:

InstallDir/activemq-data/BrokerName

You can hot deploy a broker using either of the following types of configuration file:

You can deploy your broker using a Spring configuration file, where the root element is {http://www.springframework.org/schema/beans}beans. The broker element is a child of the beans element and the broker's namespace is http://activemq.apache.org/schema/core.

For example, the following Spring configuration instantiates a broker named simple-spring, which creates an Openwire connector on the IP port 61000:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       >

    <broker xmlns="http://activemq.apache.org/schema/core"
        brokerName="simple-spring">
        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://localhost:61000"/>
        </transportConnectors>
    </broker>

</beans>

It is not necessary to specify schema locations in the configuration. But if you are editing the configuration file with an XML editor, you might want to add the schema locations in order to support schema validation and content completion in the editor. For the preceding example, you could specify the schema locations as follows:

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.4.0.xsd"
       >
    ...

You can deploy your broker using a blueprint configuration file, where the root element is {http://www.osgi.org/xmlns/blueprint/v1.0.0}blueprint. The broker element is a child of the blueprint element and the broker's namespace is http://activemq.apache.org/schema/core.

For example, the following blueprint configuration instantiates a broker named simple-blueprint, which creates an Openwire connector on the IP port 61001:

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    >
    <broker xmlns="http://activemq.apache.org/schema/core"
        brokerName="simple-blueprint">
        <transportConnectors>
            <transportConnector name="openwire" uri="tcp://localhost:61001"/>
        </transportConnectors>
    </broker>
</blueprint>

It is not necessary to specify schema locations in the configuration. But if you are editing the configuration file with an XML editor, you might want to add the schema locations in order to support schema validation and content completion in the editor. For the preceding example, you could specify the schema locations as follows:

<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
    http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.4.0.xsd
    http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd"
    >
    ...
[Note]Note

Blueprint is a dependency injection framework, defined by the OSGi standard, which is similar to Spring in many respects. For more details about blueprint, see The Blueprint Container.