You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by de...@apache.org on 2009/06/15 17:20:55 UTC
svn commit: r784808 - in /activemq/sandbox/activemq-flow:
activemq-all/src/test/java/org/apache/activemq/jaxb/
activemq-all/src/test/resources/
activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/ assembly/
assembly/src/main/java/org/ assembl...
Author: dejanb
Date: Mon Jun 15 15:20:54 2009
New Revision: 784808
URL: http://svn.apache.org/viewvc?rev=784808&view=rev
Log:
moving complex config test to activemq-all module
Added:
activemq/sandbox/activemq-flow/activemq-all/src/test/java/org/apache/activemq/jaxb/
activemq/sandbox/activemq-flow/activemq-all/src/test/java/org/apache/activemq/jaxb/JAXBConfigTest.java
Removed:
activemq/sandbox/activemq-flow/activemq-broker/src/main/java/org/apache/activemq/apollo/jaxb/TransportServerXml.java
activemq/sandbox/activemq-flow/assembly/src/main/java/org/
activemq/sandbox/activemq-flow/assembly/src/test/java/org/
activemq/sandbox/activemq-flow/assembly/src/test/resources/
Modified:
activemq/sandbox/activemq-flow/activemq-all/src/test/resources/activemq.xml
activemq/sandbox/activemq-flow/assembly/pom.xml
Added: activemq/sandbox/activemq-flow/activemq-all/src/test/java/org/apache/activemq/jaxb/JAXBConfigTest.java
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-all/src/test/java/org/apache/activemq/jaxb/JAXBConfigTest.java?rev=784808&view=auto
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-all/src/test/java/org/apache/activemq/jaxb/JAXBConfigTest.java (added)
+++ activemq/sandbox/activemq-flow/activemq-all/src/test/java/org/apache/activemq/jaxb/JAXBConfigTest.java Mon Jun 15 15:20:54 2009
@@ -0,0 +1,59 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.activemq.jaxb;
+
+
+import java.net.URI;
+
+import junit.framework.TestCase;
+
+import org.apache.activemq.apollo.broker.Broker;
+import org.apache.activemq.apollo.broker.BrokerFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Test;
+
+public class JAXBConfigTest extends TestCase {
+
+ private static final Log LOG = LogFactory.getLog(JAXBConfigTest.class);
+
+ Broker broker;
+
+ @Before
+ public void setUp() throws Exception {
+ broker = createBroker();
+ }
+
+ @After
+ public void tearDown() throws Exception {
+ }
+
+ @Test
+ public void testBrokerConfiguredCorrectly() throws Exception {
+ assertNotNull(broker);
+ assertEquals("tcp://localhost:61616?wireFormat=openwire", broker.getTransportServers().get(0).getConnectURI().toString());
+ }
+
+ protected Broker createBroker() throws Exception {
+ URI uri = new URI("jaxb:classpath:activemq.xml");
+ LOG.info("Loading broker configuration from the classpath with URI: " + uri);
+ return BrokerFactory.createBroker(uri);
+ }
+
+}
Modified: activemq/sandbox/activemq-flow/activemq-all/src/test/resources/activemq.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/activemq-all/src/test/resources/activemq.xml?rev=784808&r1=784807&r2=784808&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/activemq-all/src/test/resources/activemq.xml (original)
+++ activemq/sandbox/activemq-flow/activemq-all/src/test/resources/activemq.xml Mon Jun 15 15:20:54 2009
@@ -15,21 +15,15 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-<!-- START SNIPPET: xbean -->
-<beans>
- <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+<broker>
- <broker useJmx="false" xmlns="http://activemq.apache.org/schema/core" persistent="false">
-
- <transportConnectors>
- <transportConnector uri="tcp://localhost:0" discoveryUri="multicast://default"/>
- </transportConnectors>
-
- <networkConnectors>
- <networkConnector uri="multicast://default"/>
- </networkConnectors>
-
- </broker>
-
-</beans>
-<!-- END SNIPPET: xbean -->
+ <transport-server>tcp://localhost:61616?wireFormat=openwire</transport-server>
+
+ <connect-uri>tcp://127.0.0.1:61616?wireFormat=openwire</connect-uri>
+
+ <virtual-host>
+ <host-name>localhost</host-name>
+ <host-name>test.localhost</host-name>
+ </virtual-host>
+
+</broker>
\ No newline at end of file
Modified: activemq/sandbox/activemq-flow/assembly/pom.xml
URL: http://svn.apache.org/viewvc/activemq/sandbox/activemq-flow/assembly/pom.xml?rev=784808&r1=784807&r2=784808&view=diff
==============================================================================
--- activemq/sandbox/activemq-flow/assembly/pom.xml (original)
+++ activemq/sandbox/activemq-flow/assembly/pom.xml Mon Jun 15 15:20:54 2009
@@ -26,7 +26,7 @@
<groupId>org.apache.activemq</groupId>
<artifactId>assembly</artifactId>
- <packaging>jar</packaging>
+ <packaging>pom</packaging>
<version>6.0-SNAPSHOT</version>
<name>ActiveMQ :: Assembly</name>