From be9f473e274d6cfe4cf8d8b04dd3f5a171ba9de4 Mon Sep 17 00:00:00 2001 From: Stephen Vinoski Date: Sat, 18 Nov 2006 03:48:15 +0000 Subject: 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 --- java/broker/pom.xml | 132 ++++ java/broker/src/log4j.properties | 24 - java/broker/src/main/java/log4j.properties | 24 + .../src/main/java/org/apache/qpid/server/Main.java | 87 ++- java/client/pom.xml | 152 +++++ java/client/src/log4j.properties | 28 - java/client/src/main/java/log4j.properties | 28 + .../transport/SocketTransportConnection.java | 14 +- .../qpid/client/transport/TransportConnection.java | 38 +- .../transport/VmPipeTransportConnection.java | 9 +- .../org/apache/qpid/codec/BasicDeliverTest.java | 7 +- .../test/java/org/apache/qpid/codec/Client.java | 6 +- .../test/java/org/apache/qpid/codec/Server.java | 7 +- .../java/org/apache/qpid/mina/AcceptorTest.java | 14 +- .../test/java/org/apache/qpid/mina/WriterTest.java | 8 +- .../test/unit/client/protocol/TestIoSession.java | 6 +- java/cluster/pom.xml | 75 +++ .../java/org/apache/qpid/server/cluster/Main.java | 14 +- .../qpid/server/cluster/MinaBrokerProxy.java | 9 +- .../apache/qpid/server/cluster/TestSession.java | 7 +- java/common/pom.xml | 90 +++ java/common/protocol-version.xml | 123 ++++ .../src/main/resources/ProtocolVersionList.java | 40 -- java/common/src/main/resources/cluster.asl | 59 -- java/common/src/main/resources/registry.template | 25 - .../main/versions/ProtocolVersionList.java.tmpl | 40 ++ java/common/src/main/xsl/cluster.asl | 59 ++ java/common/src/main/xsl/framing.xsl | 64 ++ java/common/src/main/xsl/java.xsl | 250 ++++++++ java/common/src/main/xsl/prepare1.xsl | 114 ++++ java/common/src/main/xsl/prepare2.xsl | 69 +++ java/common/src/main/xsl/prepare3.xsl | 65 ++ java/common/src/main/xsl/readme.txt | 52 ++ java/common/src/main/xsl/registry.template | 25 + java/common/src/main/xsl/registry.xsl | 32 + java/common/src/main/xsl/utils.xsl | 207 +++++++ java/common/stylesheets/framing.xsl | 64 -- java/common/stylesheets/java.xsl | 250 -------- java/common/stylesheets/prepare1.xsl | 114 ---- java/common/stylesheets/prepare2.xsl | 69 --- java/common/stylesheets/prepare3.xsl | 65 -- java/common/stylesheets/readme.txt | 52 -- java/common/stylesheets/registry.xsl | 32 - java/common/stylesheets/utils.xsl | 207 ------- java/distribution/pom.xml | 110 ++++ java/distribution/src/main/assembly/bin.xml | 153 +++++ java/distribution/src/main/assembly/src.xml | 72 +++ java/distribution/src/main/release/DISCLAIMER | 5 + java/pom.xml | 688 +++++++++++++++++++++ java/systests/pom.xml | 117 ++++ .../apache/qpid/server/protocol/MockIoSession.java | 13 +- 51 files changed, 2866 insertions(+), 1148 deletions(-) create mode 100644 java/broker/pom.xml delete mode 100644 java/broker/src/log4j.properties create mode 100644 java/broker/src/main/java/log4j.properties create mode 100644 java/client/pom.xml delete mode 100644 java/client/src/log4j.properties create mode 100644 java/client/src/main/java/log4j.properties create mode 100644 java/cluster/pom.xml create mode 100644 java/common/pom.xml create mode 100644 java/common/protocol-version.xml delete mode 100644 java/common/src/main/resources/ProtocolVersionList.java delete mode 100644 java/common/src/main/resources/cluster.asl delete mode 100644 java/common/src/main/resources/registry.template create mode 100644 java/common/src/main/versions/ProtocolVersionList.java.tmpl create mode 100644 java/common/src/main/xsl/cluster.asl create mode 100644 java/common/src/main/xsl/framing.xsl create mode 100644 java/common/src/main/xsl/java.xsl create mode 100644 java/common/src/main/xsl/prepare1.xsl create mode 100644 java/common/src/main/xsl/prepare2.xsl create mode 100644 java/common/src/main/xsl/prepare3.xsl create mode 100644 java/common/src/main/xsl/readme.txt create mode 100644 java/common/src/main/xsl/registry.template create mode 100644 java/common/src/main/xsl/registry.xsl create mode 100644 java/common/src/main/xsl/utils.xsl delete mode 100644 java/common/stylesheets/framing.xsl delete mode 100644 java/common/stylesheets/java.xsl delete mode 100644 java/common/stylesheets/prepare1.xsl delete mode 100644 java/common/stylesheets/prepare2.xsl delete mode 100644 java/common/stylesheets/prepare3.xsl delete mode 100644 java/common/stylesheets/readme.txt delete mode 100644 java/common/stylesheets/registry.xsl delete mode 100644 java/common/stylesheets/utils.xsl create mode 100644 java/distribution/pom.xml create mode 100644 java/distribution/src/main/assembly/bin.xml create mode 100644 java/distribution/src/main/assembly/src.xml create mode 100644 java/distribution/src/main/release/DISCLAIMER create mode 100644 java/pom.xml create mode 100644 java/systests/pom.xml (limited to 'java') 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 @@ + + + 4.0.0 + org.apache.qpid + qpid-broker + jar + 1.0-incubating-M2-SNAPSHOT + Qpid Broker + http://cwiki.apache.org/confluence/display/qpid + + + org.apache.qpid + qpid + 1.0-incubating-M2-SNAPSHOT + + + + .. + + + + + commons-cli + commons-cli + + + commons-configuration + commons-configuration + + + commons-lang + commons-lang + + + org.apache.mina + mina-filter-ssl + + + org.apache.mina + mina-java5 + + + backport-util-concurrent + backport-util-concurrent + + + org.apache.qpid + qpid-common + + + org.slf4j + slf4j-simple + + + junit + junit + test + + + ant + ant-junit + test + + + org.easymock + easymockclassextension + test + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + ant-test + test + + + + + + + + + + + + + + + + + + + run + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + diff --git a/java/broker/src/log4j.properties b/java/broker/src/log4j.properties deleted file mode 100644 index 87f04f4991..0000000000 --- a/java/broker/src/log4j.properties +++ /dev/null @@ -1,24 +0,0 @@ -# -# 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. -# -log4j.rootCategory=${amqj.logging.level}, console - -log4j.appender.console=org.apache.log4j.ConsoleAppender -log4j.appender.console.Threshold=info -log4j.appender.console.layout=org.apache.log4j.PatternLayout -log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n diff --git a/java/broker/src/main/java/log4j.properties b/java/broker/src/main/java/log4j.properties new file mode 100644 index 0000000000..87f04f4991 --- /dev/null +++ b/java/broker/src/main/java/log4j.properties @@ -0,0 +1,24 @@ +# +# 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. +# +log4j.rootCategory=${amqj.logging.level}, console + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.Threshold=info +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n 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 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 @@ + + + 4.0.0 + org.apache.qpid + qpid-client + jar + 1.0-incubating-M2-SNAPSHOT + Qpid Client + http://cwiki.apache.org/confluence/display/qpid + + + org.apache.qpid + qpid + 1.0-incubating-M2-SNAPSHOT + + + + .. + + + + + commons-codec + commons-codec + + + org.apache.geronimo.specs + geronimo-jms_1.1_spec + + + commons-collections + commons-collections + + + commons-lang + commons-lang + + + org.apache.mina + mina-filter-ssl + + + org.apache.qpid + qpid-common + + + org.apache.qpid + qpid-broker + + + org.slf4j + slf4j-simple + test + + + junit + junit + test + + + org.easymock + easymockclassextension + test + + + jmscts + jmscts + 0.5-b2 + test + + + jms + jms + + + + + xml-security + xml-security + 1.0.4 + test + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + ant-test + test + + + + + + + + + + + + + + + + + + + + + + + + + run + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + diff --git a/java/client/src/log4j.properties b/java/client/src/log4j.properties deleted file mode 100644 index 371cfb6d61..0000000000 --- a/java/client/src/log4j.properties +++ /dev/null @@ -1,28 +0,0 @@ -# -# 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. -# -log4j.rootLogger=${root.logging.level} - - -log4j.logger.org.apache.qpid=${amqj.logging.level}, console -log4j.additivity.org.apache.qpid=false - -log4j.appender.console=org.apache.log4j.ConsoleAppender -log4j.appender.console.Threshold=info -log4j.appender.console.layout=org.apache.log4j.PatternLayout -log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n diff --git a/java/client/src/main/java/log4j.properties b/java/client/src/main/java/log4j.properties new file mode 100644 index 0000000000..371cfb6d61 --- /dev/null +++ b/java/client/src/main/java/log4j.properties @@ -0,0 +1,28 @@ +# +# 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. +# +log4j.rootLogger=${root.logging.level} + + +log4j.logger.org.apache.qpid=${amqj.logging.level}, console +log4j.additivity.org.apache.qpid=false + +log4j.appender.console=org.apache.log4j.ConsoleAppender +log4j.appender.console.Threshold=info +log4j.appender.console.layout=org.apache.log4j.PatternLayout +log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n 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 @@ + + + 4.0.0 + org.apache.qpid + qpid-cluster + jar + 1.0-incubating-M2-SNAPSHOT + Qpid Cluster + http://cwiki.apache.org/confluence/display/qpid + + + org.apache.qpid + qpid + 1.0-incubating-M2-SNAPSHOT + + + + .. + + + + + org.apache.qpid + qpid-common + + + org.apache.qpid + qpid-client + + + org.apache.qpid + qpid-broker + + + junit + junit + test + + + ant + ant-junit + test + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + 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 @@ + + + 4.0.0 + org.apache.qpid + qpid-common + jar + 1.0-incubating-M2-SNAPSHOT + Qpid Common Utilities + http://cwiki.apache.org/confluence/display/qpid + + + org.apache.qpid + qpid + 1.0-incubating-M2-SNAPSHOT + + + + .. + ${basedir}/src/main/xsl/cluster.asl + ${basedir}/src/main/xsl/framing.xsl + ${basedir}/src/main/xsl/registry.xsl + ${basedir}/src/main/xsl/registry.template + ${project.build.directory}/generated/xsl + org/apache/qpid/framing + ${generated.path}/${generated.package} + ${topDirectoryLocation}/../specs + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + protocol-version + generate-sources + + + + + + + + + + + + + ${generated.path} + + + run + + + + + + + + + + log4j + log4j + + + org.apache.mina + mina-core + + + 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 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Found AMQP specification file "${specs.dir}/amqp-@{ver}.xml"; major=${@{ver}.amqp(major)} minor=${@{ver}.amqp(minor)} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/common/src/main/resources/ProtocolVersionList.java b/java/common/src/main/resources/ProtocolVersionList.java deleted file mode 100644 index f0e202dac9..0000000000 --- a/java/common/src/main/resources/ProtocolVersionList.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * - * 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. - * - */ - -/** - * This class is autogenerated, do not modify. - */ - -package org.apache.qpid.framing; - -/** - * NOTE: Don't remove the line containing the token VER or VER1 - these are - * markers for code generation. - */ - -public interface ProtocolVersionList -{ - public final int PROTOCOL_MAJOR = 0; - public final int PROTOCOL_MINOR = 1; - public final byte pv[][] = { - // !VER1! - }; -} diff --git a/java/common/src/main/resources/cluster.asl b/java/common/src/main/resources/cluster.asl deleted file mode 100644 index 40ca937904..0000000000 --- a/java/common/src/main/resources/cluster.asl +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - - An extension that allows brokers to communicate in order to - provide a clustered service to clients. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/common/src/main/resources/registry.template b/java/common/src/main/resources/registry.template deleted file mode 100644 index 87c5afcb7b..0000000000 --- a/java/common/src/main/resources/registry.template +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - diff --git a/java/common/src/main/versions/ProtocolVersionList.java.tmpl b/java/common/src/main/versions/ProtocolVersionList.java.tmpl new file mode 100644 index 0000000000..f0e202dac9 --- /dev/null +++ b/java/common/src/main/versions/ProtocolVersionList.java.tmpl @@ -0,0 +1,40 @@ +/** + * + * 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. + * + */ + +/** + * This class is autogenerated, do not modify. + */ + +package org.apache.qpid.framing; + +/** + * NOTE: Don't remove the line containing the token VER or VER1 - these are + * markers for code generation. + */ + +public interface ProtocolVersionList +{ + public final int PROTOCOL_MAJOR = 0; + public final int PROTOCOL_MINOR = 1; + public final byte pv[][] = { + // !VER1! + }; +} diff --git a/java/common/src/main/xsl/cluster.asl b/java/common/src/main/xsl/cluster.asl new file mode 100644 index 0000000000..40ca937904 --- /dev/null +++ b/java/common/src/main/xsl/cluster.asl @@ -0,0 +1,59 @@ + + + + + + + + + An extension that allows brokers to communicate in order to + provide a clustered service to clients. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/common/src/main/xsl/framing.xsl b/java/common/src/main/xsl/framing.xsl new file mode 100644 index 0000000000..b8ae20aaf5 --- /dev/null +++ b/java/common/src/main/xsl/framing.xsl @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/common/src/main/xsl/java.xsl b/java/common/src/main/xsl/java.xsl new file mode 100644 index 0000000000..685a9a27ed --- /dev/null +++ b/java/common/src/main/xsl/java.xsl @@ -0,0 +1,250 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + wrote + + + + + + + + + + + + +package org.apache.qpid.framing; + +import org.apache.mina.common.ByteBuffer; +import org.apache.qpid.framing.AMQFrame; +import org.apache.qpid.framing.AMQFrameDecodingException; +import org.apache.qpid.framing.AMQMethodBody; +import org.apache.qpid.framing.EncodableAMQDataBlock; +import org.apache.qpid.framing.EncodingUtils; +import org.apache.qpid.framing.FieldTable; + +/** + * This class is autogenerated, do not modify. [From ] + */ +public class extends AMQMethodBody implements EncodableAMQDataBlock +{ + public static final int CLASS_ID = ; + public static final int METHOD_ID = ; + + + public + + ; + + + protected int getClazz() + { + return ; + } + + protected int getMethod() + { + return ; + } + + protected int getBodySize() + { + + + return + + + + + + + ; + + return 0; + + } + + protected void writeMethodPayload(ByteBuffer buffer) + { + + + ; + + + EncodingUtils.writeBooleans(buffer, new boolean[]{ + }); + + + } + + public void populateMethodBodyFromBuffer(ByteBuffer buffer) throws AMQFrameDecodingException + { + + ; + + } + + public String toString() + { + StringBuffer buf = new StringBuffer(super.toString()); + + buf.append(" : ").append(); + + return buf.toString(); + } + + public static AMQFrame createAMQFrame(int channelId, ) + { + body = new (); + + ; + + AMQFrame frame = new AMQFrame(); + frame.channel = channelId; + frame.bodyFrame = body; + return frame; + } +} + + + + Matching root for registry mode! + + + + + +Wrote MethodBodyDecoderRegistry.java + + + +package org.apache.qpid.framing; + +import java.util.Map; +import java.util.HashMap; +import org.apache.log4j.Logger; +import org.apache.qpid.AMQException; +import org.apache.qpid.framing.AMQFrameDecodingException; +import org.apache.qpid.framing.AMQMethodBody; + +/** + * This class is autogenerated, do not modify. + */ +public final class MethodBodyDecoderRegistry +{ + private static final Logger _log = Logger.getLogger(MethodBodyDecoderRegistry.class); + + private static final Map _classMethodProductToMethodBodyMap = new HashMap(); + + static + { + + ; + + } + + public static AMQMethodBody get(int clazz, int method) throws AMQFrameDecodingException + { + Class bodyClass = (Class) _classMethodProductToMethodBodyMap.get(new Integer(clazz * 1000 + method)); + if (bodyClass != null) + { + try + { + return (AMQMethodBody) bodyClass.newInstance(); + } + catch (Exception e) + { + throw new AMQFrameDecodingException(_log, + "Unable to instantiate body class for class " + clazz + " and method " + method + ": " + e, e); + } + } + else + { + throw new AMQFrameDecodingException(_log, + "Unable to find a suitable decoder for class " + clazz + " and method " + method); + } + } +} + + + + + + + + wrote + + + +package org.apache.qpid.framing; + +import java.util.Map; + +/** + * This class is autogenerated, do not modify. [From ] + */ +class +{ + static void register(Map map) + { + + map.put(new Integer( + + * 1000 + + + ), + ); + + } +} + + + + + + diff --git a/java/common/src/main/xsl/prepare1.xsl b/java/common/src/main/xsl/prepare1.xsl new file mode 100644 index 0000000000..03e1fa7634 --- /dev/null +++ b/java/common/src/main/xsl/prepare1.xsl @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + ( + major= + , minor= + ) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Could not inherit from ; file not found. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/common/src/main/xsl/prepare2.xsl b/java/common/src/main/xsl/prepare2.xsl new file mode 100644 index 0000000000..14f4f33841 --- /dev/null +++ b/java/common/src/main/xsl/prepare2.xsl @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/common/src/main/xsl/prepare3.xsl b/java/common/src/main/xsl/prepare3.xsl new file mode 100644 index 0000000000..f8cf0c8932 --- /dev/null +++ b/java/common/src/main/xsl/prepare3.xsl @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + diff --git a/java/common/src/main/xsl/readme.txt b/java/common/src/main/xsl/readme.txt new file mode 100644 index 0000000000..b373055df9 --- /dev/null +++ b/java/common/src/main/xsl/readme.txt @@ -0,0 +1,52 @@ +This directory contains the xsl stylesheets used to generate the code from the +AMQP protocol specification. They require an XSLT2.0 processor, currently +Saxon 8 is used. + +The generation process is controlled by the framing.xsl stylesheet. This performs +several phases of transformation, using the other stylesheets. The transformation +in each phase is defined in a separate file, and these are designed to also allow +then to be run individually. + +The generation takes the amq.asl as input, it also requires that the path to the +directory where the base asl definitions reside (those definitions that the main +amq.asl defintion inherits from) be passed in via a paramter called asl_base. + +The files involved are as follows: + + framing.xsl The control file for the entire generation process + + prepare1.xsl Resolves the separate files that make up the protocol + definition, building a single tree containing all the + information as a set of 'frame' elements, each of which + has attributes for its name, and ids for the class and + method it refers to and contains zero or more field + elements. + + A method id is generated based on the order of the + method elements within the class elements in the original + specification. The class id is taken from the enclosing + class element. + + prepare2.xsl Resolves domains into their corresponding types. (This is + much easier when all the information is in a single tree, + hence the separate frame). + + prepare3.xsl Converts names into valid java names and augments the + tree to include information that makes the subsequent + generation phase simpler e.g. the index of boolean + fields as several boolean flags are combined into a + single byte. (This is easier once the domains have been + resolved, hence the separate phase). + + java.xsl Generates java classes for each frame, and a registry of + all the frames to a 'magic' number generated from their + class and method id. + + utils.xsl Contains some utility methods for e.g. producing valid + java names. + +For debugging the framing.xsl can output the intermediary files. This can be +enabled by uncommenting the relevant lines (a comment explaining this is +provided inline). + + \ No newline at end of file diff --git a/java/common/src/main/xsl/registry.template b/java/common/src/main/xsl/registry.template new file mode 100644 index 0000000000..87c5afcb7b --- /dev/null +++ b/java/common/src/main/xsl/registry.template @@ -0,0 +1,25 @@ + + + + + + diff --git a/java/common/src/main/xsl/registry.xsl b/java/common/src/main/xsl/registry.xsl new file mode 100644 index 0000000000..c70dbe21a5 --- /dev/null +++ b/java/common/src/main/xsl/registry.xsl @@ -0,0 +1,32 @@ + + + + + + + + + + + + + diff --git a/java/common/src/main/xsl/utils.xsl b/java/common/src/main/xsl/utils.xsl new file mode 100644 index 0000000000..95e15c6e38 --- /dev/null +++ b/java/common/src/main/xsl/utils.xsl @@ -0,0 +1,207 @@ + + + + + + + +/** +* +* 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. +* +*/ + + + + + + + char + short + int + String + byte[] + boolean + long + long + FieldTable + Object /*WARNING: undefined type*/ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /* WARNING: COULD NOT DETERMINE FIELD SIZE */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + /* WARNING: COULD NOT DETERMINE ENCODER */ + + + + + + + + + + boolean[] bools = EncodingUtils.readBooleans(buffer); + + + + + + + + + + + + + + + + + + + + + + + + + + + + /* WARNING: COULD NOT DETERMINE DECODER */ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/common/stylesheets/framing.xsl b/java/common/stylesheets/framing.xsl deleted file mode 100644 index b8ae20aaf5..0000000000 --- a/java/common/stylesheets/framing.xsl +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/common/stylesheets/java.xsl b/java/common/stylesheets/java.xsl deleted file mode 100644 index 685a9a27ed..0000000000 --- a/java/common/stylesheets/java.xsl +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - wrote - - - - - - - - - - - - -package org.apache.qpid.framing; - -import org.apache.mina.common.ByteBuffer; -import org.apache.qpid.framing.AMQFrame; -import org.apache.qpid.framing.AMQFrameDecodingException; -import org.apache.qpid.framing.AMQMethodBody; -import org.apache.qpid.framing.EncodableAMQDataBlock; -import org.apache.qpid.framing.EncodingUtils; -import org.apache.qpid.framing.FieldTable; - -/** - * This class is autogenerated, do not modify. [From ] - */ -public class extends AMQMethodBody implements EncodableAMQDataBlock -{ - public static final int CLASS_ID = ; - public static final int METHOD_ID = ; - - - public - - ; - - - protected int getClazz() - { - return ; - } - - protected int getMethod() - { - return ; - } - - protected int getBodySize() - { - - - return - - + - - - - ; - - return 0; - - } - - protected void writeMethodPayload(ByteBuffer buffer) - { - - - ; - - - EncodingUtils.writeBooleans(buffer, new boolean[]{ - }); - - - } - - public void populateMethodBodyFromBuffer(ByteBuffer buffer) throws AMQFrameDecodingException - { - - ; - - } - - public String toString() - { - StringBuffer buf = new StringBuffer(super.toString()); - - buf.append(" : ").append(); - - return buf.toString(); - } - - public static AMQFrame createAMQFrame(int channelId, ) - { - body = new (); - - ; - - AMQFrame frame = new AMQFrame(); - frame.channel = channelId; - frame.bodyFrame = body; - return frame; - } -} - - - - Matching root for registry mode! - - - - - -Wrote MethodBodyDecoderRegistry.java - - - -package org.apache.qpid.framing; - -import java.util.Map; -import java.util.HashMap; -import org.apache.log4j.Logger; -import org.apache.qpid.AMQException; -import org.apache.qpid.framing.AMQFrameDecodingException; -import org.apache.qpid.framing.AMQMethodBody; - -/** - * This class is autogenerated, do not modify. - */ -public final class MethodBodyDecoderRegistry -{ - private static final Logger _log = Logger.getLogger(MethodBodyDecoderRegistry.class); - - private static final Map _classMethodProductToMethodBodyMap = new HashMap(); - - static - { - - ; - - } - - public static AMQMethodBody get(int clazz, int method) throws AMQFrameDecodingException - { - Class bodyClass = (Class) _classMethodProductToMethodBodyMap.get(new Integer(clazz * 1000 + method)); - if (bodyClass != null) - { - try - { - return (AMQMethodBody) bodyClass.newInstance(); - } - catch (Exception e) - { - throw new AMQFrameDecodingException(_log, - "Unable to instantiate body class for class " + clazz + " and method " + method + ": " + e, e); - } - } - else - { - throw new AMQFrameDecodingException(_log, - "Unable to find a suitable decoder for class " + clazz + " and method " + method); - } - } -} - - - - - - - - wrote - - - -package org.apache.qpid.framing; - -import java.util.Map; - -/** - * This class is autogenerated, do not modify. [From ] - */ -class -{ - static void register(Map map) - { - - map.put(new Integer( - - * 1000 + - - ), - ); - - } -} - - - - - - diff --git a/java/common/stylesheets/prepare1.xsl b/java/common/stylesheets/prepare1.xsl deleted file mode 100644 index 03e1fa7634..0000000000 --- a/java/common/stylesheets/prepare1.xsl +++ /dev/null @@ -1,114 +0,0 @@ - - - - - - - - - - - - - - - - - - - - ( - major= - , minor= - ) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Could not inherit from ; file not found. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/common/stylesheets/prepare2.xsl b/java/common/stylesheets/prepare2.xsl deleted file mode 100644 index 14f4f33841..0000000000 --- a/java/common/stylesheets/prepare2.xsl +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/java/common/stylesheets/prepare3.xsl b/java/common/stylesheets/prepare3.xsl deleted file mode 100644 index f8cf0c8932..0000000000 --- a/java/common/stylesheets/prepare3.xsl +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - diff --git a/java/common/stylesheets/readme.txt b/java/common/stylesheets/readme.txt deleted file mode 100644 index b373055df9..0000000000 --- a/java/common/stylesheets/readme.txt +++ /dev/null @@ -1,52 +0,0 @@ -This directory contains the xsl stylesheets used to generate the code from the -AMQP protocol specification. They require an XSLT2.0 processor, currently -Saxon 8 is used. - -The generation process is controlled by the framing.xsl stylesheet. This performs -several phases of transformation, using the other stylesheets. The transformation -in each phase is defined in a separate file, and these are designed to also allow -then to be run individually. - -The generation takes the amq.asl as input, it also requires that the path to the -directory where the base asl definitions reside (those definitions that the main -amq.asl defintion inherits from) be passed in via a paramter called asl_base. - -The files involved are as follows: - - framing.xsl The control file for the entire generation process - - prepare1.xsl Resolves the separate files that make up the protocol - definition, building a single tree containing all the - information as a set of 'frame' elements, each of which - has attributes for its name, and ids for the class and - method it refers to and contains zero or more field - elements. - - A method id is generated based on the order of the - method elements within the class elements in the original - specification. The class id is taken from the enclosing - class element. - - prepare2.xsl Resolves domains into their corresponding types. (This is - much easier when all the information is in a single tree, - hence the separate frame). - - prepare3.xsl Converts names into valid java names and augments the - tree to include information that makes the subsequent - generation phase simpler e.g. the index of boolean - fields as several boolean flags are combined into a - single byte. (This is easier once the domains have been - resolved, hence the separate phase). - - java.xsl Generates java classes for each frame, and a registry of - all the frames to a 'magic' number generated from their - class and method id. - - utils.xsl Contains some utility methods for e.g. producing valid - java names. - -For debugging the framing.xsl can output the intermediary files. This can be -enabled by uncommenting the relevant lines (a comment explaining this is -provided inline). - - \ No newline at end of file diff --git a/java/common/stylesheets/registry.xsl b/java/common/stylesheets/registry.xsl deleted file mode 100644 index c70dbe21a5..0000000000 --- a/java/common/stylesheets/registry.xsl +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - diff --git a/java/common/stylesheets/utils.xsl b/java/common/stylesheets/utils.xsl deleted file mode 100644 index 95e15c6e38..0000000000 --- a/java/common/stylesheets/utils.xsl +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - -/** -* -* 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. -* -*/ - - - - - - - char - short - int - String - byte[] - boolean - long - long - FieldTable - Object /*WARNING: undefined type*/ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /* WARNING: COULD NOT DETERMINE FIELD SIZE */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - /* WARNING: COULD NOT DETERMINE ENCODER */ - - - - - - - - - - boolean[] bools = EncodingUtils.readBooleans(buffer); - - - - - - - - - - - - - - - - - - - - - - - - - - - - /* WARNING: COULD NOT DETERMINE DECODER */ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 @@ + + + 4.0.0 + org.apache.qpid + qpid-distribution + jar + Qpid Distribution + 1.0-incubating-M2-SNAPSHOT + + + org.apache.qpid + qpid + 1.0-incubating-M2-SNAPSHOT + + + + .. + 1.5 + ${pom.version} + + + + + ${pom.groupId} + qpid-common + ${pom.version} + + + ${pom.groupId} + qpid-broker + ${pom.version} + + + ${pom.groupId} + qpid-client + ${pom.version} + + + + + + + src/main/java + + **/* + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${java.source.version} + ${java.source.version} + + + + org.apache.maven.plugins + maven-assembly-plugin + ${assembly.version} + + + distribution-package + package + + single + + + + src/main/assembly/bin.xml + src/main/assembly/src.xml + + qpid-${pom.version} + + + + + + org.apache.maven.plugins + maven-jar-plugin + + qpid-incubating + + + true + + + + + + + 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 @@ + + + + + java-bin + false + + tar.gz + zip + + + + + src/main/release + qpid-${qpid.version} + + DISCLAIMER + + + + .. + qpid-${qpid.version} + + *.txt + + + + src/main/release/etc + qpid-${qpid.version}/etc + + logging.properties + log4j.properties + + + + src/main/release/docs + qpid-${qpid.version}/docs + + RELEASE_NOTES.txt + + + + target + qpid-${qpid.version}/lib + + qpid-incubator.jar + + + + + + + ../common/etc/qpid-run.conf + qpid-${qpid.version}/etc + qpid-run.conf + 420 + + + ../broker/etc/config.xml + qpid-${qpid.version}/etc + config.xml + 420 + + + ../broker/etc/log4j.xml + qpid-${qpid.version}/etc + log4j.xml + 420 + + + ../broker/etc/passwd + qpid-${qpid.version}/etc + passwd + 420 + + + ../broker/etc/qpid-server.conf + qpid-${qpid.version}/etc + qpid-server.conf + 420 + + + ../broker/etc/virtualhosts.xml + qpid-${qpid.version}/etc + virtualhosts.xml + 420 + + + ../common/bin/qpid-run + qpid-${qpid.version}/bin + qpid-run + 493 + + + ../broker/bin/qpid-server + qpid-${qpid.version}/bin + qpid-server + 493 + + + ../broker/bin/qpid-server.bat + qpid-${qpid.version}/bin + qpid-server.bat + 493 + + + ../broker/bin/run.bat + qpid-${qpid.version}/bin + run.bat + 493 + + + ../broker/bin/run.sh + qpid-${qpid.version}/bin + run.sh + 493 + + + ../broker/bin/runAll + qpid-${qpid.version}/bin + runAll + 493 + + + + + qpid-${qpid.version}/lib + false + + org.apache.qpid:qpid-distribution + + runtime + + + 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 @@ + + + + + java-src + false + + tar.gz + zip + + + + + src/main/release + qpid-${qpid.version}-src + + DISCLAIMER + LICENSE + licenses/*.* + NOTICE + README + BUILDING.txt + + + + .. + qpid-${qpid.version}-src + + **/* + + + build.xml + distribution/build.xml + benchmark + benchmark/**/* + **/target + **/target/**/* + **/build + **/build/**/* + **/.settings + **/.classpath + **/.project + **/.wtpmodules + **/surefire* + **/cobertura.ser + bin + bin/* + lib + lib/**/* + **/var/journal + **/build.out* + + + + 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 @@ + + + + + 4.0.0 + org.apache.qpid + qpid + 1.0-incubating-M2-SNAPSHOT + Qpid + http://cwiki.apache.org/confluence/display/qpid + + pom + + + scm:svn:http://svn.apache.org/repos/asf/incubator/qpid/trunk + scm:svn:http://svn.apache.org/repos/asf/incubator/qpid/trunk + http://svn.apache.org/viewvc/incubator/qpid/trunk/ + + + + 2.0.4 + + + 2006 + + + Qpid Developer List + qpid-dev-subscribe@incubator.apache.org + qpid-dev-unsubscribe@incubator.apache.org + qpid-dev@incubator.apache.org + http://mail-archives.apache.org/mod_mbox/incubator-qpid-dev + + + Qpid Commits List + qpid-commits-subscribe@incubator.apache.org + qpid-commits-unsubscribe@incubator.apache.org + qpid-commits@incubator.apache.org + http://mail-archives.apache.org/mod_mbox/incubator-qpid-commits + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + Apache Software Foundation + http://www.apache.org/ + + + . + + once + brief + false + false + 1.5 + -Xlint:fallthrough,finally + + + 1.2-SNAPSHOT + 2.1 + 2.0 + 2.0.1 + 1.0 + 2.2 + 2.0 + 2.0 + 2.0 + 2.0 + 2.2 + 2.0-beta-5 + 2.1-SNAPSHOT + 2.3-SNAPSHOT + + ${basedir}/${topDirectoryLocation}/../workspace + + + + common + broker + client + cluster + systests + + + + + + src/main/java + + **/*.java + + + + src/main/resources + + ** + + + + src/main/resources-filtered + + ** + + true + + + target/generated/src/main/resources + + ** + + + + + + src/test/java + + **/*.java + + + + src/test/resources + + ** + + + + src/test/java + + **/*.xml + + true + + + + + + org.apache.maven.plugins + maven-antrun-plugin + ${antrun.version} + + + xmlbeans + xbean + 2.0.0 + + + xmlbeans + xbean_xpath + 2.1.0 + + + xmlbeans + xmlpublic + 2.1.0 + + + javax.xml.bind + jsr173_api + 1.0 + + + ant + ant-nodeps + 1.6.5 + + + ant + ant-trax + 1.6.5 + + + + + org.apache.maven.plugins + maven-jar-plugin + ${jar.version} + + + org.apache.maven.plugins + maven-resources-plugin + ${resources.version} + + + org.apache.maven.plugins + maven-compiler-plugin + ${compiler.version} + + ${java.source.version} + ${java.source.version} + ${compile.forked} + + + + org.apache.maven.plugins + maven-surefire-plugin + ${surefire.version} + + + **/*$* + + ${surefire.format} + ${surefire.usefile} + ${surefire.fork.mode} + false + -ea + + + + org.apache.maven.plugins + maven-site-plugin + ${site.version} + + + org.apache.maven.plugins + maven-eclipse-plugin + ${eclipse.plugin.version} + + + + org.eclipse.jdt.core.javabuilder + com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder + net.sourceforge.pmd.runtime.pmdBuilder + + + org.eclipse.jdt.core.javanature + com.atlassw.tools.eclipse.checkstyle.CheckstyleNature + net.sourceforge.pmd.runtime.pmdNature + + + + + + install + + + + + + commons-attributes + commons-attributes-api + 2.1 + + + commons-attributes + commons-attributes-compiler + 2.1 + + + commons-beanutils + commons-beanutils + 1.6 + + + commons-cli + commons-cli + 1.0 + + + commons-codec + commons-codec + 1.3 + + + commons-collections + commons-collections + 3.1 + + + commons-configuration + commons-configuration + 1.2 + + + commons-dbcp + commons-dbcp + 1.2.1 + + + commons-digester + commons-digester + 1.6 + + + commons-discovery + commons-discovery + 0.2 + + + commons-fileupload + commons-fileupload + 1.0 + + + commons-httpclient + commons-httpclient + 3.0 + + + commons-lang + commons-lang + 2.1 + + + commons-logging + commons-logging + 1.0.4 + + + commons-pool + commons-pool + 1.2 + + + commons-validator + commons-validator + 1.1.4 + + + org.apache.geronimo.specs + geronimo-jms_1.1_spec + 1.0 + + + javax.xml.bind + jsr173_api + 1.0 + + + xml-resolver + xml-resolver + 1.1 + + + net.sf.saxon + saxon + 8.7 + + + xmlbeans + xbean + 2.0.0 + + + xmlbeans + xbean_xpath + 2.1.0 + + + xmlbeans + xmlpublic + 2.1.0 + + + jython + jython + 2.1 + + + log4j + log4j + 1.2.12 + + + org.slf4j + slf4j-simple + 1.0 + + + org.apache.mina + mina-core + 1.0.0 + + + org.apache.mina + mina-filter-ssl + 1.0.0 + + + org.apache.mina + mina-java5 + 1.0.0 + + + backport-util-concurrent + backport-util-concurrent + 2.2 + + + junit + junit + 4.0 + test + + + ant + ant-junit + 1.6.5 + test + + + org.easymock + easymockclassextension + 2.2 + test + + + org.apache.qpid + qpid-common + ${project.version} + + + org.apache.qpid + qpid-client + ${project.version} + + + org.apache.qpid + qpid-broker + ${project.version} + + + org.apache.qpid + qpid-mgmt-core + ${project.version} + + + org.apache.qpid + qpid-mgmt-client + ${project.version} + + + org.apache.qpid + qpid-cluster + ${project.version} + + + + + + + + org.codehaus.mojo + cobertura-maven-plugin + ${cobertura.version} + + + org.apache.maven.plugins + maven-project-info-reports-plugin + ${mprojectinfo.version} + + + org.apache.maven.plugins + maven-surefire-report-plugin + ${surefire-report.version} + + + org.apache.maven.plugins + maven-javadoc-plugin + ${javadoc.version} + + + org.apache.maven.plugins + maven-checkstyle-plugin + + ${basedir}/${topDirectoryLocation}/checkstyle.xml + + + + org.apache.maven.plugins + maven-pmd-plugin + + ${java.source.version} + + ${basedir}/.ruleset + + + + + + + + + + + + + apache.snapshots + Apache SNAPSHOT Repository + http://people.apache.org/repo/m2-snapshot-repository + + true + + + + + + + fastinstall + + true + + + + nochecks + + + + + sourcecheck + + true + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.5 + 1.5 + false + ${compile.flags} + + + + org.apache.maven.plugins + maven-pmd-plugin + + + + + + + setup.eclipse + + process-test-sources + + + org.apache.maven.plugins + maven-eclipse-plugin + + + setup.eclipse.project + process-test-sources + + eclipse + + + + setup.eclipse.workspace + process-test-sources + + add-maven-repo + + + ${eclipse.workspace.dir} + + + + + + org.apache.maven.plugins + maven-antrun-plugin + ${antrun.version} + + + ant + ant-nodeps + 1.6.5 + + + ant + ant-trax + 1.6.5 + + + + + setup.workspace + validate + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + run + + + + + + + + + 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 @@ + + + 4.0.0 + org.apache.qpid + qpid-systests + jar + 1.0-incubating-M2-SNAPSHOT + Qpid System Tests + http://cwiki.apache.org/confluence/display/qpid + + + org.apache.qpid + qpid + 1.0-incubating-M2-SNAPSHOT + + + + .. + + + + + org.apache.qpid + qpid-common + + + org.apache.qpid + qpid-client + + + org.apache.qpid + qpid-broker + + + org.slf4j + slf4j-simple + test + + + junit + junit + test + + + ant + ant-junit + test + + + + + + + org.apache.maven.plugins + maven-antrun-plugin + + + ant-test + test + + + + + + + + + + + + + + + + + + + + + + + + + run + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + 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. } -- cgit v1.2.1