Author: andygumbrecht
Date: Sun Oct 26 09:42:20 2014
New Revision: 1634292
URL: http://svn.apache.org/r1634292
Log:
activemq.xml
Added:
tomee/site/trunk/content/activemq.xml
Modified:
tomee/site/trunk/content/jms-resources-and-mdb-container.mdtext
Added: tomee/site/trunk/content/activemq.xml
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/activemq.xml?rev=1634292&view=auto
==============================================================================
--- tomee/site/trunk/content/activemq.xml (added)
+++ tomee/site/trunk/content/activemq.xml Sun Oct 26 09:42:20 2014
@@ -0,0 +1,62 @@
+<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-5.8.0.xsd">
+
+ <!-- Allows us to use external properties as variables in this configuration
file -->
+ <bean
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
+ <property name="location">
+ <value>file:conf/your.activemq.properties</value>
+ </property>
+ <property name="properties">
+ <props>
+ <prop key="conf.db.host">database-host:database-port</prop>
+ <prop key="conf.db.un">database-username</prop>
+ <prop key="conf.db.pw">database-password</prop>
+ <prop key="data.dir">data</prop>
+ </props>
+ </property>
+ </bean>
+
+ <broker xmlns="http://activemq.apache.org/schema/core"
+ useJmx="true"
+ brokerName="spectrum"
+ useShutdownHook="false"
+ persistent="true"
+ start="false"
+ schedulerSupport="false"
+ enableStatistics="false"
+ offlineDurableSubscriberTimeout="259200000"
+ offlineDurableSubscriberTaskSchedule="3600000">
+
+ <!--persistenceAdapter>
+ <jdbcPersistenceAdapter createTablesOnStartup="false"
dataSource="#postgresql-activemq-ds">
+ <adapter>
+ <postgresql-jdbc-adapter/>
+ </adapter>
+ </jdbcPersistenceAdapter>
+ </persistenceAdapter-->
+
+ <persistenceAdapter>
+ <kahaDB directory="${data.dir}/activemq-data/kaha"
indexCacheSize="20000" ignoreMissingJournalfiles="true"
checkForCorruptJournalFiles="true" checksumJournalFiles="true"/>
+ </persistenceAdapter>
+
+ <!-- The transport connectors ActiveMQ will listen to -->
+ <transportConnectors>
+ <transportConnector name="vm"
uri="vm://spectrum?waitForStart=30000&async=true"/>
+ <transportConnector name="nio" enableStatusMonitor="true"
uri="nio://0.0.0.0:54545?soTimeout=60000&daemon=true&keepAlive=true&connectionTimeout=120000&wireFormat.tcpNoDelayEnabled=true&wireFormat.maxInactivityDuration=240000&wireFormat.maxInactivityDurationInitalDelay=120000"/>
+ </transportConnectors>
+
+ </broker>
+
+ <!--bean id="postgresql-activemq-ds"
class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
+ <property name="driverClassName" value="org.postgresql.Driver"/>
+ <property name="url"
value="jdbc:postgresql://${conf.db.host}/openejb_activemq"/>
+ <property name="username" value="${conf.db.un}"/>
+ <property name="password" value="${conf.db.pw}"/>
+ <property name="poolPreparedStatements" value="true"/>
+ </bean-->
+
+</beans>
\ No newline at end of file
Modified: tomee/site/trunk/content/jms-resources-and-mdb-container.mdtext
URL:
http://svn.apache.org/viewvc/tomee/site/trunk/content/jms-resources-and-mdb-container.mdtext?rev=1634292&r1=1634291&r2=1634292&view=diff
==============================================================================
--- tomee/site/trunk/content/jms-resources-and-mdb-container.mdtext (original)
+++ tomee/site/trunk/content/jms-resources-and-mdb-container.mdtext Sun Oct 26
09:42:20 2014
@@ -72,19 +72,21 @@ Adding the `DataSource` property to your
## Internal ActiveMQ Broker with activemq.xml
-The `activemq.xml` file format has a significant number of extra dependencies,
such as Spring, and is therefore not included in the distribution by default.
+The [activemq.xml](http://activemq.apache.org/xml-configuration.html) file
format requires a number of Spring dependencies, and is therefore not included
in the distribution by default. This is purley due to the fact that this
ActiveMQ file format is parsed using Spring libraries and this is beyond our
control. However, the advantage is opening up the door to the huge number of
configuration options available found here:
[http://activemq.apache.org/xml-configuration.html](http://activemq.apache.org/xml-configuration.html).
This support can be enabled by adding the right libraries and creating an
`conf/activemq.xml` file.
-Add the following jars to the `tomee.home/lib/` directory:
+Add the following jars to the `tomee/lib/` directory:
--
[spring-beans-2.5.6.jar](http://repo1.maven.org/maven2/org/springframework/spring-beans/2.5.6/spring-beans-2.5.6.jar)
--
[spring-context-2.5.6.jar](http://repo1.maven.org/maven2/org/springframework/spring-context/2.5.6/spring-context-2.5.6.jar)
--
[spring-core-2.5.6.jar](http://repo1.maven.org/maven2/org/springframework/spring-core/2.5.6/spring-core-2.5.6.jar)
--
[spring-web-2.5.6.jar](http://repo1.maven.org/maven2/org/springframework/spring-web/2.5.6/spring-web-2.5.6.jar)
--
[xbean-spring-3.9.jar](http://repo1.maven.org/maven2/org/apache/xbean/xbean-spring/3.9/xbean-spring-3.9.jar)
+-
[spring-beans-3.2.9.RELEASE.jar](http://repo1.maven.org/maven2/org/springframework/spring-beans/3.2.9.RELEASE/spring-beans-3.2.9.RELEASE.jar)
+-
[spring-context-3.2.9.RELEASE.jar](http://repo1.maven.org/maven2/org/springframework/spring-context/3.2.9.RELEASE/spring-context-3.2.9.RELEASE.jar)
+-
[spring-core-3.2.9.RELEASE.jar](http://repo1.maven.org/maven2/org/springframework/spring-core/3.2.9.RELEASE/spring-core-3.2.9.RELEASE.jar)
+-
[spring-web-3.2.9.RELEASE.jar](http://repo1.maven.org/maven2/org/springframework/spring-web/3.2.9.RELEASE/spring-web-3.2.9.RELEASE.jar)
+-
[xbean-spring-3.9.jar](http://repo1.maven.org/maven2/org/apache/xbean/xbean-spring/3.2.9.RELEASE/xbean-spring-3.9.jar)
+
+Later versions should work, but have not been tested.
-Create an [activemq.xml
file](http://activemq.apache.org/xml-configuration.html) a in
`tomee.home/conf/activemq.xml`.
+Create an [activemq.xml file](activemq.xml) a in
`tomee.home/conf/activemq.xml`.
Then use the `xbean:file:` url prefix in the `BrokerXmlConfig` as shown belog.