Updated assembly so that kahadb is included and also added an example HA configuration which uses it.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@719763 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2008-11-22 00:36:43 +00:00
parent 456a2ba5cf
commit a85ca4a186
7 changed files with 248 additions and 24 deletions

View File

@ -49,6 +49,10 @@
<groupId>${pom.groupId}</groupId>
<artifactId>activemq-jpa-store</artifactId>
</dependency>
<dependency>
<groupId>${pom.groupId}</groupId>
<artifactId>kahadb</artifactId>
</dependency>
</dependencies>
<build>
@ -75,6 +79,8 @@
<include>${project.groupId}:activemq-jaas</include>
<include>${project.groupId}:activemq-optional</include>
<include>${project.groupId}:activemq-jpa-store</include>
<include>${project.groupId}:kahadb</include>
<include>org.apache.activemq.protobuf:activemq-protobuf</include>
<include>org.apache.geronimo.specs:geronimo-jms_1.1_spec</include>
<include>org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec</include>
<include>org.apache.geronimo.specs:geronimo-j2ee-management_1.0_spec</include>

View File

@ -86,6 +86,10 @@
<groupId>${pom.groupId}</groupId>
<artifactId>activemq-run</artifactId>
</dependency>
<dependency>
<groupId>${pom.groupId}</groupId>
<artifactId>kahadb</artifactId>
</dependency>
<!-- camel -->
<dependency>
@ -236,7 +240,12 @@
<artifactId>derbynet</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.hadoop.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<optional>true</optional>
</dependency>
<!-- copied dependencies from activemq-web-console -->
<!-- enable commons-logging when inside jetty6:run -->
<dependency>

View File

@ -102,6 +102,8 @@
<include>${pom.groupId}:activemq-core</include>
<include>${pom.groupId}:activemq-console</include>
<include>${pom.groupId}:activemq-jaas</include>
<include>${pom.groupId}:kahadb</include>
<include>org.apache.activemq.protobuf:activemq-protobuf</include>
<include>mx4j:mx4j</include>
<include>org.apache.geronimo.specs:geronimo-j2ee-management_1.0_spec</include>
<include>org.apache.geronimo.specs:geronimo-jms_1.1_spec</include>
@ -155,6 +157,7 @@
<include>org.springframework:spring-jms</include>
<include>com.thoughtworks.xstream:xstream</include>
<include>xmlpull:xmlpull</include>
<include>org.apache.hadoop.zookeeper:zookeeper</include>
</includes>
</dependencySet>
<dependencySet>

View File

@ -0,0 +1,153 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- START SNIPPET: example -->
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
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-2.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:///${activemq.base}/conf/credentials.properties</value>
</property>
</bean>
<broker xmlns="http://activemq.apache.org/schema/core"
start="false"
brokerName="localhost" dataDirectory="${activemq.base}/data">
<!-- Destination specific policies using destination names or wildcards -->
<destinationPolicy>
<policyMap>
<policyEntries>
<policyEntry queue=">" memoryLimit="5mb"/>
<policyEntry topic=">" memoryLimit="5mb">
<!-- you can add other policies too such as these
<dispatchPolicy>
<strictOrderDispatchPolicy/>
</dispatchPolicy>
<subscriptionRecoveryPolicy>
<lastImageSubscriptionRecoveryPolicy/>
</subscriptionRecoveryPolicy>
-->
</policyEntry>
</policyEntries>
</policyMap>
</destinationPolicy>
<!-- Use the following to configure how ActiveMQ is exposed in JMX -->
<managementContext>
<managementContext createConnector="false"/>
</managementContext>
<!-- The store and forward broker networks ActiveMQ will listen to -->
<networkConnectors>
<!-- by default just auto discover the other brokers -->
<networkConnector name="default-nc" uri="multicast://default"/>
<!-- Example of a static configuration:
<networkConnector name="host1 and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
-->
</networkConnectors>
<sslContext>
<sslContext keyStore="file:${activemq.base}/conf/broker.ks" keyStorePassword="password" trustStore="file:${activemq.base}/conf/broker.ts" trustStorePassword="password"/>
</sslContext>
<!-- The maximum about of space the broker will use before slowing down producers -->
<systemUsage>
<systemUsage>
<memoryUsage>
<memoryUsage limit="20 mb"/>
</memoryUsage>
<storeUsage>
<storeUsage limit="1 gb" name="foo"/>
</storeUsage>
<tempUsage>
<tempUsage limit="100 mb"/>
</tempUsage>
</systemUsage>
</systemUsage>
<!-- The transport connectors ActiveMQ will listen to -->
<transportConnectors>
<transportConnector name="openwire" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
<transportConnector name="ssl" uri="ssl://localhost:61617"/>
<transportConnector name="stomp" uri="stomp://localhost:61613"/>
<transportConnector name="xmpp" uri="xmpp://localhost:61222"/>
</transportConnectors>
</broker>
<!--
** Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
** For more details see
**
** http://activemq.apache.org/enterprise-integration-patterns.html
-->
<camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
<!-- You can use a <package> element for each root package to search for Java routes -->
<package>org.foo.bar</package>
<!-- You can use Spring XML syntax to define the routes here using the <route> element -->
<route>
<from uri="activemq:example.A"/>
<to uri="activemq:example.B"/>
</route>
</camelContext>
<!--
** Lets configure some Camel endpoints
**
** http://activemq.apache.org/camel/components.html
-->
<!-- configure the camel activemq component to use the current broker -->
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" >
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="vm://localhost?create=false&amp;waitForStart=10000" />
<property name="userName" value="${activemq.username}"/>
<property name="password" value="${activemq.password}"/>
</bean>
</property>
</bean>
<!-- Uncomment to create a command agent to respond to message based admin commands on the ActiveMQ.Agent topic -->
<!--
<commandAgent xmlns="http://activemq.apache.org/schema/core" brokerUrl="vm://localhost" username="${activemq.username}" password="${activemq.password}"/>
-->
<!-- An embedded servlet engine for serving up the Admin console -->
<jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
<connectors>
<nioConnector port="8161"/>
</connectors>
<handlers>
<webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
<webAppContext contextPath="/demo" resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
<webAppContext contextPath="/fileserver" resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
</handlers>
</jetty>
</beans>
<!-- END SNIPPET: example -->

View File

@ -0,0 +1,52 @@
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- START SNIPPET: example -->
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:kdb="http://activemq.apache.org/schema/kahadb"
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-2.0.xsd
http://activ emq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
http://activemq.apache.org/schema/kahadb http://activemq.apache.org/schema/kahadb/kahadb.xsd">
<!-- Allows us to use system properties as variables in this configuration file -->
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<value>file:///${activemq.base}/conf/credentials.properties</value>
</property>
</bean>
<kahadb-replication-broker xmlns="http://activemq.apache.org/schema/kahadb">
<replicationService>
<kahadb-replication
directory="${activemq.base}/data/kahadb"
brokerURI="xbean:ha-broker.xml"
uri="kdbr://localhost:60001">
<cluster>
<zookeeper-cluster uri="zk://localhost:2181/activemq/default-ha-group" userid="activemq" password=""/>
</cluster>
</kahadb-replication>
</replicationService>
</kahadb-replication-broker>
</beans>
<!-- END SNIPPET: example -->

View File

@ -20,14 +20,13 @@
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>5.1.0</version>
<version>5.3-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.activemq</groupId>
<artifactId>kahadb</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
@ -63,55 +62,46 @@
<dependency>
<groupId>org.apache.activemq.protobuf</groupId>
<artifactId>activemq-protobuf</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>5.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-spring</artifactId>
<optional>true</optional>
<version>3.3</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.5.5</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>2.5.5</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>2.5.5</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.hadoop.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.0.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>5.3-SNAPSHOT</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
@ -125,17 +115,6 @@
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>apache.snapshots</id>
<name>Apache Development Snapshot Repository</name>
<url>http://people.apache.org/repo/m2-snapshot-repository</url>
<releases>
<enabled>false</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
@ -164,7 +143,6 @@
<plugin>
<groupId>org.apache.activemq.protobuf</groupId>
<artifactId>activemq-protobuf</artifactId>
<version>1.0-SNAPSHOT</version>
<executions>
<execution>
<goals>

23
pom.xml
View File

@ -139,6 +139,7 @@
<module>activemq-xmpp</module>
<module>assembly</module>
<module>activemq-jmdns_1.0</module>
<module>kahadb</module>
</modules>
<scm>
@ -276,6 +277,16 @@
<artifactId>activemq-openwire-generator</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>kahadb</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq.protobuf</groupId>
<artifactId>activemq-protobuf</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!-- =============================== -->
<!-- Required dependencies -->
@ -376,6 +387,13 @@
<artifactId>camel-jms</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
<groupId>org.apache.hadoop.zookeeper</groupId>
<artifactId>zookeeper</artifactId>
<version>3.0.0</version>
<optional>true</optional>
</dependency>
<!-- for the XML parsing -->
<dependency>
@ -925,6 +943,11 @@
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.activemq.protobuf</groupId>
<artifactId>activemq-protobuf</artifactId>
<version>1.0-SNAPSHOT</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>