moved the tests across from the assembly module that can be run inside the activemq-core module

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@419841 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-07-07 08:52:00 +00:00
parent d320676ae1
commit c9ab0d01d1
17 changed files with 720 additions and 0 deletions

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="brokerXmlConfigHelper" persistent="false" useShutdownHook="false" deleteAllMessagesOnStartup="true">
<transportConnectors>
<transportConnector uri="tcp://localhost:61638"/>
</transportConnectors>
</broker>
</beans>

View File

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans xmlns:amq="http://activemq.org/config/1.0">
<!-- normal ActiveMQ XML config which is less verbose & can be validated -->
<amq:broker brokerName="brokerConfigTest" populateJMSXUserID="false"
useLoggingForShutdownErrors="true" useJmx="true"
persistent="false" vmConnectorURI="vm://javacoola"
useShutdownHook="false" deleteAllMessagesOnStartup="true">
<!--
|| NOTE this config file is used for unit testing the configuration mechanism
|| it is not necessarily a good example of a config file! :)
-->
<amq:transportConnectors>
<amq:transportConnector uri="tcp://localhost:61635"/>
<amq:transportConnector uri="tcp://localhost:61636"/>
<amq:transportConnector uri="tcp://localhost:61637"/>
<amq:transportConnector>
<property name="server" ref="myTransportServer"/>
</amq:transportConnector>
</amq:transportConnectors>
<amq:networkConnectors>
<amq:networkConnector uri="static://(tcp://localhost:61616)"/>
</amq:networkConnectors>
<amq:destinationPolicy>
<amq:policyMap>
<amq:policyEntries>
<amq:policyEntry topic="Topic.SimpleDispatch">
<amq:dispatchPolicy><amq:simpleDispatchPolicy /></amq:dispatchPolicy>
</amq:policyEntry>
<amq:policyEntry topic="Topic.RoundRobinDispatch">
<amq:dispatchPolicy><amq:roundRobinDispatchPolicy /></amq:dispatchPolicy>
</amq:policyEntry>
<amq:policyEntry topic="Topic.StrictOrderDispatch">
<amq:dispatchPolicy><amq:strictOrderDispatchPolicy /></amq:dispatchPolicy>
</amq:policyEntry>
<amq:policyEntry topic="Topic.FixedSizedSubs">
<amq:subscriptionRecoveryPolicy>
<amq:fixedSizedSubscriptionRecoveryPolicy maximumSize="2000000" useSharedBuffer="false"/>
</amq:subscriptionRecoveryPolicy>
</amq:policyEntry>
<amq:policyEntry topic="Topic.LastImageSubs">
<amq:subscriptionRecoveryPolicy><amq:lastImageSubscriptionRecoveryPolicy/></amq:subscriptionRecoveryPolicy>
</amq:policyEntry>
<amq:policyEntry topic="Topic.NoSubs">
<amq:subscriptionRecoveryPolicy><amq:noSubscriptionRecoveryPolicy/></amq:subscriptionRecoveryPolicy>
</amq:policyEntry>
<amq:policyEntry topic="Topic.TimedSubs">
<amq:subscriptionRecoveryPolicy><amq:timedSubscriptionRecoveryPolicy recoverDuration="25000"/></amq:subscriptionRecoveryPolicy>
</amq:policyEntry>
</amq:policyEntries>
</amq:policyMap>
</amq:destinationPolicy>
<amq:memoryManager>
<amq:usageManager limit="200000" percentUsageMinDelta="20"/>
</amq:memoryManager>
<amq:persistenceAdapter>
<amq:memoryPersistenceAdapter init-method="createTransactionStore"/>
</amq:persistenceAdapter>
</amq:broker>
<!-- testing normal Spring stuff inside the same config file -->
<bean id="myTransportServer" class="org.apache.activemq.transport.activeio.ActiveIOTransportServer">
<constructor-arg index="0">
<bean id="brokerURI " class="java.net.URI">
<constructor-arg index="0">
<value>ssl://localhost:61634</value>
</constructor-arg>
</bean>
</constructor-arg>
<constructor-arg index="1">
<map/>
</constructor-arg>
<property name="stopTimeout" value="5000"/>
<property name="wireFormatFactory">
<bean id="myWireFormatFactory" class="org.apache.activemq.openwire.OpenWireFormatFactory">
<property name="stackTraceEnabled" value="false"/>
<property name="tcpNoDelayEnabled" value="true"/>
<property name="cacheEnabled" value="false" />
</bean>
</property>
</bean>
</beans>

View File

@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="wireFormat" class="org.apache.activemq.io.impl.DefaultWireFormat"/>
<bean id="transport" factory-method="newInstance" class="org.apache.activemq.transport.TransportServerChannelProvider">
<constructor-arg index="0">
<bean class="org.apache.activemq.io.impl.DefaultWireFormat"/>
<!---
<ref bean="wireFormat"/>
-->
</constructor-arg>
<constructor-arg index="1">
<value>vm://localhost</value>
</constructor-arg>
</bean>
</beans>

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans xmlns="http://activemq.org/config/1.0">
<broker useJmx="true">
<!-- In ActiveMQ 4, you can setup destination policies -->
<destinationPolicy>
<policyMap><policyEntries>
<policyEntry topic="FOO.>">
<dispatchPolicy>
<strictOrderDispatchPolicy />
</dispatchPolicy>
<subscriptionRecoveryPolicy>
<lastImageSubscriptionRecoveryPolicy />
</subscriptionRecoveryPolicy>
</policyEntry>
<!-- lets force old messages to be discarded for slow consumers -->
<policyEntry topic="Prices.>">
<pendingMessageLimitStrategy>
<constantPendingMessageLimitStrategy limit="0"/>
</pendingMessageLimitStrategy>
</policyEntry>
</policyEntries></policyMap>
</destinationPolicy>
<persistenceAdapter>
<journaledJDBC journalLogFiles="5" dataDirectory="../data"/>
<!-- To use a different datasource, use th following syntax : -->
<!--
<journaledJDBC journalLogFiles="5" dataDirectory="../data" dataSource="#postgres-ds"/>
-->
</persistenceAdapter>
<transportConnectors>
<transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
</transportConnectors>
<networkConnectors>
<!-- by default just auto discover the other brokers -->
<networkConnector uri="multicast://default"/>
<!--
<networkConnector uri="static://(tcp://host1:61616,tcp://host2:61616)"/>
-->
</networkConnectors>
</broker>
<!-- This xbean configuration file supports all the standard spring xml configuration options -->
<!-- Postgres DataSource Sample Setup -->
<!--
<bean id="postgres-ds" class="org.postgresql.ds.PGPoolingDataSource">
<property name="serverName" value="localhost"/>
<property name="databaseName" value="activemq"/>
<property name="portNumber" value="0"/>
<property name="user" value="activemq"/>
<property name="password" value="activemq"/>
<property name="dataSourceName" value="postgres"/>
<property name="initialConnections" value="1"/>
<property name="maxConnections" value="10"/>
</bean>
-->
<!-- MySql DataSource Sample Setup -->
<!--
<bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="url" value="jdbc:mysql://localhost/activemq"/>
<property name="username" value="activemq"/>
<property name="password" value="activemq"/>
<property name="poolPreparedStatements" value="true"/>
</bean>
-->
<!-- Embedded Derby DataSource Sample Setup -->
<!--
<bean id="derby-ds" class="org.apache.derby.jdbc.EmbeddedDataSource">
<property name="databaseName" value="derbydb"/>
<property name="createDatabase" value="create"/>
</bean>
-->
</beans>
<!-- END SNIPPET: xbean -->

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="BrokerA" persistent="false" useJmx="false">
<transportConnectors>
<transportConnector uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="multicast://default"/>
</networkConnectors>
<persistenceAdapter>
<memoryPersistenceAdapter/>
</persistenceAdapter>
</broker>
</beans>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="BrokerB" persistent="false" useJmx="false">
<transportConnectors>
<transportConnector uri="tcp://localhost:61617" discoveryUri="multicast://default"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="multicast://default"/>
</networkConnectors>
<persistenceAdapter>
<memoryPersistenceAdapter/>
</persistenceAdapter>
</broker>
</beans>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="BrokerB" persistent="false" useJmx="false">
<transportConnectors>
<transportConnector uri="tcp://localhost:0" discoveryUri="multicast://default"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="multicast://default"/>
</networkConnectors>
<persistenceAdapter>
<memoryPersistenceAdapter/>
</persistenceAdapter>
</broker>
</beans>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<!DOCTYPE beans PUBLIC "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
<beans>
<broker name="receiver">
<connector>
<tcpServerTransport uri="tcp://localhost:62002"/>
</connector>
<discoveryAgent>
<activeClusterDiscovery uri="multicast://224.1.2.3:2123" subject="org.apache.activemq.discover"/>
</discoveryAgent>
<discoveryNetworkConnector/>
<persistence>
<vmPersistence/>
</persistence>
</broker>
</beans>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="receiver" persistent="false" useJmx="false">
<transportConnectors>
<transportConnector uri="tcp://localhost:0" discoveryUri="multicast://default"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="multicast://default"/>
</networkConnectors>
<persistenceAdapter>
<memoryPersistenceAdapter/>
</persistenceAdapter>
</broker>
</beans>
<!-- END SNIPPET: example -->

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="receiver" persistent="false">
<transportConnectors>
<transportConnector uri="http://localhost:62302"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="static:(failover:http://localhost:62301)"/>
</networkConnectors>
<persistenceAdapter>
<memoryPersistenceAdapter/>
</persistenceAdapter>
</broker>
</beans>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans>
<broker name="receiver">
<connector>
<tcpServerTransport uri="tcp://localhost:62002"/>
</connector>
<discoveryAgent>
<zeroconfDiscovery type="_activemq.broker.development."/>
</discoveryAgent>
<discoveryNetworkConnector/>
<persistence>
<vmPersistence/>
</persistence>
</broker>
</beans>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="receiver" persistent="false" useJmx="false">
<transportConnectors>
<transportConnector uri="tcp://localhost:62002"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="static:(failover:tcp://localhost:62001)"/>
</networkConnectors>
<persistenceAdapter>
<memoryPersistenceAdapter/>
</persistenceAdapter>
</broker>
</beans>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans>
<broker name="sender">
<connector>
<tcpServerTransport uri="tcp://localhost:62001"/>
</connector>
<discoveryAgent>
<activeClusterDiscovery uri="multicast://224.1.2.3:2123" subject="org.apache.activemq.discover"/>
</discoveryAgent>
<discoveryNetworkConnector/>
<persistence>
<vmPersistence/>
</persistence>
</broker>
</beans>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="sender" persistent="false" useJmx="false">
<transportConnectors>
<transportConnector uri="tcp://localhost:0" discoveryUri="multicast://default"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="multicast://default"/>
</networkConnectors>
<persistenceAdapter>
<memoryPersistenceAdapter/>
</persistenceAdapter>
</broker>
</beans>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="sender" persistent="false">
<transportConnectors>
<transportConnector uri="http://localhost:62301"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="static:(failover:http://localhost:62302)"/>
</networkConnectors>
<persistenceAdapter>
<memoryPersistenceAdapter/>
</persistenceAdapter>
</broker>
</beans>

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//ACTIVEMQ//DTD//EN" "http://activemq.org/dtd/activemq.dtd">
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans>
<broker name="sender">
<connector>
<tcpServerTransport uri="tcp://localhost:62001"/>
</connector>
<discoveryAgent>
<zeroconfDiscovery type="_activemq.broker.development."/>
</discoveryAgent>
<discoveryNetworkConnector/>
<persistence>
<vmPersistence/>
</persistence>
</broker>
</beans>

View File

@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2005-2006 The Apache Software Foundation
Licensed 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.
-->
<beans xmlns="http://activemq.org/config/1.0">
<broker brokerName="sender" persistent="false" useJmx="false">
<transportConnectors>
<transportConnector uri="tcp://localhost:62001"/>
</transportConnectors>
<networkConnectors>
<networkConnector uri="static:(failover:tcp://localhost:62002)"/>
</networkConnectors>
<persistenceAdapter>
<memoryPersistenceAdapter/>
</persistenceAdapter>
</broker>
</beans>