root/trunk/config/bwbuild/jboss/activemq.xml

Revision 2695 (checked in by douglm, 3 years ago)

JBoss support. First stage in deploying applications as services in jboss.

Restructure shell script builds to provide platform specific options. Use that feature to create jboss services (sar files) that can be deployed within the server.

All this work is based on jboss 5.1.0.GA

In addition there is some partial support for geronimo. This is not complete

Line 
1 <!--
2     Licensed to the Apache Software Foundation (ASF) under one or more
3     contributor license agreements.  See the NOTICE file distributed with
4     this work for additional information regarding copyright ownership.
5     The ASF licenses this file to You under the Apache License, Version 2.0
6     (the "License"); you may not use this file except in compliance with
7     the License.  You may obtain a copy of the License at
8
9     http://www.apache.org/licenses/LICENSE-2.0
10
11     Unless required by applicable law or agreed to in writing, software
12     distributed under the License is distributed on an "AS IS" BASIS,
13     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14     See the License for the specific language governing permissions and
15     limitations under the License.
16 -->
17
18 <!-- Bedework:
19   For the quickstart this file is copied out of the current configuration/build
20   directory into the activemq configuration directory.
21
22   DO NOT edit the copy of this file inside activemq. If you want to change the
23   configuration edit a copy inside your bedework configuration directory.
24  -->
25
26 <!-- START SNIPPET: example -->
27 <beans
28   xmlns="http://www.springframework.org/schema/beans"
29   xmlns:amq="http://activemq.apache.org/schema/core"
30   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
31   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
32   http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd
33   http://activemq.apache.org/camel/schema/spring http://activemq.apache.org/camel/schema/spring/camel-spring.xsd">
34
35     <!-- Allows us to use system properties as variables in this configuration file
36 -->
37   <bean
38     class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
39     <property name="locations">
40       <value>file:///${activemq.base}/conf/credentials.properties
41       </value>
42     </property>
43   </bean>
44
45   <broker xmlns="http://activemq.apache.org/schema/core"
46     brokerName="bedework" dataDirectory="${activemq.base}/data">
47     <!--
48       MikeD Queues for various bedework services. These are all fed by
49       the virtual queue bedework.sysevents
50     -->
51     <destinations>
52       <!-- The listener just logs the system events -->
53       <queue name="logger"
54              physicalName="bedework.sysevents.logger" />
55
56       <!-- The listener is the crawler which (re)indexes the system -->
57       <queue name="crawler"
58              physicalName="bedework.crawler" />
59
60       <!--
61         The listener is the scheduler which handles events appearing in
62         the in/outbox
63       -->
64       <queue name="schedulerIn"
65              physicalName="bedework.scheduleIn" />
66       <queue name="schedulerOut"
67              physicalName="bedework.scheduleOut" />
68
69       <!-- <topic physicalName="SOME.TOPIC" /> -->
70     </destinations>
71
72     <!-- MikeD -->
73     <destinationInterceptors>
74       <virtualDestinationInterceptor>
75         <virtualDestinations>
76           <compositeQueue name="bedework.sysevents">
77             <forwardTo>
78               <queue physicalName="bedework.sysevents.logger" />
79               <queue physicalName="bedework.crawler" />
80               <filteredDestination selector="inbox = 'true'"
81                                    queue="bedework.scheduleIn"/>
82               <filteredDestination selector="outbox = 'true'"
83                                    queue="bedework.scheduleOut"/>
84             </forwardTo>
85           </compositeQueue>
86         </virtualDestinations>
87       </virtualDestinationInterceptor>
88     </destinationInterceptors>
89
90     <!--
91       Destination specific policies using destination names or wildcards
92     -->
93     <destinationPolicy>
94       <policyMap>
95         <policyEntries>
96           <policyEntry queue=">" memoryLimit="5mb" />
97           <policyEntry topic=">" memoryLimit="5mb">
98             <!--
99               you can add other policies too such as these
100               <dispatchPolicy> <strictOrderDispatchPolicy/>
101               </dispatchPolicy> <subscriptionRecoveryPolicy>
102               <lastImageSubscriptionRecoveryPolicy/>
103               </subscriptionRecoveryPolicy>
104             -->
105           </policyEntry>
106         </policyEntries>
107       </policyMap>
108     </destinationPolicy>
109
110     <!--
111       MikeD - there are some reports of messages not getting delivered,
112       possibly because consumers aren't going fast enough for activemq and
113       it tries to slow down the producers. The following disables that
114       behavior
115
116       <destinationPolicy>
117         <policyMap>
118           <policyEntries>
119             <policyEntry queue=">" producerFlowControl="false"
120               memoryLimit="64mb" />
121           </policyEntries>
122         </policyMap>
123       </destinationPolicy>
124       -->
125
126     <!-- Use the following to configure how ActiveMQ is exposed in JMX -->
127     <managementContext>
128       <managementContext createConnector="false" />
129     </managementContext>
130
131     <!-- The store and forward broker networks ActiveMQ will listen to -->
132     <networkConnectors>
133       <!-- by default just auto discover the other brokers
134          Configured out for the time being - causes a lot of error messages
135       <networkConnector name="default-nc" uri="multicast://default" />
136        -->
137       <!--
138         Example of a static configuration: <networkConnector name="host1
139         and host2" uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
140       -->
141     </networkConnectors>
142
143     <!-- High throughput but scalability problems - perhaps OK with <=500 connections
144     <persistenceAdapter>
145       <amqPersistenceAdapter syncOnWrite="false"
146         directory="../activemq-data" maxFileLength="20 mb" />
147     </persistenceAdapter>
148     -->
149
150     <!-- Newer adapter - handles 1000s of connections -->
151     <persistenceAdapter>
152       <kahaDB directory="../data/activemq-data" journalMaxFileLength="32mb"/>
153     </persistenceAdapter>
154
155     <!-- older and slower is jdbcPersistenceAdapter -->
156
157     <!--
158     <sslContext>
159       <sslContext keyStore="file:${activemq.base}/conf/broker.ks"
160                   keyStorePassword="password"
161                   trustStore="file:${activemq.base}/conf/broker.ts"
162                   trustStorePassword="password" />
163     </sslContext>
164     -->
165
166     <!--
167       The maximum amount of space the broker will use before slowing down
168       producers
169     -->
170     <systemUsage>
171       <systemUsage>
172         <memoryUsage>
173           <memoryUsage limit="20 mb" />
174         </memoryUsage>
175         <storeUsage>
176           <storeUsage limit="1 gb" name="foo" />
177         </storeUsage>
178         <tempUsage>
179           <tempUsage limit="100 mb" />
180         </tempUsage>
181       </systemUsage>
182     </systemUsage>
183
184
185     <!-- The transport connectors ActiveMQ will listen to -->
186     <transportConnectors>
187       <transportConnector name="bedework" uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
188       <!--
189       <transportConnector name="xmpp" uri="xmpp://localhost:61222"/>
190       -->
191     </transportConnectors>
192
193   </broker>
194
195   <!--
196   ** Lets deploy some Enterprise Integration Patterns inside the ActiveMQ Message Broker
197   ** For more details see
198   **
199   ** http://activemq.apache.org/enterprise-integration-patterns.html
200
201   <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
202
203     < ! - - You can use a <package> element for each root package to search for
204          Java routes - - >
205     <package>org.foo.bar</package>
206
207     < ! - - You can use Spring XML syntax to define the routes here using the <route> element - - >
208     <route>
209       <from uri="activemq:example.A"/>
210       <to uri="activemq:example.B"/>
211     </route>
212   </camelContext>
213   -->
214
215   <!--
216   ** Lets configure some Camel endpoints
217   **
218   ** http://activemq.apache.org/camel/components.html
219   -->
220
221   <!-- configure the camel activemq component to use the current broker
222   <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" >
223     <property name="connectionFactory">
224       <bean class="org.apache.activemq.ActiveMQConnectionFactory">
225         <property name="brokerURL" value="vm://localhost?create=false&amp;waitForStart=10000" />
226         <property name="userName" value="${activemq.username}"/>
227         <property name="password" value="${activemq.password}"/>
228       </bean>
229     </property>
230   </bean>
231 -->
232
233   <!-- Uncomment to create a command agent to respond to message based admin commands on the ActiveMQ.Agent topic
234 -->
235   <!--
236   <commandAgent xmlns="http://activemq.apache.org/schema/core"
237                 brokerUrl="vm://localhost"
238                 username="${activemq.username}"
239                 password="${activemq.password}"/>
240   -->
241
242   <!-- An embedded servlet engine for serving up the Admin console -->
243   <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
244     <connectors>
245       <nioConnector port="8161"/>
246     </connectors>
247
248     <handlers>
249       <webAppContext contextPath="/admin" resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true"/>
250       <webAppContext contextPath="/demo" resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true"/>
251       <webAppContext contextPath="/fileserver" resourceBase="${activemq.base}/webapps/fileserver" logUrlOnStart="true"/>
252     </handlers>
253   </jetty>
254
255   <!--  This xbean configuration file supports all the standard spring xml configuration options
256 -->
257
258 </beans>
259
Note: See TracBrowser for help on using the browser.