Skip to content

Commit

Permalink
Resolves JMS and Stomp port conflicts with existing fcrepo4 webapp - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
osmandin authored and Andrew Woods committed Nov 8, 2013
1 parent 0df86ab commit e3b9b95
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 10 deletions.
6 changes: 6 additions & 0 deletions fcrepo-jms/pom.xml
Expand Up @@ -21,6 +21,12 @@
<artifactId>fcrepo-kernel</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.fcrepo</groupId>
<artifactId>fcrepo-http-commons</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions fcrepo-jms/src/main/resources/config/activemq.xml
Expand Up @@ -111,9 +111,9 @@
<transportConnectors>
<!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
<transportConnector name="openwire"
uri="tcp://0.0.0.0:${activemq.port:61616}?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"
uri="tcp://0.0.0.0:${jms.port:61616}?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"
/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:${stomp.port:61613}"/>
</transportConnectors>

<!-- destroy the spring context on shutdown to stop jetty -->
Expand Down
2 changes: 1 addition & 1 deletion fcrepo-jms/src/main/resources/spring/jms.xml
Expand Up @@ -15,7 +15,7 @@

<bean id="connectionFactory" class="org.apache.activemq.ActiveMQConnectionFactory"
depends-on="jmsBroker">
<property name="brokerURL" value="vm://localhost?create=false"/>
<property name="brokerURL" value="vm://localhost:${jms.port:61616}?create=false"/>
</bean>

<bean name="jmsBroker" class="org.apache.activemq.xbean.BrokerFactoryBean">
Expand Down
60 changes: 55 additions & 5 deletions fcrepo-webapp/pom.xml
Expand Up @@ -159,6 +159,8 @@
<systemPropertyVariables>
<test.port>${test.port}</test.port>
<test.context.path>${test.context.path}</test.context.path>
<jms.port>${jms.port}</jms.port>
<stomp.port>${stomp.port}</stomp.port>
<integration-test>true</integration-test>
</systemPropertyVariables>
</configuration>
Expand All @@ -171,9 +173,44 @@
<portName>test.port</portName>
<!-- reserves the stop port for jetty-maven-plugin -->
<portName>jetty.port.stop</portName>
<portName>jms.port</portName>
<portName>stomp.port</portName>
</portNames>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>pre-integration-test</phase>
<goals>
<goal>set-system-properties</goal>
</goals>
<configuration>
<properties>
<property>
<name>jms.port</name>
<value>${jms.port}</value>
</property>

<property>
<name>stomp.port</name>
<value>${stomp.port}</value>
</property>

<property>
<name>integration-test</name>
<value>true</value>
</property>
</properties>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
Expand Down Expand Up @@ -209,11 +246,6 @@
<value>${project.build.directory}/active-mq</value>
</systemProperty>

<systemProperty>
<name>integration-test</name>
<value>true</value>
</systemProperty>

</systemProperties>

</configuration>
Expand All @@ -234,6 +266,24 @@
</connectors>
<daemon>true</daemon>
<stopPort>${jetty.port.stop}</stopPort>

<systemProperties>
<systemProperty>
<name>jms.port</name>
<value>${jms.port}</value>
</systemProperty>

<systemProperty>
<name>stomp.port</name>
<value>${stomp.port}</value>
</systemProperty>

<systemProperty>
<name>integration-test</name>
<value>true</value>
</systemProperty>
</systemProperties>

</configuration>
</execution>
<execution>
Expand Down
4 changes: 2 additions & 2 deletions fcrepo-webapp/src/main/resources/config/activemq.xml
Expand Up @@ -111,9 +111,9 @@
<transportConnectors>
<!-- DOS protection, limit concurrent connections to 1000 and frame size to 100MB -->
<transportConnector name="openwire"
uri="${activemq.openwire.connector:tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600}"
uri="tcp://0.0.0.0:${jms.port:61616}?maximumConnections=1000&amp;wireformat.maxFrameSize=104857600"
/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:61613"/>
<transportConnector name="stomp" uri="stomp://0.0.0.0:${stomp.port:61613}"/>
</transportConnectors>

<!-- destroy the spring context on shutdown to stop jetty -->
Expand Down

0 comments on commit e3b9b95

Please sign in to comment.