summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorStephen Vinoski <vinoski@apache.org>2006-11-18 03:48:15 +0000
committerStephen Vinoski <vinoski@apache.org>2006-11-18 03:48:15 +0000
commitbe9f473e274d6cfe4cf8d8b04dd3f5a171ba9de4 (patch)
tree5f155aab31fc2f3871c0b7421d4d7c56e80f3b0a /java
parent1db5a8a2329ec064d1683294ee1a3d8d233de42d (diff)
downloadqpid-python-be9f473e274d6cfe4cf8d8b04dd3f5a171ba9de4.tar.gz
complete bringing initial maven work to trunk
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@476431 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/broker/pom.xml132
-rw-r--r--java/broker/src/main/java/log4j.properties (renamed from java/broker/src/log4j.properties)0
-rw-r--r--java/broker/src/main/java/org/apache/qpid/server/Main.java87
-rw-r--r--java/client/pom.xml152
-rw-r--r--java/client/src/main/java/log4j.properties (renamed from java/client/src/log4j.properties)0
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/transport/SocketTransportConnection.java14
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java38
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/transport/VmPipeTransportConnection.java9
-rw-r--r--java/client/src/test/java/org/apache/qpid/codec/BasicDeliverTest.java7
-rw-r--r--java/client/src/test/java/org/apache/qpid/codec/Client.java6
-rw-r--r--java/client/src/test/java/org/apache/qpid/codec/Server.java7
-rw-r--r--java/client/src/test/java/org/apache/qpid/mina/AcceptorTest.java14
-rw-r--r--java/client/src/test/java/org/apache/qpid/mina/WriterTest.java8
-rw-r--r--java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/TestIoSession.java6
-rw-r--r--java/cluster/pom.xml75
-rw-r--r--java/cluster/src/main/java/org/apache/qpid/server/cluster/Main.java14
-rw-r--r--java/cluster/src/main/java/org/apache/qpid/server/cluster/MinaBrokerProxy.java9
-rw-r--r--java/cluster/src/test/java/org/apache/qpid/server/cluster/TestSession.java7
-rw-r--r--java/common/pom.xml90
-rw-r--r--java/common/protocol-version.xml123
-rw-r--r--java/common/src/main/versions/ProtocolVersionList.java.tmpl (renamed from java/common/src/main/resources/ProtocolVersionList.java)0
-rw-r--r--java/common/src/main/xsl/cluster.asl (renamed from java/common/src/main/resources/cluster.asl)0
-rw-r--r--java/common/src/main/xsl/framing.xsl (renamed from java/common/stylesheets/framing.xsl)0
-rw-r--r--java/common/src/main/xsl/java.xsl (renamed from java/common/stylesheets/java.xsl)0
-rw-r--r--java/common/src/main/xsl/prepare1.xsl (renamed from java/common/stylesheets/prepare1.xsl)0
-rw-r--r--java/common/src/main/xsl/prepare2.xsl (renamed from java/common/stylesheets/prepare2.xsl)0
-rw-r--r--java/common/src/main/xsl/prepare3.xsl (renamed from java/common/stylesheets/prepare3.xsl)0
-rw-r--r--java/common/src/main/xsl/readme.txt (renamed from java/common/stylesheets/readme.txt)0
-rw-r--r--java/common/src/main/xsl/registry.template (renamed from java/common/src/main/resources/registry.template)0
-rw-r--r--java/common/src/main/xsl/registry.xsl (renamed from java/common/stylesheets/registry.xsl)0
-rw-r--r--java/common/src/main/xsl/utils.xsl (renamed from java/common/stylesheets/utils.xsl)0
-rw-r--r--java/distribution/pom.xml110
-rw-r--r--java/distribution/src/main/assembly/bin.xml153
-rw-r--r--java/distribution/src/main/assembly/src.xml72
-rw-r--r--java/distribution/src/main/release/DISCLAIMER5
-rw-r--r--java/pom.xml688
-rw-r--r--java/systests/pom.xml117
-rw-r--r--java/systests/src/test/java/org/apache/qpid/server/protocol/MockIoSession.java13
38 files changed, 1837 insertions, 119 deletions
diff --git a/java/broker/pom.xml b/java/broker/pom.xml
new file mode 100644
index 0000000000..c66ddd82e6
--- /dev/null
+++ b/java/broker/pom.xml
@@ -0,0 +1,132 @@
+<!--
+ 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ <name>Qpid Broker</name>
+ <url>http://cwiki.apache.org/confluence/display/qpid</url>
+
+ <parent>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid</artifactId>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <topDirectoryLocation>..</topDirectoryLocation>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.mina</groupId>
+ <artifactId>mina-filter-ssl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.mina</groupId>
+ <artifactId>mina-java5</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>backport-util-concurrent</groupId>
+ <artifactId>backport-util-concurrent</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>ant-test</id>
+ <phase>test</phase>
+ <configuration>
+ <tasks unless="${maven.test.skip}">
+ <taskdef name="junit"
+ classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
+ <classpath>
+ <path refid="maven.test.classpath"/>
+ </classpath>
+ </taskdef>
+ <mkdir dir="${project.build.directory}/test-classes"/>
+ <junit fork="yes" showoutput="true" haltonfailure="yes">
+ <test name="org.apache.qpid.server.UnitTests"
+ todir="${project.build.directory}"/>
+ <formatter type="plain"/>
+ <classpath>
+ <path refid="maven.test.classpath"/>
+ </classpath>
+ </junit>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/java/broker/src/log4j.properties b/java/broker/src/main/java/log4j.properties
index 87f04f4991..87f04f4991 100644
--- a/java/broker/src/log4j.properties
+++ b/java/broker/src/main/java/log4j.properties
diff --git a/java/broker/src/main/java/org/apache/qpid/server/Main.java b/java/broker/src/main/java/org/apache/qpid/server/Main.java
index d2dacb6140..a1dabcd964 100644
--- a/java/broker/src/main/java/org/apache/qpid/server/Main.java
+++ b/java/broker/src/main/java/org/apache/qpid/server/Main.java
@@ -46,6 +46,7 @@ import org.apache.log4j.xml.DOMConfigurator;
import org.apache.mina.common.ByteBuffer;
import org.apache.mina.common.IoAcceptor;
import org.apache.mina.common.SimpleByteBufferAllocator;
+import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
import org.apache.mina.transport.socket.nio.SocketSessionConfig;
import javax.management.JMException;
@@ -64,6 +65,7 @@ import java.util.List;
/**
* Main entry point for AMQPD.
+ *
*/
public class Main implements ProtocolVersionList
{
@@ -120,10 +122,10 @@ public class Main implements ProtocolVersionList
Option bind = OptionBuilder.withArgName("bind").hasArg().withDescription("bind to the specified address. Overrides any value in the config file").
withLongOpt("bind").create("b");
Option logconfig = OptionBuilder.withArgName("logconfig").hasArg().withDescription("use the specified log4j xml configuration file. By " +
- "default looks for a file named " + DEFAULT_LOG_CONFIG_FILENAME + " in the same directory as the configuration file").
+ "default looks for a file named " + DEFAULT_LOG_CONFIG_FILENAME + " in the same directory as the configuration file").
withLongOpt("logconfig").create("l");
Option logwatchconfig = OptionBuilder.withArgName("logwatch").hasArg().withDescription("monitor the log file configuration file for changes. Units are seconds. " +
- "Zero means do not check for changes.").withLongOpt("logwatch").create("w");
+ "Zero means do not check for changes.").withLongOpt("logwatch").create("w");
options.addOption(help);
options.addOption(version);
@@ -147,12 +149,10 @@ public class Main implements ProtocolVersionList
{
String ver = "Qpid 0.9.0.0";
String protocol = "AMQP version(s) [major.minor]: ";
- for (int i = 0; i < pv.length; i++)
+ for (int i=0; i<pv.length; i++)
{
if (i > 0)
- {
protocol += ", ";
- }
protocol += pv[i][PROTOCOL_MAJOR] + "." + pv[i][PROTOCOL_MINOR];
}
System.out.println(ver + " (" + protocol + ")");
@@ -223,8 +223,7 @@ public class Main implements ProtocolVersionList
ConnectorConfiguration connectorConfig = ApplicationRegistry.getInstance().
getConfiguredObject(ConnectorConfiguration.class);
- // From old Mina
- //ByteBuffer.setUseDirectBuffers(connectorConfig.enableDirectBuffers);
+ ByteBuffer.setUseDirectBuffers(connectorConfig.enableDirectBuffers);
// the MINA default is currently to use the pooled allocator although this may change in future
// once more testing of the performance of the simple allocator has been done
@@ -259,12 +258,12 @@ public class Main implements ProtocolVersionList
int totalVHosts = ((Collection) virtualHosts).size();
for (int vhost = 0; vhost < totalVHosts; vhost++)
{
- setupVirtualHosts(configFile.getParent(), (String) ((List) virtualHosts).get(vhost));
+ setupVirtualHosts(configFile.getParent() , (String)((List)virtualHosts).get(vhost));
}
}
else
{
- setupVirtualHosts(configFile.getParent(), (String) virtualHosts);
+ setupVirtualHosts(configFile.getParent() , (String)virtualHosts);
}
}
bind(port, connectorConfig);
@@ -281,7 +280,7 @@ public class Main implements ProtocolVersionList
configFilePath = configFileParent + configFilePath.substring(configVar.length());
}
- if (configFilePath.indexOf(".xml") != -1)
+ if (configFilePath.indexOf(".xml") != -1 )
{
VirtualHostConfiguration vHostConfig = new VirtualHostConfiguration(configFilePath);
vHostConfig.performBindings();
@@ -294,11 +293,11 @@ public class Main implements ProtocolVersionList
String[] fileNames = virtualHostDir.list();
- for (int each = 0; each < fileNames.length; each++)
+ for (int each=0; each < fileNames.length; each++)
{
if (fileNames[each].endsWith(".xml"))
{
- VirtualHostConfiguration vHostConfig = new VirtualHostConfiguration(configFilePath + "/" + fileNames[each]);
+ VirtualHostConfiguration vHostConfig = new VirtualHostConfiguration(configFilePath+"/"+fileNames[each]);
vHostConfig.performBindings();
}
}
@@ -317,10 +316,8 @@ public class Main implements ProtocolVersionList
{
//IoAcceptor acceptor = new SocketAcceptor(connectorConfig.processors);
IoAcceptor acceptor = connectorConfig.createAcceptor();
-
- SocketSessionConfig sc;
-
- sc = (SocketSessionConfig) acceptor.getSessionConfig();
+ SocketAcceptorConfig sconfig = (SocketAcceptorConfig) acceptor.getDefaultConfig();
+ SocketSessionConfig sc = (SocketSessionConfig) sconfig.getSessionConfig();
sc.setReceiveBufferSize(connectorConfig.socketReceiveBufferSize);
sc.setSendBufferSize(connectorConfig.socketWriteBuferSize);
@@ -330,7 +327,7 @@ public class Main implements ProtocolVersionList
// implementation provided by MINA
if (connectorConfig.enableExecutorPool)
{
- acceptor.setThreadModel(new ReadWriteThreadModel());
+ sconfig.setThreadModel(new ReadWriteThreadModel());
}
if (connectorConfig.enableNonSSL)
@@ -345,9 +342,7 @@ public class Main implements ProtocolVersionList
{
bindAddress = new InetSocketAddress(InetAddress.getByAddress(parseIP(bindAddr)), port);
}
- acceptor.setLocalAddress(bindAddress);
- acceptor.setHandler(handler);
- acceptor.bind();
+ acceptor.bind(bindAddress, handler, sconfig);
_logger.info("Qpid.AMQP listening on non-SSL address " + bindAddress);
}
@@ -357,9 +352,8 @@ public class Main implements ProtocolVersionList
handler.setUseSSL(true);
try
{
- acceptor.setLocalAddress(new InetSocketAddress(connectorConfig.sslPort));
- acceptor.setHandler(handler);
- acceptor.bind();
+ acceptor.bind(new InetSocketAddress(connectorConfig.sslPort),
+ handler, sconfig);
_logger.info("Qpid.AMQP listening on SSL port " + connectorConfig.sslPort);
}
catch (IOException e)
@@ -414,16 +408,15 @@ public class Main implements ProtocolVersionList
catch (NumberFormatException e)
{
System.err.println("Log watch configuration value of " + logWatchConfig + " is invalid. Must be " +
- "a non-negative integer. Using default of zero (no watching configured");
+ "a non-negative integer. Using default of zero (no watching configured");
}
if (logConfigFile.exists() && logConfigFile.canRead())
{
System.out.println("Configuring logger using configuration file " + logConfigFile.getAbsolutePath());
-
if (logWatchTime > 0)
{
System.out.println("log file " + logConfigFile.getAbsolutePath() + " will be checked for changes every " +
- logWatchTime + " seconds");
+ logWatchTime + " seconds");
// log4j expects the watch interval in milliseconds
DOMConfigurator.configureAndWatch(logConfigFile.getAbsolutePath(), logWatchTime * 1000);
}
@@ -448,7 +441,7 @@ public class Main implements ProtocolVersionList
}
catch (NotCompliantMBeanException ex)
{
- throw new AMQException("Exception occured in creating AMQBrokerManager MBean.");
+ throw new AMQException("Exception occured in creating AMQBrokerManager MBean.");
}
}
@@ -458,24 +451,24 @@ public class Main implements ProtocolVersionList
*/
@MBeanDescription("This MBean exposes the broker level management features")
private final class AMQBrokerManager extends AMQManagedObject
- implements ManagedBroker
+ implements ManagedBroker
{
- private final QueueRegistry _queueRegistry;
+ private final QueueRegistry _queueRegistry;
private final ExchangeRegistry _exchangeRegistry;
- private final ExchangeFactory _exchangeFactory;
- private final MessageStore _messageStore;
+ private final ExchangeFactory _exchangeFactory;
+ private final MessageStore _messageStore;
@MBeanConstructor("Creates the Broker Manager MBean")
- protected AMQBrokerManager() throws NotCompliantMBeanException
+ protected AMQBrokerManager() throws NotCompliantMBeanException
{
super(ManagedBroker.class, ManagedBroker.TYPE);
IApplicationRegistry appRegistry = ApplicationRegistry.getInstance();
- _queueRegistry = appRegistry.getQueueRegistry();
+ _queueRegistry = appRegistry.getQueueRegistry();
_exchangeRegistry = appRegistry.getExchangeRegistry();
- _exchangeFactory = ApplicationRegistry.getInstance().getExchangeFactory();
- _messageStore = ApplicationRegistry.getInstance().getMessageStore();
- }
+ _exchangeFactory = ApplicationRegistry.getInstance().getExchangeFactory();
+ _messageStore = ApplicationRegistry.getInstance().getMessageStore();
+ }
public String getObjectInstanceName()
{
@@ -484,7 +477,6 @@ public class Main implements ProtocolVersionList
/**
* Creates new exchange and registers it with the registry.
- *
* @param exchangeName
* @param type
* @param durable
@@ -495,7 +487,7 @@ public class Main implements ProtocolVersionList
String type,
boolean durable,
boolean autoDelete)
- throws JMException
+ throws JMException
{
try
{
@@ -506,10 +498,10 @@ public class Main implements ProtocolVersionList
if (exchange == null)
{
exchange = _exchangeFactory.createExchange(exchangeName,
- type, //eg direct
- durable,
- autoDelete,
- 0); //ticket no
+ type, //eg direct
+ durable,
+ autoDelete,
+ 0); //ticket no
_exchangeRegistry.registerExchange(exchange);
}
else
@@ -518,7 +510,7 @@ public class Main implements ProtocolVersionList
}
}
}
- catch (AMQException ex)
+ catch(AMQException ex)
{
_logger.error("Error in creating exchange " + exchangeName, ex);
throw new MBeanException(ex, ex.toString());
@@ -527,12 +519,11 @@ public class Main implements ProtocolVersionList
/**
* Unregisters the exchange from registry.
- *
* @param exchangeName
* @throws JMException
*/
public void unregisterExchange(String exchangeName)
- throws JMException
+ throws JMException
{
boolean inUse = false;
// TODO
@@ -543,7 +534,7 @@ public class Main implements ProtocolVersionList
{
_exchangeRegistry.unregisterExchange(exchangeName, false);
}
- catch (AMQException ex)
+ catch(AMQException ex)
{
_logger.error("Error in unregistering exchange " + exchangeName, ex);
throw new MBeanException(ex, ex.toString());
@@ -553,7 +544,6 @@ public class Main implements ProtocolVersionList
/**
* Creates a new queue and registers it with the registry and puts it
* in persistance storage if durable queue.
- *
* @param queueName
* @param durable
* @param owner
@@ -564,7 +554,7 @@ public class Main implements ProtocolVersionList
boolean durable,
String owner,
boolean autoDelete)
- throws JMException
+ throws JMException
{
AMQQueue queue = _queueRegistry.getQueue(queueName);
if (queue == null)
@@ -592,7 +582,6 @@ public class Main implements ProtocolVersionList
/**
* Deletes the queue from queue registry and persistant storage.
- *
* @param queueName
* @throws JMException
*/
diff --git a/java/client/pom.xml b/java/client/pom.xml
new file mode 100644
index 0000000000..71e8fb59e9
--- /dev/null
+++ b/java/client/pom.xml
@@ -0,0 +1,152 @@
+<!--
+ 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-client</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ <name>Qpid Client</name>
+ <url>http://cwiki.apache.org/confluence/display/qpid</url>
+
+ <parent>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid</artifactId>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <topDirectoryLocation>..</topDirectoryLocation>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jms_1.1_spec</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.mina</groupId>
+ <artifactId>mina-filter-ssl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>jmscts</groupId>
+ <artifactId>jmscts</artifactId>
+ <version>0.5-b2</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>jms</groupId>
+ <artifactId>jms</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>xml-security</groupId>
+ <artifactId>xml-security</artifactId>
+ <version>1.0.4</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>ant-test</id>
+ <phase>test</phase>
+ <configuration>
+ <tasks unless="${maven.test.skip}">
+ <taskdef name="junit"
+ classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
+ <classpath>
+ <path refid="maven.test.classpath"/>
+ </classpath>
+ </taskdef>
+ <mkdir dir="${project.build.directory}/test-classes"/>
+ <junit fork="yes" printsummary="yes" showoutput="true" haltonfailure="yes">
+ <sysproperty key="amqj.noAutoCreateVMBroker" value="true"/>
+ <formatter type="plain"/>
+ <classpath>
+ <path refid="maven.test.classpath"/>
+ </classpath>
+ <batchtest fork="yes" todir="${project.build.directory}">
+ <fileset dir="src/test/java">
+ <include name="**/test/unit/**/*Test.java"/>
+ <exclude name="**/test/unit/**/*UnitTests.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/java/client/src/log4j.properties b/java/client/src/main/java/log4j.properties
index 371cfb6d61..371cfb6d61 100644
--- a/java/client/src/log4j.properties
+++ b/java/client/src/main/java/log4j.properties
diff --git a/java/client/src/main/java/org/apache/qpid/client/transport/SocketTransportConnection.java b/java/client/src/main/java/org/apache/qpid/client/transport/SocketTransportConnection.java
index 94eb1b3d7a..78d937f453 100644
--- a/java/client/src/main/java/org/apache/qpid/client/transport/SocketTransportConnection.java
+++ b/java/client/src/main/java/org/apache/qpid/client/transport/SocketTransportConnection.java
@@ -20,6 +20,7 @@
*/
package org.apache.qpid.client.transport;
+import org.apache.qpid.client.AMQConnection;
import org.apache.qpid.client.protocol.AMQProtocolHandler;
import org.apache.qpid.pool.ReadWriteThreadModel;
import org.apache.qpid.jms.BrokerDetails;
@@ -28,7 +29,7 @@ import org.apache.mina.common.ByteBuffer;
import org.apache.mina.common.ConnectFuture;
import org.apache.mina.common.IoConnector;
import org.apache.mina.common.SimpleByteBufferAllocator;
-
+import org.apache.mina.transport.socket.nio.SocketConnectorConfig;
import org.apache.mina.transport.socket.nio.SocketSessionConfig;
import java.io.IOException;
@@ -53,7 +54,7 @@ public class SocketTransportConnection implements ITransportConnection
public void connect(AMQProtocolHandler protocolHandler, BrokerDetails brokerDetail)
throws IOException
{
- ByteBuffer.setPreferDirectBuffers(Boolean.getBoolean("amqj.enableDirectBuffers"));
+ ByteBuffer.setUseDirectBuffers(Boolean.getBoolean("amqj.enableDirectBuffers"));
// the MINA default is currently to use the pooled allocator although this may change in future
// once more testing of the performance of the simple allocator has been done
@@ -63,15 +64,17 @@ public class SocketTransportConnection implements ITransportConnection
}
final IoConnector ioConnector = _socketConnectorFactory.newSocketConnector();
+ SocketConnectorConfig cfg = (SocketConnectorConfig) ioConnector.getDefaultConfig();
+
// if we do not use our own thread model we get the MINA default which is to use
// its own leader-follower model
boolean readWriteThreading = Boolean.getBoolean("amqj.shared_read_write_pool");
if (readWriteThreading)
{
- ioConnector.setThreadModel(new ReadWriteThreadModel());
+ cfg.setThreadModel(new ReadWriteThreadModel());
}
- SocketSessionConfig scfg = (SocketSessionConfig) ioConnector.getSessionConfig();
+ SocketSessionConfig scfg = (SocketSessionConfig) cfg.getSessionConfig();
scfg.setTcpNoDelay("true".equalsIgnoreCase(System.getProperty("amqj.tcpNoDelay", "true")));
scfg.setSendBufferSize(Integer.getInteger("amqj.sendBufferSize", DEFAULT_BUFFER_SIZE));
_logger.info("send-buffer-size = " + scfg.getSendBufferSize());
@@ -80,8 +83,7 @@ public class SocketTransportConnection implements ITransportConnection
final InetSocketAddress address = new InetSocketAddress(brokerDetail.getHost(), brokerDetail.getPort());
protocolHandler.setUseSSL(brokerDetail.useSSL());
_logger.info("Attempting connection to " + address);
- ioConnector.setHandler(protocolHandler);
- ConnectFuture future = ioConnector.connect(address);
+ ConnectFuture future = ioConnector.connect(address, protocolHandler);
// wait for connection to complete
if (future.join(brokerDetail.getTimeout()))
diff --git a/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java b/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
index 5bb975b503..ead8308143 100644
--- a/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
+++ b/java/client/src/main/java/org/apache/qpid/client/transport/TransportConnection.java
@@ -23,6 +23,8 @@ package org.apache.qpid.client.transport;
import org.apache.log4j.Logger;
import org.apache.mina.common.IoConnector;
import org.apache.mina.common.IoHandlerAdapter;
+import org.apache.mina.common.IoServiceConfig;
+
import org.apache.mina.transport.vmpipe.VmPipeAcceptor;
import org.apache.mina.transport.vmpipe.VmPipeAddress;
@@ -32,6 +34,7 @@ import org.apache.qpid.jms.BrokerDetails;
import org.apache.qpid.pool.ReadWriteThreadModel;
import org.apache.qpid.client.vmbroker.AMQVMBrokerCreationException;
+
import java.io.IOException;
import java.util.HashMap;
import java.util.Iterator;
@@ -65,7 +68,9 @@ public class TransportConnection
{
_acceptor = new VmPipeAcceptor();
- _acceptor.setThreadModel(new ReadWriteThreadModel());
+ IoServiceConfig config = _acceptor.getDefaultConfig();
+
+ config.setThreadModel(new ReadWriteThreadModel());
}
public static ITransportConnection getInstance() throws AMQTransportConnectionException
@@ -135,7 +140,7 @@ public class TransportConnection
break;
case VM:
{
- _instance = getVMTransport(details, Boolean.getBoolean("amqj.noAutoCreateVMBroker"));
+ _instance = getVMTransport(details, Boolean.getBoolean("amqj.AutoCreateVMBroker"));
break;
}
}
@@ -158,23 +163,20 @@ public class TransportConnection
return -1;
}
- private static ITransportConnection getVMTransport(BrokerDetails details, boolean noAutoCreate) throws AMQVMBrokerCreationException
+ private static ITransportConnection getVMTransport(BrokerDetails details, boolean AutoCreate) throws AMQVMBrokerCreationException
{
int port = details.getPort();
if (!_inVmPipeAddress.containsKey(port))
{
- if (noAutoCreate)
+ if (AutoCreate)
{
- throw new AMQVMBrokerCreationException(port, "VM Broker on port " + port + " does not exist. Auto create disabled.");
-
+ createVMBroker(port);
}
else
{
- _logger.info("Auto Creating VMBroker on port " + port);
- createVMBroker(port);
+ throw new AMQVMBrokerCreationException(port, "VM Broker on port " + port + " does not exist. Auto create disabled.");
}
-
}
return new VmPipeTransportConnection(port);
@@ -195,9 +197,7 @@ public class TransportConnection
provider = createBrokerInstance(port);
- _acceptor.setLocalAddress(pipe);
- _acceptor.setHandler(provider);
- _acceptor.bind();
+ _acceptor.bind(pipe, provider);
_inVmPipeAddress.put(port, pipe);
_logger.info("Created InVM Qpid.AMQP listening on port " + port);
@@ -213,7 +213,7 @@ public class TransportConnection
try
{
- _acceptor.unbind();
+ _acceptor.unbind(pipe);
}
catch (Exception ignore)
{
@@ -225,10 +225,8 @@ public class TransportConnection
provider = createBrokerInstance(port);
}
- _acceptor.setLocalAddress(pipe);
- _acceptor.setHandler(provider);
- _acceptor.bind();
- _inVmPipeAddress.put(port, _acceptor);
+ _acceptor.bind(pipe, provider);
+ _inVmPipeAddress.put(port, pipe);
_logger.info("Created InVM Qpid.AMQP listening on port " + port);
}
catch (IOException justUseFirstException)
@@ -296,14 +294,14 @@ public class TransportConnection
public static void killAllVMBrokers()
{
_logger.info("Killing all VM Brokers");
+ _acceptor.unbindAll();
Iterator keys = _inVmPipeAddress.keySet().iterator();
while (keys.hasNext())
{
int id = (Integer) keys.next();
-
- ((VmPipeAcceptor)_inVmPipeAddress.remove(id)).unbind();
+ _inVmPipeAddress.remove(id);
}
}
@@ -315,7 +313,7 @@ public class TransportConnection
{
_logger.info("Killing VM Broker:" + port);
_inVmPipeAddress.remove(port);
- _acceptor.unbind();
+ _acceptor.unbind(pipe);
}
}
diff --git a/java/client/src/main/java/org/apache/qpid/client/transport/VmPipeTransportConnection.java b/java/client/src/main/java/org/apache/qpid/client/transport/VmPipeTransportConnection.java
index b871759428..6287d70a56 100644
--- a/java/client/src/main/java/org/apache/qpid/client/transport/VmPipeTransportConnection.java
+++ b/java/client/src/main/java/org/apache/qpid/client/transport/VmPipeTransportConnection.java
@@ -28,6 +28,7 @@ import org.apache.qpid.pool.ReferenceCountingExecutorService;
import org.apache.qpid.jms.BrokerDetails;
import org.apache.log4j.Logger;
import org.apache.mina.common.ConnectFuture;
+import org.apache.mina.common.IoServiceConfig;
import org.apache.mina.transport.vmpipe.VmPipeAddress;
import org.apache.mina.transport.vmpipe.VmPipeConnector;
@@ -47,18 +48,18 @@ public class VmPipeTransportConnection implements ITransportConnection
public void connect(AMQProtocolHandler protocolHandler, BrokerDetails brokerDetail) throws IOException
{
final VmPipeConnector ioConnector = new VmPipeConnector();
+ final IoServiceConfig cfg = ioConnector.getDefaultConfig();
ReferenceCountingExecutorService executorService = ReferenceCountingExecutorService.getInstance();
PoolingFilter asyncRead = new PoolingFilter(executorService, PoolingFilter.READ_EVENTS,
"AsynchronousReadFilter");
- ioConnector.getFilterChain().addFirst("AsynchronousReadFilter", asyncRead);
+ cfg.getFilterChain().addFirst("AsynchronousReadFilter", asyncRead);
PoolingFilter asyncWrite = new PoolingFilter(executorService, PoolingFilter.WRITE_EVENTS,
"AsynchronousWriteFilter");
- ioConnector.getFilterChain().addLast("AsynchronousWriteFilter", asyncWrite);
+ cfg.getFilterChain().addLast("AsynchronousWriteFilter", asyncWrite);
final VmPipeAddress address = new VmPipeAddress(_port);
_logger.info("Attempting connection to " + address);
- ioConnector.setHandler(protocolHandler);
- ConnectFuture future = ioConnector.connect(address);
+ ConnectFuture future = ioConnector.connect(address, protocolHandler);
// wait for connection to complete
future.join();
// we call getSession which throws an IOException if there has been an error connecting
diff --git a/java/client/src/test/java/org/apache/qpid/codec/BasicDeliverTest.java b/java/client/src/test/java/org/apache/qpid/codec/BasicDeliverTest.java
index ecbf3ad230..892b349cea 100644
--- a/java/client/src/test/java/org/apache/qpid/codec/BasicDeliverTest.java
+++ b/java/client/src/test/java/org/apache/qpid/codec/BasicDeliverTest.java
@@ -159,6 +159,11 @@ public class BasicDeliverTest
return null; //To change body of implemented methods use File | Settings | File Templates.
}
+ public IoServiceConfig getServiceConfig()
+ {
+ return null;
+ }
+
public IoHandler getHandler()
{
return null; //To change body of implemented methods use File | Settings | File Templates.
@@ -194,7 +199,7 @@ public class BasicDeliverTest
return null; //To change body of implemented methods use File | Settings | File Templates.
}
- public int getScheduledWriteMessages()
+ public int getScheduledWriteRequests()
{
return 0; //To change body of implemented methods use File | Settings | File Templates.
}
diff --git a/java/client/src/test/java/org/apache/qpid/codec/Client.java b/java/client/src/test/java/org/apache/qpid/codec/Client.java
index b015c08afb..c0de5ab133 100644
--- a/java/client/src/test/java/org/apache/qpid/codec/Client.java
+++ b/java/client/src/test/java/org/apache/qpid/codec/Client.java
@@ -53,11 +53,7 @@ public class Client extends IoHandlerAdapter
AMQDataBlock block = BasicDeliverTest.getDataBlock(size);
InetSocketAddress address = new InetSocketAddress(host, port);
-
- SocketConnector ioConnector = new SocketConnector();
- ioConnector.setHandler(this);
- ConnectFuture future = ioConnector.connect(address);
-
+ ConnectFuture future = new SocketConnector().connect(address, this);
future.join();
_session = future.getSession();
diff --git a/java/client/src/test/java/org/apache/qpid/codec/Server.java b/java/client/src/test/java/org/apache/qpid/codec/Server.java
index 2639656e41..fa4295e0b2 100644
--- a/java/client/src/test/java/org/apache/qpid/codec/Server.java
+++ b/java/client/src/test/java/org/apache/qpid/codec/Server.java
@@ -34,12 +34,7 @@ public class Server extends IoHandlerAdapter
{
Server(int port) throws Exception
{
-
- SocketAcceptor acceptor = new SocketAcceptor();
-
- acceptor.setLocalAddress(new InetSocketAddress(port));
- acceptor.setHandler(this);
- acceptor.bind();
+ new SocketAcceptor().bind(new InetSocketAddress(port), this);
System.out.println("Listening on " + port);
}
diff --git a/java/client/src/test/java/org/apache/qpid/mina/AcceptorTest.java b/java/client/src/test/java/org/apache/qpid/mina/AcceptorTest.java
index a665463736..bae3a60675 100644
--- a/java/client/src/test/java/org/apache/qpid/mina/AcceptorTest.java
+++ b/java/client/src/test/java/org/apache/qpid/mina/AcceptorTest.java
@@ -27,6 +27,7 @@ import org.apache.mina.common.IoAcceptor;
import org.apache.mina.common.IoHandlerAdapter;
import org.apache.mina.common.IoSession;
import org.apache.mina.transport.socket.nio.SocketAcceptor;
+import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
import org.apache.mina.transport.socket.nio.SocketSessionConfig;
import org.junit.Test;
import org.apache.qpid.pool.ReadWriteThreadModel;
@@ -75,18 +76,17 @@ public class AcceptorTest
{
IoAcceptor acceptor = null;
acceptor = new SocketAcceptor();
-
- SocketSessionConfig sc = (SocketSessionConfig) acceptor.getSessionConfig();
+
+ SocketAcceptorConfig config = (SocketAcceptorConfig) acceptor.getDefaultConfig();
+ SocketSessionConfig sc = (SocketSessionConfig) config.getSessionConfig();
sc.setTcpNoDelay(true);
sc.setSendBufferSize(32768);
sc.setReceiveBufferSize(32768);
- acceptor.setThreadModel(new ReadWriteThreadModel());
-
- acceptor.setLocalAddress(new InetSocketAddress(PORT));
- acceptor.setHandler(new TestHandler());
- acceptor.bind();
+ config.setThreadModel(new ReadWriteThreadModel());
+ acceptor.bind(new InetSocketAddress(PORT),
+ new TestHandler());
_logger.info("Bound on port " + PORT);
}
diff --git a/java/client/src/test/java/org/apache/qpid/mina/WriterTest.java b/java/client/src/test/java/org/apache/qpid/mina/WriterTest.java
index 798cde9366..dc29861c87 100644
--- a/java/client/src/test/java/org/apache/qpid/mina/WriterTest.java
+++ b/java/client/src/test/java/org/apache/qpid/mina/WriterTest.java
@@ -24,6 +24,7 @@ import junit.framework.JUnit4TestAdapter;
import org.apache.log4j.Logger;
import org.apache.mina.common.*;
import org.apache.mina.transport.socket.nio.SocketConnector;
+import org.apache.mina.transport.socket.nio.SocketConnectorConfig;
import org.apache.mina.transport.socket.nio.SocketSessionConfig;
import org.junit.Test;
@@ -180,15 +181,16 @@ public class WriterTest implements Runnable
ioConnector = new SocketConnector();
- SocketSessionConfig scfg = (SocketSessionConfig) ioConnector.getSessionConfig();
+ SocketConnectorConfig cfg = (SocketConnectorConfig) ioConnector.getDefaultConfig();
+ cfg.setThreadModel(ThreadModel.MANUAL);
+ SocketSessionConfig scfg = (SocketSessionConfig) cfg.getSessionConfig();
scfg.setTcpNoDelay(true);
scfg.setSendBufferSize(32768);
scfg.setReceiveBufferSize(32768);
final InetSocketAddress address = new InetSocketAddress("localhost", AcceptorTest.PORT);
_logger.info("Attempting connection to " + address);
- ioConnector.setHandler(new WriterHandler());
- ConnectFuture future = ioConnector.connect(address);
+ ConnectFuture future = ioConnector.connect(address, new WriterHandler());
// wait for connection to complete
future.join();
_logger.info("Connection completed");
diff --git a/java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/TestIoSession.java b/java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/TestIoSession.java
index 50940aa166..e800afc7ba 100644
--- a/java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/TestIoSession.java
+++ b/java/client/src/test/java/org/apache/qpid/test/unit/client/protocol/TestIoSession.java
@@ -45,6 +45,10 @@ public class TestIoSession extends BaseIoSession {
return null;
}
+ public IoServiceConfig getServiceConfig() {
+ return null;
+ }
+
public IoHandler getHandler() {
return null;
}
@@ -69,7 +73,7 @@ public class TestIoSession extends BaseIoSession {
return null;
}
- public int getScheduledWriteMessages() {
+ public int getScheduledWriteRequests() {
return 0;
}
diff --git a/java/cluster/pom.xml b/java/cluster/pom.xml
new file mode 100644
index 0000000000..a7c38e923b
--- /dev/null
+++ b/java/cluster/pom.xml
@@ -0,0 +1,75 @@
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-cluster</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ <name>Qpid Cluster</name>
+ <url>http://cwiki.apache.org/confluence/display/qpid</url>
+
+ <parent>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid</artifactId>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <topDirectoryLocation>..</topDirectoryLocation>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-client</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/java/cluster/src/main/java/org/apache/qpid/server/cluster/Main.java b/java/cluster/src/main/java/org/apache/qpid/server/cluster/Main.java
index 57779a0550..3eeddd7b4e 100644
--- a/java/cluster/src/main/java/org/apache/qpid/server/cluster/Main.java
+++ b/java/cluster/src/main/java/org/apache/qpid/server/cluster/Main.java
@@ -31,6 +31,7 @@ import org.apache.commons.cli.PosixParser;
import org.apache.log4j.Logger;
import org.apache.mina.common.IoAcceptor;
import org.apache.mina.transport.socket.nio.SocketAcceptor;
+import org.apache.mina.transport.socket.nio.SocketAcceptorConfig;
import org.apache.mina.transport.socket.nio.SocketSessionConfig;
import org.apache.qpid.pool.ReadWriteThreadModel;
import org.apache.qpid.server.registry.ApplicationRegistry;
@@ -71,7 +72,8 @@ public class Main extends org.apache.qpid.server.Main
try
{
IoAcceptor acceptor = new SocketAcceptor();
- SocketSessionConfig sc = (SocketSessionConfig) acceptor.getSessionConfig();
+ SocketAcceptorConfig sconfig = (SocketAcceptorConfig) acceptor.getDefaultConfig();
+ SocketSessionConfig sc = (SocketSessionConfig) sconfig.getSessionConfig();
sc.setReceiveBufferSize(connectorConfig.socketReceiveBufferSize);
sc.setSendBufferSize(connectorConfig.socketWriteBuferSize);
@@ -81,16 +83,14 @@ public class Main extends org.apache.qpid.server.Main
// implementation provided by MINA
if (connectorConfig.enableExecutorPool)
{
- acceptor.setThreadModel(new ReadWriteThreadModel());
+ sconfig.setThreadModel(new ReadWriteThreadModel());
}
String host = InetAddress.getLocalHost().getHostName();
ClusteredProtocolHandler handler = new ClusteredProtocolHandler(new InetSocketAddress(host, port));
if (connectorConfig.enableNonSSL)
{
- acceptor.setLocalAddress(new InetSocketAddress(port));
- acceptor.setHandler(handler);
- acceptor.bind();
+ acceptor.bind(new InetSocketAddress(port), handler, sconfig);
_logger.info("Qpid.AMQP listening on non-SSL port " + port);
handler.connect(commandLine.getOptionValue("j"));
}
@@ -99,9 +99,7 @@ public class Main extends org.apache.qpid.server.Main
{
ClusteredProtocolHandler sslHandler = new ClusteredProtocolHandler(handler);
sslHandler.setUseSSL(true);
- acceptor.setLocalAddress(new InetSocketAddress(connectorConfig.sslPort));
- acceptor.setHandler(handler);
- acceptor.bind();
+ acceptor.bind(new InetSocketAddress(connectorConfig.sslPort), handler, sconfig);
_logger.info("Qpid.AMQP listening on SSL port " + connectorConfig.sslPort);
}
}
diff --git a/java/cluster/src/main/java/org/apache/qpid/server/cluster/MinaBrokerProxy.java b/java/cluster/src/main/java/org/apache/qpid/server/cluster/MinaBrokerProxy.java
index ee3b3ceb8a..275ed39b5f 100644
--- a/java/cluster/src/main/java/org/apache/qpid/server/cluster/MinaBrokerProxy.java
+++ b/java/cluster/src/main/java/org/apache/qpid/server/cluster/MinaBrokerProxy.java
@@ -27,6 +27,7 @@ import org.apache.mina.common.IoSession;
import org.apache.mina.common.RuntimeIOException;
import org.apache.mina.filter.codec.ProtocolCodecFilter;
import org.apache.mina.transport.socket.nio.SocketConnector;
+import org.apache.mina.transport.socket.nio.SocketConnectorConfig;
import org.apache.mina.transport.socket.nio.SocketSessionConfig;
import org.apache.qpid.AMQException;
import org.apache.qpid.server.cluster.util.LogMessage;
@@ -62,7 +63,7 @@ public class MinaBrokerProxy extends Broker implements MethodHandler
{
super(host, port);
_local = local;
- _legacyHandler = new ClientHandlerRegistry(local);
+ _legacyHandler = new ClientHandlerRegistry(local);
}
private void init(IoSession session)
@@ -75,14 +76,14 @@ public class MinaBrokerProxy extends Broker implements MethodHandler
{
_logger.info("Connecting to cluster peer: " + getDetails());
SocketConnector ioConnector = new SocketConnector();
+ SocketConnectorConfig cfg = (SocketConnectorConfig) ioConnector.getDefaultConfig();
- SocketSessionConfig scfg = (SocketSessionConfig) ioConnector.getSessionConfig();
+ SocketSessionConfig scfg = (SocketSessionConfig) cfg.getSessionConfig();
scfg.setTcpNoDelay(true);
scfg.setSendBufferSize(32768);
scfg.setReceiveBufferSize(32768);
InetSocketAddress address = new InetSocketAddress(getHost(), getPort());
- ioConnector.setHandler(_binding);
- return ioConnector.connect(address);
+ return ioConnector.connect(address, _binding);
}
//extablish connection without handling redirect
diff --git a/java/cluster/src/test/java/org/apache/qpid/server/cluster/TestSession.java b/java/cluster/src/test/java/org/apache/qpid/server/cluster/TestSession.java
index da7c17c181..86ec808924 100644
--- a/java/cluster/src/test/java/org/apache/qpid/server/cluster/TestSession.java
+++ b/java/cluster/src/test/java/org/apache/qpid/server/cluster/TestSession.java
@@ -32,6 +32,11 @@ class TestSession implements IoSession
return null; //TODO
}
+ public IoServiceConfig getServiceConfig()
+ {
+ return null; //TODO
+ }
+
public IoHandler getHandler()
{
return null; //TODO
@@ -217,7 +222,7 @@ class TestSession implements IoSession
return 0; //TODO
}
- public int getScheduledWriteMessages()
+ public int getScheduledWriteRequests()
{
return 0; //TODO
}
diff --git a/java/common/pom.xml b/java/common/pom.xml
new file mode 100644
index 0000000000..b69e1e1ec3
--- /dev/null
+++ b/java/common/pom.xml
@@ -0,0 +1,90 @@
+<!--
+ 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-common</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ <name>Qpid Common Utilities</name>
+ <url>http://cwiki.apache.org/confluence/display/qpid</url>
+
+ <parent>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid</artifactId>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <topDirectoryLocation>..</topDirectoryLocation>
+ <cluster.asl>${basedir}/src/main/xsl/cluster.asl</cluster.asl>
+ <spec.stylesheet>${basedir}/src/main/xsl/framing.xsl</spec.stylesheet>
+ <registry.stylesheet>${basedir}/src/main/xsl/registry.xsl</registry.stylesheet>
+ <registry.template>${basedir}/src/main/xsl/registry.template</registry.template>
+ <generated.path>${project.build.directory}/generated/xsl</generated.path>
+ <generated.package>org/apache/qpid/framing</generated.package>
+ <generated.dir>${generated.path}/${generated.package}</generated.dir>
+ <specs.dir>${topDirectoryLocation}/../specs</specs.dir>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>protocol-version</id>
+ <phase>generate-sources</phase>
+ <configuration>
+ <tasks>
+ <ant antfile="protocol-version.xml">
+ <property name="cluster.asl" value="${cluster.asl}"/>
+ <property name="spec.stylesheet" value="${spec.stylesheet}"/>
+ <property name="registry.stylesheet" value="${registry.stylesheet}"/>
+ <property name="registry.template" value="${registry.template}"/>
+ <property name="generated.dir" value="${generated.dir}"/>
+ <property name="proto_version" value="${generated.dir}/ProtocolVersionList.java"/>
+ <property name="specs.dir" value="${specs.dir}"/>
+ </ant>
+ </tasks>
+ <sourceRoot>${generated.path}</sourceRoot>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.mina</groupId>
+ <artifactId>mina-core</artifactId>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/java/common/protocol-version.xml b/java/common/protocol-version.xml
new file mode 100644
index 0000000000..59e83d7f8f
--- /dev/null
+++ b/java/common/protocol-version.xml
@@ -0,0 +1,123 @@
+<!--
+ -
+ - 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.
+ -
+ -->
+<project name="Qpid Common Protocol Versions" default="generate">
+
+ <property name="saxon.jar" value="lib/saxon/saxon8.jar"/>
+
+ <macrodef name="saxon">
+ <attribute name="out"/>
+ <attribute name="src"/>
+ <attribute name="xsl"/>
+ <element name="args" implicit="true" optional="true"/>
+ <sequential>
+ <java jar="${saxon.jar}" fork="true">
+ <arg value="-o"/>
+ <arg value="@{out}"/>
+ <arg value="@{src}"/>
+ <arg value="@{xsl}"/>
+ <args/>
+ </java>
+ </sequential>
+ </macrodef>
+
+ <macrodef name="amqp">
+ <attribute name="ver"/>
+ <sequential>
+ <!-- Check for the existence of the AMQP specification file -->
+ <property name="amqpspecfile-@{ver}" value="${specs.dir}/amqp-@{ver}.xml"/>
+ <available file="${specs.dir}/amqp-@{ver}.xml"
+ property="amqpspecfile.present-@{ver}"/>
+ <fail unless="amqpspecfile.present-@{ver}"
+ message="ERROR: AMQP specification file ${specs.dir}/amqp-@{ver}.xml not found."/>
+
+ <!-- Read in the file as a set of properties; extract the amqp version -->
+ <xmlproperty prefix="@{ver}" file="${specs.dir}/amqp-@{ver}.xml"/>
+ <echo>Found AMQP specification file "${specs.dir}/amqp-@{ver}.xml"; major=${@{ver}.amqp(major)} minor=${@{ver}.amqp(minor)}</echo>
+
+ <!-- Add the version to the ProtocolVersionList.java file -->
+ <replaceregexp file="${proto_version}" match=" // !VER!"
+ replace=",${line.separator} {${@{ver}.amqp(major)}, ${@{ver}.amqp(minor)}} // !VER!"
+ flags="s" byline="true"/>
+ <replaceregexp file="${proto_version}" match=" // !VER1!"
+ replace="{${@{ver}.amqp(major)}, ${@{ver}.amqp(minor)}} // !VER!"
+ flags="s" byline="true"/>
+
+ <!-- Create directory; generate from specification file -->
+ <mkdir dir="${generated.dir}_${@{ver}.amqp(major)}_${@{ver}.amqp(minor)}"/>
+ <saxon out="${generated.dir}_${@{ver}.amqp(major)}_${@{ver}.amqp(minor)}/results.out"
+ src="${specs.dir}/amqp-@{ver}.xml"
+ xsl="${spec.stylesheet}">
+ <arg value="major=${@{ver}.amqp(major)}"/>
+ <arg value="minor=${@{ver}.amqp(minor)}"/>
+ <arg value="registry_name=MainRegistry"/>
+ </saxon>
+ <!-- -->
+ <saxon out="${generated.dir}_${@{ver}.amqp(major)}_${@{ver}.amqp(minor)}/cluster.out"
+ src="${cluster.asl}"
+ xsl="${spec.stylesheet}">
+ <arg value="major=${@{ver}.amqp(major)}"/>
+ <arg value="minor=${@{ver}.amqp(minor)}"/>
+ <arg value="registry_name=ClusterRegistry"/>
+ </saxon>
+ <saxon out="${generated.dir}_${@{ver}.amqp(major)}_${@{ver}.amqp(minor)}/registry.out"
+ src="${registry.template}"
+ xsl="${registry.stylesheet}">
+ <arg value="major=${@{ver}.amqp(major)}"/>
+ <arg value="minor=${@{ver}.amqp(minor)}"/>
+ </saxon>
+ </sequential>
+ </macrodef>
+
+<!-- <uptodate property="generated" targetfile="${generated.dir}/results.out"
+ srcfile="${amqp.xml}"/> -->
+
+<!-- <target name="generate" unless="generated"> -->
+ <target name="generate">
+ <mkdir dir="${generated.dir}"/>
+ <copy file="src/main/versions/ProtocolVersionList.java.tmpl" tofile="${proto_version}"
+ overwrite="true"/>
+ <!--
+ NOTE: Set the AMQP version numbers to be supported in this build here.
+ The last version in this list will be the version returned when a protocol
+ ProtocolInitiation NAK frame is returned by the broker. Usually this is the
+ highest or most recent version.
+ -->
+ <!-- <amqp ver="0.8"/>
+ <amqp ver="0.9"/>
+ <amqp ver="0.10"/> -->
+ <amqp ver="8.0"/>
+
+<!-- <saxon out="${generated.dir}/results.out" src="${amqp.xml}"
+ xsl="${stylesheet}">
+ <arg value="asl_base=${asl.base}"/>
+ <arg value="registry_name=MainRegistry"/>
+ </saxon>
+ <saxon out="${generated.dir}/cluster.out" src="${cluster.asl}"
+ xsl="${stylesheet}">
+ <arg value="registry_name=ClusterRegistry"/>
+ </saxon>
+ <saxon out="${generated.dir}/registry.out" src="${registry_template}"
+ xsl="${registry_stylesheet}"/> -->
+ </target>
+
+ <target name="precompile" depends="generate"/>
+
+</project>
diff --git a/java/common/src/main/resources/ProtocolVersionList.java b/java/common/src/main/versions/ProtocolVersionList.java.tmpl
index f0e202dac9..f0e202dac9 100644
--- a/java/common/src/main/resources/ProtocolVersionList.java
+++ b/java/common/src/main/versions/ProtocolVersionList.java.tmpl
diff --git a/java/common/src/main/resources/cluster.asl b/java/common/src/main/xsl/cluster.asl
index 40ca937904..40ca937904 100644
--- a/java/common/src/main/resources/cluster.asl
+++ b/java/common/src/main/xsl/cluster.asl
diff --git a/java/common/stylesheets/framing.xsl b/java/common/src/main/xsl/framing.xsl
index b8ae20aaf5..b8ae20aaf5 100644
--- a/java/common/stylesheets/framing.xsl
+++ b/java/common/src/main/xsl/framing.xsl
diff --git a/java/common/stylesheets/java.xsl b/java/common/src/main/xsl/java.xsl
index 685a9a27ed..685a9a27ed 100644
--- a/java/common/stylesheets/java.xsl
+++ b/java/common/src/main/xsl/java.xsl
diff --git a/java/common/stylesheets/prepare1.xsl b/java/common/src/main/xsl/prepare1.xsl
index 03e1fa7634..03e1fa7634 100644
--- a/java/common/stylesheets/prepare1.xsl
+++ b/java/common/src/main/xsl/prepare1.xsl
diff --git a/java/common/stylesheets/prepare2.xsl b/java/common/src/main/xsl/prepare2.xsl
index 14f4f33841..14f4f33841 100644
--- a/java/common/stylesheets/prepare2.xsl
+++ b/java/common/src/main/xsl/prepare2.xsl
diff --git a/java/common/stylesheets/prepare3.xsl b/java/common/src/main/xsl/prepare3.xsl
index f8cf0c8932..f8cf0c8932 100644
--- a/java/common/stylesheets/prepare3.xsl
+++ b/java/common/src/main/xsl/prepare3.xsl
diff --git a/java/common/stylesheets/readme.txt b/java/common/src/main/xsl/readme.txt
index b373055df9..b373055df9 100644
--- a/java/common/stylesheets/readme.txt
+++ b/java/common/src/main/xsl/readme.txt
diff --git a/java/common/src/main/resources/registry.template b/java/common/src/main/xsl/registry.template
index 87c5afcb7b..87c5afcb7b 100644
--- a/java/common/src/main/resources/registry.template
+++ b/java/common/src/main/xsl/registry.template
diff --git a/java/common/stylesheets/registry.xsl b/java/common/src/main/xsl/registry.xsl
index c70dbe21a5..c70dbe21a5 100644
--- a/java/common/stylesheets/registry.xsl
+++ b/java/common/src/main/xsl/registry.xsl
diff --git a/java/common/stylesheets/utils.xsl b/java/common/src/main/xsl/utils.xsl
index 95e15c6e38..95e15c6e38 100644
--- a/java/common/stylesheets/utils.xsl
+++ b/java/common/src/main/xsl/utils.xsl
diff --git a/java/distribution/pom.xml b/java/distribution/pom.xml
new file mode 100644
index 0000000000..f0eb3ab06a
--- /dev/null
+++ b/java/distribution/pom.xml
@@ -0,0 +1,110 @@
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-distribution</artifactId>
+ <packaging>jar</packaging>
+ <name>Qpid Distribution</name>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+
+ <parent>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid</artifactId>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <topDirectoryLocation>..</topDirectoryLocation>
+ <java.source.version>1.5</java.source.version>
+ <qpid.version>${pom.version}</qpid.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>${pom.groupId}</groupId>
+ <artifactId>qpid-common</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${pom.groupId}</groupId>
+ <artifactId>qpid-broker</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>${pom.groupId}</groupId>
+ <artifactId>qpid-client</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>${java.source.version}</source>
+ <target>${java.source.version}</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>${assembly.version}</version>
+ <executions>
+ <execution>
+ <id>distribution-package</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/bin.xml</descriptor>
+ <descriptor>src/main/assembly/src.xml</descriptor>
+ </descriptors>
+ <finalName>qpid-${pom.version}</finalName>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <finalName>qpid-incubating</finalName>
+ <archive>
+ <manifest>
+ <addClasspath>true</addClasspath>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/java/distribution/src/main/assembly/bin.xml b/java/distribution/src/main/assembly/bin.xml
new file mode 100644
index 0000000000..71ca92e30c
--- /dev/null
+++ b/java/distribution/src/main/assembly/bin.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<assembly>
+ <!-- id typically identifies the "type" (src vs bin etc) of the assembly -->
+ <id>java-bin</id>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <formats>
+ <format>tar.gz</format>
+ <format>zip</format>
+ </formats>
+
+ <fileSets>
+ <fileSet>
+ <directory>src/main/release</directory>
+ <outputDirectory>qpid-${qpid.version}</outputDirectory>
+ <includes>
+ <include>DISCLAIMER</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>..</directory>
+ <outputDirectory>qpid-${qpid.version}</outputDirectory>
+ <includes>
+ <include>*.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/release/etc</directory>
+ <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
+ <includes>
+ <include>logging.properties</include>
+ <include>log4j.properties</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>src/main/release/docs</directory>
+ <outputDirectory>qpid-${qpid.version}/docs</outputDirectory>
+ <includes>
+ <include>RELEASE_NOTES.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>target</directory>
+ <outputDirectory>qpid-${qpid.version}/lib</outputDirectory>
+ <includes>
+ <include>qpid-incubator.jar</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ <files>
+ <!-- due to a bug in the assembly plugin (MASSEMBLY-133) you have
+ to use decimal numbers to specify fileMode -->
+ <file>
+ <source>../common/etc/qpid-run.conf</source>
+ <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
+ <destName>qpid-run.conf</destName>
+ <fileMode>420</fileMode>
+ </file>
+ <file>
+ <source>../broker/etc/config.xml</source>
+ <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
+ <destName>config.xml</destName>
+ <fileMode>420</fileMode>
+ </file>
+ <file>
+ <source>../broker/etc/log4j.xml</source>
+ <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
+ <destName>log4j.xml</destName>
+ <fileMode>420</fileMode>
+ </file>
+ <file>
+ <source>../broker/etc/passwd</source>
+ <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
+ <destName>passwd</destName>
+ <fileMode>420</fileMode>
+ </file>
+ <file>
+ <source>../broker/etc/qpid-server.conf</source>
+ <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
+ <destName>qpid-server.conf</destName>
+ <fileMode>420</fileMode>
+ </file>
+ <file>
+ <source>../broker/etc/virtualhosts.xml</source>
+ <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
+ <destName>virtualhosts.xml</destName>
+ <fileMode>420</fileMode>
+ </file>
+ <file>
+ <source>../common/bin/qpid-run</source>
+ <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
+ <destName>qpid-run</destName>
+ <fileMode>493</fileMode>
+ </file>
+ <file>
+ <source>../broker/bin/qpid-server</source>
+ <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
+ <destName>qpid-server</destName>
+ <fileMode>493</fileMode>
+ </file>
+ <file>
+ <source>../broker/bin/qpid-server.bat</source>
+ <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
+ <destName>qpid-server.bat</destName>
+ <fileMode>493</fileMode>
+ </file>
+ <file>
+ <source>../broker/bin/run.bat</source>
+ <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
+ <destName>run.bat</destName>
+ <fileMode>493</fileMode>
+ </file>
+ <file>
+ <source>../broker/bin/run.sh</source>
+ <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
+ <destName>run.sh</destName>
+ <fileMode>493</fileMode>
+ </file>
+ <file>
+ <source>../broker/bin/runAll</source>
+ <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
+ <destName>runAll</destName>
+ <fileMode>493</fileMode>
+ </file>
+ </files>
+ <dependencySets>
+ <dependencySet>
+ <outputDirectory>qpid-${qpid.version}/lib</outputDirectory>
+ <unpack>false</unpack>
+ <excludes>
+ <exclude>org.apache.qpid:qpid-distribution</exclude>
+ </excludes>
+ <scope>runtime</scope>
+ </dependencySet>
+ </dependencySets>
+</assembly>
diff --git a/java/distribution/src/main/assembly/src.xml b/java/distribution/src/main/assembly/src.xml
new file mode 100644
index 0000000000..98040691ab
--- /dev/null
+++ b/java/distribution/src/main/assembly/src.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.
+-->
+<assembly>
+ <!-- id typically identifies the "type" (src vs bin etc) of the assembly -->
+ <id>java-src</id>
+ <includeBaseDirectory>false</includeBaseDirectory>
+ <formats>
+ <format>tar.gz</format>
+ <format>zip</format>
+ </formats>
+
+ <fileSets>
+ <fileSet>
+ <directory>src/main/release</directory>
+ <outputDirectory>qpid-${qpid.version}-src</outputDirectory>
+ <includes>
+ <include>DISCLAIMER</include>
+ <include>LICENSE</include>
+ <include>licenses/*.*</include>
+ <include>NOTICE</include>
+ <include>README</include>
+ <include>BUILDING.txt</include>
+ </includes>
+ </fileSet>
+ <fileSet>
+ <directory>..</directory>
+ <outputDirectory>qpid-${qpid.version}-src</outputDirectory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ <excludes>
+ <exclude>build.xml</exclude>
+ <exclude>distribution/build.xml</exclude>
+ <exclude>benchmark</exclude>
+ <exclude>benchmark/**/*</exclude>
+ <exclude>**/target</exclude>
+ <exclude>**/target/**/*</exclude>
+ <exclude>**/build</exclude>
+ <exclude>**/build/**/*</exclude>
+ <exclude>**/.settings</exclude>
+ <exclude>**/.classpath</exclude>
+ <exclude>**/.project</exclude>
+ <exclude>**/.wtpmodules</exclude>
+ <exclude>**/surefire*</exclude>
+ <exclude>**/cobertura.ser</exclude>
+ <exclude>bin</exclude>
+ <exclude>bin/*</exclude>
+ <exclude>lib</exclude>
+ <exclude>lib/**/*</exclude>
+ <exclude>**/var/journal</exclude>
+ <exclude>**/build.out*</exclude>
+ </excludes>
+ </fileSet>
+ </fileSets>
+</assembly>
diff --git a/java/distribution/src/main/release/DISCLAIMER b/java/distribution/src/main/release/DISCLAIMER
new file mode 100644
index 0000000000..c321113c9e
--- /dev/null
+++ b/java/distribution/src/main/release/DISCLAIMER
@@ -0,0 +1,5 @@
+Apache Qpid is an effort undergoing incubation at the Apache Software Foundation (ASF), sponsored by the Apache Incubator PMC.
+
+Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.
diff --git a/java/pom.xml b/java/pom.xml
new file mode 100644
index 0000000000..18306533b1
--- /dev/null
+++ b/java/pom.xml
@@ -0,0 +1,688 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid</artifactId>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ <name>Qpid</name>
+ <url>http://cwiki.apache.org/confluence/display/qpid</url>
+
+ <packaging>pom</packaging>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/qpid/trunk</connection>
+ <developerConnection>scm:svn:http://svn.apache.org/repos/asf/incubator/qpid/trunk</developerConnection>
+ <url>http://svn.apache.org/viewvc/incubator/qpid/trunk/</url>
+ </scm>
+
+ <prerequisites>
+ <maven>2.0.4</maven>
+ </prerequisites>
+
+ <inceptionYear>2006</inceptionYear>
+ <mailingLists>
+ <mailingList>
+ <name>Qpid Developer List</name>
+ <subscribe>qpid-dev-subscribe@incubator.apache.org</subscribe>
+ <unsubscribe>qpid-dev-unsubscribe@incubator.apache.org</unsubscribe>
+ <post>qpid-dev@incubator.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/incubator-qpid-dev</archive>
+ </mailingList>
+ <mailingList>
+ <name>Qpid Commits List</name>
+ <subscribe>qpid-commits-subscribe@incubator.apache.org</subscribe>
+ <unsubscribe>qpid-commits-unsubscribe@incubator.apache.org</unsubscribe>
+ <post>qpid-commits@incubator.apache.org</post>
+ <archive>http://mail-archives.apache.org/mod_mbox/incubator-qpid-commits</archive>
+ </mailingList>
+ </mailingLists>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <organization>
+ <name>Apache Software Foundation</name>
+ <url>http://www.apache.org/</url>
+ </organization>
+ <properties>
+ <topDirectoryLocation>.</topDirectoryLocation>
+
+ <surefire.fork.mode>once</surefire.fork.mode>
+ <surefire.format>brief</surefire.format>
+ <surefire.usefile>false</surefire.usefile>
+ <compile.forked>false</compile.forked>
+ <java.source.version>1.5</java.source.version>
+ <compile.flags>-Xlint:fallthrough,finally</compile.flags>
+
+ <!--Versions for various plugins and features -->
+ <antrun.version>1.2-SNAPSHOT</antrun.version>
+ <assembly.version>2.1</assembly.version>
+ <cobertura.version>2.0</cobertura.version>
+ <compiler.version>2.0.1</compiler.version>
+ <dependency.plugin.version>1.0</dependency.plugin.version>
+ <eclipse.plugin.version>2.2</eclipse.plugin.version>
+ <jar.version>2.0</jar.version>
+ <javadoc.version>2.0</javadoc.version>
+ <jxr.version>2.0</jxr.version>
+ <mprojectinfo.version>2.0</mprojectinfo.version>
+ <resources.version>2.2</resources.version>
+ <site.version>2.0-beta-5</site.version>
+ <surefire-report.version>2.1-SNAPSHOT</surefire-report.version>
+ <surefire.version>2.3-SNAPSHOT</surefire.version>
+
+ <eclipse.workspace.dir>${basedir}/${topDirectoryLocation}/../workspace</eclipse.workspace.dir>
+ </properties>
+
+ <modules>
+ <module>common</module>
+ <module>broker</module>
+ <module>client</module>
+ <module>cluster</module>
+ <module>systests</module>
+ </modules>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/java</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/main/resources-filtered</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ <filtering>true</filtering>
+ </resource>
+ <resource>
+ <directory>target/generated/src/main/resources</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </resource>
+ </resources>
+ <testResources>
+ <testResource>
+ <directory>src/test/java</directory>
+ <excludes>
+ <exclude>**/*.java</exclude>
+ </excludes>
+ </testResource>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <includes>
+ <include>**</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <directory>src/test/java</directory>
+ <includes>
+ <exclude>**/*.xml</exclude>
+ </includes>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>${antrun.version}</version>
+ <dependencies>
+ <dependency>
+ <groupId>xmlbeans</groupId>
+ <artifactId>xbean</artifactId>
+ <version>2.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>xmlbeans</groupId>
+ <artifactId>xbean_xpath</artifactId>
+ <version>2.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>xmlbeans</groupId>
+ <artifactId>xmlpublic</artifactId>
+ <version>2.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jsr173_api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>${jar.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>${resources.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>${compiler.version}</version>
+ <configuration>
+ <source>${java.source.version}</source>
+ <target>${java.source.version}</target>
+ <fork>${compile.forked}</fork>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>${surefire.version}</version>
+ <configuration>
+ <excludes>
+ <exclude>**/*$*</exclude>
+ </excludes>
+ <reportFormat>${surefire.format}</reportFormat>
+ <useFile>${surefire.usefile}</useFile>
+ <forkMode>${surefire.fork.mode}</forkMode>
+ <childDelegation>false</childDelegation>
+ <argLine>-ea</argLine>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>${site.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>${eclipse.plugin.version}</version>
+ <configuration>
+ <!--downloadSources>true</downloadSources-->
+ <buildcommands>
+ <java.lang.String>org.eclipse.jdt.core.javabuilder</java.lang.String>
+ <java.lang.String>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</java.lang.String>
+ <java.lang.String>net.sourceforge.pmd.runtime.pmdBuilder</java.lang.String>
+ </buildcommands>
+ <projectnatures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature>
+ <nature>net.sourceforge.pmd.runtime.pmdNature</nature>
+ </projectnatures>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <defaultGoal>install</defaultGoal>
+ </build>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>commons-attributes</groupId>
+ <artifactId>commons-attributes-api</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-attributes</groupId>
+ <artifactId>commons-attributes-compiler</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-cli</groupId>
+ <artifactId>commons-cli</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.3</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ <version>1.6</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ <version>0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-validator</groupId>
+ <artifactId>commons-validator</artifactId>
+ <version>1.1.4</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.geronimo.specs</groupId>
+ <artifactId>geronimo-jms_1.1_spec</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jsr173_api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>xml-resolver</groupId>
+ <artifactId>xml-resolver</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sf.saxon</groupId>
+ <artifactId>saxon</artifactId>
+ <version>8.7</version>
+ </dependency>
+ <dependency>
+ <groupId>xmlbeans</groupId>
+ <artifactId>xbean</artifactId>
+ <version>2.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>xmlbeans</groupId>
+ <artifactId>xbean_xpath</artifactId>
+ <version>2.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>xmlbeans</groupId>
+ <artifactId>xmlpublic</artifactId>
+ <version>2.1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>jython</groupId>
+ <artifactId>jython</artifactId>
+ <version>2.1</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.12</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.mina</groupId>
+ <artifactId>mina-core</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.mina</groupId>
+ <artifactId>mina-filter-ssl</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.mina</groupId>
+ <artifactId>mina-java5</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>backport-util-concurrent</groupId>
+ <artifactId>backport-util-concurrent</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-junit</artifactId>
+ <version>1.6.5</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymockclassextension</artifactId>
+ <version>2.2</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-client</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-mgmt-core</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-mgmt-client</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-cluster</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>cobertura-maven-plugin</artifactId>
+ <version>${cobertura.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ <version>${mprojectinfo.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ <version>${surefire-report.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>${javadoc.version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <configuration>
+ <configLocation>${basedir}/${topDirectoryLocation}/checkstyle.xml</configLocation>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ <configuration>
+ <targetJdk>${java.source.version}</targetJdk>
+ <rulesets>
+ <ruleset>${basedir}/.ruleset</ruleset>
+ </rulesets>
+ </configuration>
+ </plugin>
+ </plugins>
+ </reporting>
+
+ <repositories>
+ <!-- not picking up any snapshots at the moment
+ <repository>
+ <id>apache.snapshots</id>
+ <name>Apache SNAPSHOT Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </repository>
+ -->
+ </repositories>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>apache.snapshots</id>
+ <name>Apache SNAPSHOT Repository</name>
+ <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <profiles>
+ <profile>
+ <id>fastinstall</id>
+ <properties>
+ <maven.test.skip>true</maven.test.skip>
+ </properties>
+ </profile>
+ <profile>
+ <id>nochecks</id>
+ </profile>
+
+ <profile>
+ <!-- default profile enables checkstyle and Xlint stuff -->
+ <id>sourcecheck</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <showDeprecation>false</showDeprecation>
+ <compilerArgument>${compile.flags}</compilerArgument>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-pmd-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>setup.eclipse</id>
+ <build>
+ <defaultGoal>process-test-sources</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>setup.eclipse.project</id>
+ <phase>process-test-sources</phase>
+ <goals>
+ <goal>eclipse</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>setup.eclipse.workspace</id>
+ <phase>process-test-sources</phase>
+ <goals>
+ <goal>add-maven-repo</goal>
+ </goals>
+ <configuration>
+ <workspace>${eclipse.workspace.dir}</workspace>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>${antrun.version}</version>
+ <dependencies>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-nodeps</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-trax</artifactId>
+ <version>1.6.5</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <id>setup.workspace</id>
+ <phase>validate</phase>
+ <configuration>
+ <tasks>
+ <path id="ecp.ws.path" location="${eclipse.workspace.dir}"/>
+ <property name="full.eclipse.workspace" refid="ecp.ws.path"/>
+
+ <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings"/>
+ <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle"/>
+ <mkdir dir="${full.eclipse.workspace}/.metadata/.plugins/net.sourceforge.pmd.eclipse"/>
+ <copy file="${basedir}/${topDirectoryLocation}/checkstyle.xml" tofile="${full.eclipse.workspace}/cxf-checkstyle.xml"/>
+ <copy file="${basedir}/${topDirectoryLocation}/etc/apache-header.txt" tofile="${full.eclipse.workspace}/apache-header.txt"/>
+
+ <!-- Add checkstyle config -->
+ <copy file="${basedir}/${topDirectoryLocation}/etc/eclipse/template.checkstyle-config.xml"
+ tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml"
+ overwrite="no">
+ <filterset>
+ <filter token="CHECKSTYLE_CONFIG_FILE" value="${full.eclipse.workspace}/cxf-checkstyle.xml"/>
+ <filter token="APACHE_HEADER_FILE" value="${full.eclipse.workspace}/apache-header.txt"/>
+ </filterset>
+ </copy>
+
+ <xslt style="${basedir}/${topDirectoryLocation}/etc/eclipse/addcheckstyle.xsl"
+ in="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml"
+ out="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new">
+ <param name="checkstyleconfig" expression="${full.eclipse.workspace}/cxf-checkstyle.xml"/>
+ </xslt>
+ <copy
+ file="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml.new"
+ tofile="${full.eclipse.workspace}/.metadata/.plugins/com.atlassw.tools.eclipse.checkstyle/checkstyle-config.xml"
+ overwrite="yes"/>
+
+
+ <!-- Add warning flags that we want -->
+ <propertyfile file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs">
+ <entry key="org.eclipse.jdt.core.compiler.problem.missingSerialVersion" value="ignore"/>
+ <entry key="org.eclipse.jdt.core.compiler.problem.unusedImport" value="ignore"/>
+ <entry key="org.eclipse.jdt.core.compiler.problem.annotationSuperInterface" value="ignore"/>
+ </propertyfile>
+
+
+ <!-- Add code format rules -->
+ <concat destfile="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.core.prefs"
+ append="true" fixlastline="true">
+ <filelist dir="${basedir}/${topDirectoryLocation}/etc/eclipse" files="org.eclipse.jdt.core.prefs"/>
+ </concat>
+ <loadfile property="eclipse.code.format" srcFile="${basedir}/${topDirectoryLocation}/etc/eclipse/CXFCodeFormatter.xml"/>
+ <loadfile property="eclipse.code.templates" srcFile="${basedir}/${topDirectoryLocation}/etc/eclipse/codetemplates.xml"/>
+ <propertyfile file="${full.eclipse.workspace}/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs">
+ <entry key="formatter_profile" value="_CXF Java Conventions"/>
+ <entry key="org.eclipse.jdt.ui.formatterprofiles" value="${eclipse.code.format}"/>
+ <entry key="org.eclipse.jdt.ui.text.custom_code_templates" value="${eclipse.code.templates}"/>
+
+ <!-- Add import order -->
+ <entry key="org.eclipse.jdt.ui.importorder" value="java;javax;org.w3c;org.xml;junit;com;org;"/>
+ <!-- Sort order -->
+ <entry key="org.eclipse.jdt.ui.visibility.order" value="B,R,D,V,"/>
+ <entry key="outlinesortoption" value="T,SF,F,SI,I,C,SM,M,"/>
+ <entry key="org.eclipse.jdt.ui.enable.visibility.order" value="true"/>
+ </propertyfile>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/java/systests/pom.xml b/java/systests/pom.xml
new file mode 100644
index 0000000000..5d4b617cee
--- /dev/null
+++ b/java/systests/pom.xml
@@ -0,0 +1,117 @@
+<!--
+ 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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-systests</artifactId>
+ <packaging>jar</packaging>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ <name>Qpid System Tests</name>
+ <url>http://cwiki.apache.org/confluence/display/qpid</url>
+
+ <parent>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid</artifactId>
+ <version>1.0-incubating-M2-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <topDirectoryLocation>..</topDirectoryLocation>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-client</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.qpid</groupId>
+ <artifactId>qpid-broker</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>ant</groupId>
+ <artifactId>ant-junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>ant-test</id>
+ <phase>test</phase>
+ <configuration>
+ <tasks unless="${maven.test.skip}">
+ <taskdef name="junit"
+ classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask">
+ <classpath>
+ <path refid="maven.test.classpath"/>
+ </classpath>
+ </taskdef>
+ <mkdir dir="${project.build.directory}/test-classes"/>
+ <junit fork="yes" printsummary="yes" showoutput="true" haltonfailure="yes">
+ <sysproperty key="amqj.noAutoCreateVMBroker" value="true"/>
+ <formatter type="plain"/>
+ <classpath>
+ <path refid="maven.test.classpath"/>
+ </classpath>
+ <batchtest fork="yes" todir="${project.build.directory}">
+ <fileset dir="src/test/java">
+ <include name="**/server/UnitTests.java"/>
+ <include name="**/test/unit/ack/UnitTests.java"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/java/systests/src/test/java/org/apache/qpid/server/protocol/MockIoSession.java b/java/systests/src/test/java/org/apache/qpid/server/protocol/MockIoSession.java
index 28047832b8..81dea32a76 100644
--- a/java/systests/src/test/java/org/apache/qpid/server/protocol/MockIoSession.java
+++ b/java/systests/src/test/java/org/apache/qpid/server/protocol/MockIoSession.java
@@ -7,9 +7,9 @@
* 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
- *
+ *
+ * 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
@@ -52,6 +52,11 @@ public class MockIoSession implements IoSession
return null; //To change body of implemented methods use File | Settings | File Templates.
}
+ public IoServiceConfig getServiceConfig()
+ {
+ return null;
+ }
+
public IoHandler getHandler()
{
return null; //To change body of implemented methods use File | Settings | File Templates.
@@ -244,7 +249,7 @@ public class MockIoSession implements IoSession
return 0; //To change body of implemented methods use File | Settings | File Templates.
}
- public int getScheduledWriteMessages()
+ public int getScheduledWriteRequests()
{
return 0; //To change body of implemented methods use File | Settings | File Templates.
}