Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Resolves JMS and Stomp port conflicts with existing fcrepo4 webapp
  • Loading branch information
osmandin authored and Andrew Woods committed Nov 2, 2013
1 parent 54d6069 commit 0bfe852
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 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
14 changes: 14 additions & 0 deletions fcrepo-webapp/pom.xml
Expand Up @@ -115,6 +115,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 @@ -127,6 +129,8 @@
<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>
Expand Down Expand Up @@ -165,6 +169,16 @@
<value>${project.build.directory}/active-mq</value>
</systemProperty>

<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>
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 0bfe852

Please sign in to comment.