Commit e41fcb6e authored by Peter Harrison's avatar Peter Harrison

Added gravity.conf as an example configuration file.

Modifications to maven dependencies - updating JMS.
Modified how jmsConnectionfactory is obtained; not via JNDI.
This means no more messy JNDI, and no hornetq.conf needed.
This resolved build issues - not finding JMS API 1.
parent 11d3c04e
...@@ -185,21 +185,7 @@ ...@@ -185,21 +185,7 @@
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
<version>1.2.15</version> <version>1.2.17</version>
<exclusions>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
</exclusions>
<scope>runtime</scope> <scope>runtime</scope>
</dependency> </dependency>
...@@ -223,20 +209,6 @@ ...@@ -223,20 +209,6 @@
<artifactId>jcr</artifactId> <artifactId>jcr</artifactId>
<version>2.0</version> <version>2.0</version>
</dependency> </dependency>
<!--
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
<version>2.2.0</version>
</dependency>
<dependency>
<groupId>org.apache.jackrabbit</groupId>
<artifactId>jackrabbit-jcr-commons</artifactId>
<version>2.4.1</version>
</dependency>
-->
<dependency> <dependency>
<groupId>org.apache.jackrabbit</groupId> <groupId>org.apache.jackrabbit</groupId>
...@@ -305,6 +277,7 @@ ...@@ -305,6 +277,7 @@
<groupId>javax.jms</groupId> <groupId>javax.jms</groupId>
<artifactId>javax.jms-api</artifactId> <artifactId>javax.jms-api</artifactId>
<version>2.0.1</version> <version>2.0.1</version>
<scope>provided</scope>
</dependency> </dependency>
<dependency> <dependency>
...@@ -431,7 +404,6 @@ ...@@ -431,7 +404,6 @@
<build> <build>
<finalName>gravity</finalName> <finalName>gravity</finalName>
<plugins> <plugins>
<!-- Facilitates downloading source and javadoc in Eclipse --> <!-- Facilitates downloading source and javadoc in Eclipse -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
...@@ -475,7 +447,7 @@ ...@@ -475,7 +447,7 @@
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>
<reporting> <reporting>
......
hornetq.server=localhost
hornetq.port=5445
cron.clearBoardsCache=0 0 0 * * *
cache.clearschedule=0 0 0 * * *
automation.delay=60
repository.listener.enabled=true
repository.url=localhost
testJcrHome=
bulletin.username=boo
bulletin.password=boo
bulletin.url=bpp
bulletin.from=boo
bulletin.ratecode=boo
aws.keyid=BOO
aws.secret=BAR
\ No newline at end of file
...@@ -11,6 +11,6 @@ bulletin.from= ...@@ -11,6 +11,6 @@ bulletin.from=
bulletin.ratecode= bulletin.ratecode=
repository.url=http://localhost:8080/jackrabbit-webapp-2.6.0/rmi repository.url=http://localhost:8080/jackrabbit-webapp-2.6.0/rmi
testJcrHome=/home/r_kpatel/jackrabbit testJcrHome=
automation.delay=60000 automation.delay=60000
\ No newline at end of file
...@@ -18,15 +18,23 @@ ...@@ -18,15 +18,23 @@
<!-- EVENT LISTENING FROM QUEUE --> <!-- EVENT LISTENING FROM QUEUE -->
<bean id="hornetqConfiguration" <bean id="jmsConnectionFactory" class="org.hornetq.jms.client.HornetQJMSConnectionFactory">
class="org.springframework.beans.factory.config.PropertiesFactoryBean"> <constructor-arg name="ha" value="false" />
<property name="location" value="file:///etc/hornetq.conf" /> <constructor-arg>
<bean class="org.hornetq.api.core.TransportConfiguration">
<constructor-arg
value="org.hornetq.core.remoting.impl.netty.NettyConnectorFactory" />
<constructor-arg>
<map key-type="java.lang.String" value-type="java.lang.Object">
<entry key="host" value="${hornetq.server}"></entry>
<entry key="port" value="${hornetq.port}"></entry>
</map>
</constructor-arg>
</bean>
</constructor-arg>
</bean> </bean>
<jee:jndi-lookup id="jmsConnectionFactory" jndi-name="/ConnectionFactory"
resource-ref="true" environment-ref="hornetqConfiguration" />
<jms:listener-container container-type="default" <jms:listener-container container-type="default"
connection-factory="jmsConnectionFactory" acknowledge="auto"> connection-factory="jmsConnectionFactory" acknowledge="auto">
...@@ -60,9 +68,10 @@ ...@@ -60,9 +68,10 @@
<bean id="eventListener" class="nz.net.orcon.kanban.automation.JmsEventListener" /> <bean id="eventListener" class="nz.net.orcon.kanban.automation.JmsEventListener" />
<!--
<jee:jndi-lookup id="gravityEventsQueue" jndi-name="/queue/gravityEvents" <jee:jndi-lookup id="gravityEventsQueue" jndi-name="/queue/gravityEvents"
resource-ref="true" environment-ref="hornetqConfiguration" /> resource-ref="true" environment-ref="hornetqConfiguration" />
-->
<bean id="eventsJmsTemplate" class="org.springframework.jms.core.JmsTemplate"> <bean id="eventsJmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory" ref="jmsConnectionFactory" /> <property name="connectionFactory" ref="jmsConnectionFactory" />
<property name="explicitQosEnabled" value="true" /> <property name="explicitQosEnabled" value="true" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment