svn commit: r732292 - /qpid/trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp
Author: gsim Date: Wed Jan 7 01:54:41 2009 New Revision: 732292 URL: http://svn.apache.org/viewvc?rev=732292&view=rev Log: Fix for windows build: add implementations of the getSecurityLayer() Modified: qpid/trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp?rev=732292&r1=732291&r2=732292&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/windows/SaslAuthenticator.cpp Wed Jan 7 01:54:41 2009 @@ -29,6 +29,7 @@ #include using namespace qpid::framing; +using qpid::sys::SecurityLayer; namespace qpid { namespace broker { @@ -43,6 +44,7 @@ void getMechanisms(framing::Array& mechanisms); void start(const std::string& mechanism, const std::string& response); void step(const std::string&) {} +std::auto_ptr getSecurityLayer(uint16_t maxFrameSize); }; class SspiAuthenticator : public SaslAuthenticator @@ -57,6 +59,7 @@ void getMechanisms(framing::Array& mechanisms); void start(const std::string& mechanism, const std::string& response); void step(const std::string& response); +std::auto_ptr getSecurityLayer(uint16_t maxFrameSize); }; bool SaslAuthenticator::available(void) @@ -109,6 +112,12 @@ client.tune(framing::CHANNEL_MAX, connection.getFrameMax(), 0, 0); } +std::auto_ptr NullAuthenticator::getSecurityLayer(uint16_t) +{ +std::auto_ptr securityLayer; +return securityLayer; +} + SspiAuthenticator::SspiAuthenticator(Connection& c) : userToken(INVALID_HANDLE_VALUE), connection(c), client(c.getOutput()) { @@ -172,4 +181,10 @@ QPID_LOG(info, "SASL: Need another step!!!"); } +std::auto_ptr SspiAuthenticator::getSecurityLayer(uint16_t) +{ +std::auto_ptr securityLayer; +return securityLayer; +} + }}
svn commit: r732297 - in /qpid/trunk/qpid/cpp/src: qpid/broker/DirectExchange.cpp qpid/sys/CopyOnWriteArray.h tests/ClientSessionTest.cpp
Author: gsim Date: Wed Jan 7 02:46:53 2009 New Revision: 732297 URL: http://svn.apache.org/viewvc?rev=732297&view=rev Log: QPID-1560: add support for a qpid.exclusive-binding option on direct exchange that causes the binding specified to be the only one for the given key. I.e. if there is already a binding at this exchange with this key it will be atomically updated to bind the new queue. Modified: qpid/trunk/qpid/cpp/src/qpid/broker/DirectExchange.cpp qpid/trunk/qpid/cpp/src/qpid/sys/CopyOnWriteArray.h qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/broker/DirectExchange.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/DirectExchange.cpp?rev=732297&r1=732296&r2=732297&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/broker/DirectExchange.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/DirectExchange.cpp Wed Jan 7 02:46:53 2009 @@ -33,6 +33,7 @@ const std::string qpidFedOp("qpid.fed.op"); const std::string qpidFedTags("qpid.fed.tags"); const std::string qpidFedOrigin("qpid.fed.origin"); +const std::string qpidExclusiveBinding("qpid.exclusive-binding"); const std::string fedOpBind("B"); const std::string fedOpUnbind("U"); @@ -56,15 +57,25 @@ bool DirectExchange::bind(Queue::shared_ptr queue, const string& routingKey, const FieldTable* args) { -string fedOp(args ? args->getAsString(qpidFedOp) : fedOpBind); -string fedTags(args ? args->getAsString(qpidFedTags) : ""); -string fedOrigin(args ? args->getAsString(qpidFedOrigin) : ""); +string fedOp(fedOpBind); +string fedTags; +string fedOrigin; +bool exclusiveBinding = false; +if (args) { +fedOp = args->getAsString(qpidFedOp); +fedTags = args->getAsString(qpidFedTags); +fedOrigin = args->getAsString(qpidFedOrigin); +exclusiveBinding = args->get(qpidExclusiveBinding); +} + bool propagate = false; if (args == 0 || fedOp.empty() || fedOp == fedOpBind) { Mutex::ScopedLock l(lock); Binding::shared_ptr b(new Binding(routingKey, queue, this, FieldTable(), fedOrigin)); BoundKey& bk = bindings[routingKey]; +if (exclusiveBinding) bk.queues.clear(); + if (bk.queues.add_unless(b, MatchQueue(queue))) { propagate = bk.fedBinding.addOrigin(fedOrigin); if (mgmtExchange != 0) { Modified: qpid/trunk/qpid/cpp/src/qpid/sys/CopyOnWriteArray.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/CopyOnWriteArray.h?rev=732297&r1=732296&r2=732297&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/sys/CopyOnWriteArray.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/sys/CopyOnWriteArray.h Wed Jan 7 02:46:53 2009 @@ -64,6 +64,18 @@ } } +bool clear() +{ +Mutex::ScopedLock l(lock); +if (array && !array->empty()) { +ArrayPtr copy; +array = copy; +return true; +} else { +return false; +} +} + template bool add_unless(T& t, F f) { Modified: qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp?rev=732297&r1=732296&r2=732297&view=diff == --- qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp (original) +++ qpid/trunk/qpid/cpp/src/tests/ClientSessionTest.cpp Wed Jan 7 02:46:53 2009 @@ -447,6 +447,28 @@ } +QPID_AUTO_TEST_CASE(testExclusiveBinding) { +FieldTable options; +options.setString("qpid.exclusive-binding", "anything"); +ClientSessionFixture fix; +fix.session.queueDeclare(arg::queue="queue-1", arg::exclusive=true, arg::autoDelete=true); +fix.session.queueDeclare(arg::queue="queue-2", arg::exclusive=true, arg::autoDelete=true); +fix.session.exchangeBind(arg::exchange="amq.direct", arg::queue="queue-1", arg::bindingKey="my-key", arg::arguments=options); +fix.session.messageTransfer(arg::destination="amq.direct", arg::content=Message("message1", "my-key")); +fix.session.exchangeBind(arg::exchange="amq.direct", arg::queue="queue-2", arg::bindingKey="my-key", arg::arguments=options); +fix.session.messageTransfer(arg::destination="amq.direct", arg::content=Message("message2", "my-key")); + +Message got; +BOOST_CHECK(fix.subs.get(got, "queue-1")); +BOOST_CHECK_EQUAL("message1", got.getData()); +BOOST_CHECK(!fix.subs.get(got, "queue-1")); + +BOOST_CHECK(fix.subs.get(got, "queue-2")); +BOOST_CHECK_EQUAL("message2", got.getData()); +BOOST_CHECK(!fix.subs.get(got, "queue-2")); +} + + QPID_AUTO_TEST_SUITE_END()
[CONF] Apache Qpid: Cheat Sheet for configuring Exchange Options (page edited)
Page Edited : qpid : Cheat Sheet for configuring Exchange Options Cheat Sheet for configuring Exchange Options has been edited by Gordon Sim (Jan 07, 2009). (View changes) Content: Configuring Exchange Options The C++ Broker M4 or later supports the following additional Exchange options in addition to the standard AMQP define options Exchange Level Message sequencing Initial Value Exchange Note that these features can be used on any exchange type, that has been declared with the options set. Exchange Level Message sequencing This feature can be used to place a sequence number into each message's headers, based on the order they pass through an exchange. The sequencing starts at 0 and then wraps in an AMQP int64 type. The field name used is "qpid.msg_sequence" To use this feature an exchange needs to be declared specifying this option in the declare FieldTable args; args.setInt("qpid.msg_sequence",1); ... // now declare the exchange session.exchangeDeclare(arg::exchange="direct", arg::arguments=args); Then each message passing through that exchange will be numbers in the application headers. unit64_t seqNo; //after message transfer seqNo = message.getHeaders().getAsInt64("qpid.msg_sequence"); Initial Value Exchange This feature caches a last message sent to an exchange. When a new binding is created onto the exchange it will then attempt to route this cached messaged to the queue, based on the binding. This allows for topics or the creation of configurations where a new consumer can receive the last message sent to the broker, with matching routing. To use this feature an exchange needs to be declared specifying this option in the declare FieldTable args; args.setInt("qpid.ive",1); ... // now declare the exchange session.exchangeDeclare(arg::exchange="direct", arg::arguments=args); now use the exchange in the same way you would use any other exchange. Exclusive binding for key Direct exchanges in qpidd support a qpid.exclusive-binding option on the bind operation that causes the binding specified to be the only one for the given key. I.e. if there is already a binding at this exchange with this key it will be atomically updated to bind the new queue. This means that the binding can be changed concurrently with an incoming stream of messages and each message will be routed to exactly one queue. FieldTable args; args.setInt("qpid.exclusive-binding",1); //the following will cause the only binding from amq.direct with 'my-key' //to be the one to 'my-queue'; if there were any previous bindings for that //key they will be removed. This is atomic w.r.t message routing through the //exchange. session.exchangeBind(arg::exchange="amq.direct", arg::queue="my-queue", arg::bindingKey="my-key", arg::arguments=args); ... Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request Unsubscribe or edit your notifications preferences
svn commit: r732306 - in /qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid: ./ commands/
Author: aidan Date: Wed Jan 7 03:34:02 2009 New Revision: 732306 URL: http://svn.apache.org/viewvc?rev=732306&view=rev Log: QPID-1522: Rename Command class to CommandImpl and make it implement Command interface. Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/Command.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandExecusionEngine.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commanddelete.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandhelp.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandinfo.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandlist.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandmove.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandview.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandviewcontent.java Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/Command.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/Command.java?rev=732306&r1=732305&r2=732306&view=diff == --- qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/Command.java (original) +++ qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/Command.java Wed Jan 7 03:34:02 2009 @@ -39,24 +39,14 @@ import org.apache.qpid.utils.CommandLineOption; -/** - * Created by IntelliJ IDEA. - * User: lahiru - * Date: May 29, 2008 - * Time: 9:21:46 PM - * To change this template use File | Settings | File Templates. - */ -public interface -Command { +public interface Command { public static String commandname = null; public static CommandLineOption options = null; -void execute(); +public void execute(); -void printusage(); +public void printusage(); -void optionchecker(); - -void optionvaluechecker(); +public void optionvaluechecker(); } Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandExecusionEngine.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandExecusionEngine.java?rev=732306&r1=732305&r2=732306&view=diff == --- qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandExecusionEngine.java (original) +++ qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandExecusionEngine.java Wed Jan 7 03:34:02 2009 @@ -40,7 +40,7 @@ import org.apache.qpid.utils.CommandLineOptionParser; import org.apache.qpid.utils.JMXinfo; import org.apache.qpid.commands.*; -import org.apache.qpid.commands.Command; +import org.apache.qpid.commands.CommandImpl; public class CommandExecusionEngine { Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commanddelete.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commanddelete.java?rev=732306&r1=732305&r2=732306&view=diff == --- qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commanddelete.java (original) +++ qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commanddelete.java Wed Jan 7 03:34:02 2009 @@ -59,7 +59,7 @@ * Time: 5:34:51 PM * To change this template use File | Settings | File Templates. */ -public class Commanddelete extends Command { +public class Commanddelete extends CommandImpl { private String object; private String name; private String vhost; Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandhelp.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandhelp.java?rev=732306&r1=732305&r2=732306&view=diff == --- qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandhelp.java (original) +++ qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandhelp.java Wed Jan 7 03:34:02 2009 @@ -47,7 +47,7 @@ * Time: 5:55:28 PM * To change this template use File | Settings | File Templates. */ -public class Commandhelp extends Command { +public class Commandhelp extends CommandImpl { public Commandhelp(JMXinfo info, String name) { super(info, name); } Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandinfo.java U
svn commit: r732307 - in /qpid/trunk/qpid/java/management/tools/qpid-cli: src/org/apache/qpid/ src/org/apache/qpid/commands/ test/org/apache/qpid/commands/
Author: aidan Date: Wed Jan 7 03:36:41 2009 New Revision: 732307 URL: http://svn.apache.org/viewvc?rev=732307&view=rev Log: QPID-1522: Move common code up to CommandImpl. Rename methods to be consistent. Remove commented out code. Added: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/CommandImpl.java Removed: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Command.java Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/Command.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commanddelete.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandhelp.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandinfo.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandlist.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandmove.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandview.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandviewcontent.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommand.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommanddelete.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandinfo.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandlist.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandmove.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandview.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandviewcontent.java Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/Command.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/Command.java?rev=732307&r1=732306&r2=732307&view=diff == --- qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/Command.java (original) +++ qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/Command.java Wed Jan 7 03:36:41 2009 @@ -37,16 +37,14 @@ */ package org.apache.qpid; -import org.apache.qpid.utils.CommandLineOption; - public interface Command { -public static String commandname = null; -public static CommandLineOption options = null; - public void execute(); public void printusage(); -public void optionvaluechecker(); +public String optionchecker(String string); + +public boolean checkoptionsetting(String string); + } Added: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/CommandImpl.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/CommandImpl.java?rev=732307&view=auto == --- qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/CommandImpl.java (added) +++ qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/CommandImpl.java Wed Jan 7 03:36:41 2009 @@ -0,0 +1,158 @@ +/* + * + * 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. + * + */ +/* + * + * Copyright (c) 2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + *http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +p
svn commit: r732308 - in /qpid/trunk/qpid/java/management/tools/qpid-cli: src/org/apache/qpid/ test/org/apache/qpid/
Author: aidan Date: Wed Jan 7 03:40:08 2009 New Revision: 732308 URL: http://svn.apache.org/viewvc?rev=732308&view=rev Log: QPID-1522: Fix spelling error in classname Added: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandExecutionEngine.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandExecutionEngine.java Removed: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandExecusionEngine.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandExecusionEngine.java Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/AllTest.java Added: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandExecutionEngine.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandExecutionEngine.java?rev=732308&view=auto == --- qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandExecutionEngine.java (added) +++ qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandExecutionEngine.java Wed Jan 7 03:40:08 2009 @@ -0,0 +1,86 @@ +/* + * + * 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. + * + */ +/* + * + * Copyright (c) 2006 The Apache Software Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + *http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ +package org.apache.qpid; + +import org.apache.qpid.utils.JMXinfo; +import org.apache.qpid.commands.*; + + +public class CommandExecutionEngine { +private Command currentcommand = null; +private String commandname = null; +private JMXinfo info = null; + +public CommandExecutionEngine(JMXinfo info) { +this.info = info; +this.commandname = info.getCommandLineOptionParser().getcommandname(); +} + +public boolean CommandSelector() { + +if (CommandConstants.INFO_COMMAND.equalsIgnoreCase(this.commandname)) +currentcommand = new Commandinfo(info, this.commandname); +else if (CommandConstants.LIST_COMMAND.equalsIgnoreCase(this.commandname)) +currentcommand = new Commandlist(info, this.commandname); +else if (CommandConstants.HELP_COMMAND.equalsIgnoreCase(this.commandname)) +currentcommand = new Commandhelp(info, this.commandname); +else if (CommandConstants.DELETE_COMMAND.equalsIgnoreCase(this.commandname)) +currentcommand = new Commanddelete(info, this.commandname); +else if (CommandConstants.MOVE_COMMAND.equalsIgnoreCase(this.commandname)) +currentcommand = new Commandmove(info, this.commandname); +else if (CommandConstants.VIEW_COMMAND.equalsIgnoreCase(this.commandname)) +currentcommand = new Commandview(info, this.commandname); +else if (CommandConstants.VIEWCONTENT_COMMAND.equalsIgnoreCase(this.commandname)) +currentcommand = new Commandviewcontent(info, this.commandname); +else { +usage(); +return false; +} +return true; + + +} + +public void runcommand() { +currentcommand.execute(); +} + +public void usage() { +System.out.println(commandname + ":Command not found"); +} +} Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java?rev=732308&r1=732307&r2=732308&view=diff =
svn commit: r732310 - in /qpid/trunk/qpid/java/management: common/ common/src/ common/src/main/ common/src/main/java/ common/src/main/java/org/ common/src/main/java/org/apache/ common/src/main/java/or
Author: aidan Date: Wed Jan 7 03:50:43 2009 New Revision: 732310 URL: http://svn.apache.org/viewvc?rev=732310&view=rev Log: QPID-1522: Move command line constants to individual command files. Centralise list of commands in CommandLineInterpreter. Make CommandExecutionEngine look up command from registered list rather than use a big if(). Added: qpid/trunk/qpid/java/management/common/ qpid/trunk/qpid/java/management/common/src/ qpid/trunk/qpid/java/management/common/src/main/ qpid/trunk/qpid/java/management/common/src/main/java/ qpid/trunk/qpid/java/management/common/src/main/java/org/ qpid/trunk/qpid/java/management/common/src/main/java/org/apache/ qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/ qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/ qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/ qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/JMXConnnectionFactory.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandget.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandset.java Removed: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandConstants.java Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/Command.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandExecutionEngine.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/CommandImpl.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commanddelete.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandhelp.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandinfo.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandlist.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandmove.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandview.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/Commandviewcontent.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandExecutionEngine.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandLineInterpreter.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommand.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommanddelete.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandinfo.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandlist.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandmove.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandview.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandviewcontent.java Added: qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/JMXConnnectionFactory.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/JMXConnnectionFactory.java?rev=732310&view=auto == --- qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/JMXConnnectionFactory.java (added) +++ qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/JMXConnnectionFactory.java Wed Jan 7 03:50:43 2009 @@ -0,0 +1,249 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +package org.apache.qpid.management.common; + +import java.io.IOException; +import java.security.Security; +import jav
svn commit: r732311 - in /qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid: CommandLineInterpreter.java commands/objects/ObjectNames.java
Author: aidan Date: Wed Jan 7 03:54:14 2009 New Revision: 732311 URL: http://svn.apache.org/viewvc?rev=732311&view=rev Log: QPID-1528: Add get/set commands for JMX attributes. Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/objects/ObjectNames.java Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java?rev=732311&r1=732310&r2=732311&view=diff == --- qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java (original) +++ qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java Wed Jan 7 03:54:14 2009 @@ -49,10 +49,12 @@ import jline.SimpleCompletor; import org.apache.qpid.commands.Commanddelete; +import org.apache.qpid.commands.Commandget; import org.apache.qpid.commands.Commandhelp; import org.apache.qpid.commands.Commandinfo; import org.apache.qpid.commands.Commandlist; import org.apache.qpid.commands.Commandmove; +import org.apache.qpid.commands.Commandset; import org.apache.qpid.commands.Commandview; import org.apache.qpid.commands.Commandviewcontent; import org.apache.qpid.utils.CommandLineOptionParser; @@ -106,9 +108,16 @@ /* This implementation is for the people who are using the interactive mode for one shot this run the user given command and exit */ for (int i = 0; i < args.length; i++) { -if (args[i].compareTo("list") == 0 || args[i].compareTo("info") == 0 || args[i].compareTo("view") == 0 || args[i].compareTo("viewcontent") == 0 -|| args[i].compareTo("delete") == 0 || args[i].compareTo("move") == 0) { -oneshotmode(args,commandlineoptionparser,jmxc,mbsc); +if (args[i].compareTo("list") == 0 || +args[i].compareTo("info") == 0 || +args[i].compareTo("view") == 0 || +args[i].compareTo("viewcontent") == 0 || +args[i].compareTo("delete") == 0 || +args[i].compareTo("move") == 0 || +args[i].compareTo("set") == 0 || +args[i].compareTo("get") == 0) +{ +oneshotmode(args, commandlineoptionparser, jmxc, mbsc); return; } @@ -124,7 +133,9 @@ /* prividing GNU readline features using Jline library */ PrintWriter out = new PrintWriter(System.out); reader.addCompletor(new ArgumentCompletor( -new SimpleCompletor(new String[]{"list", "info", "exit", "quit", "delete", "move", "view", "viewcontent", "queue", "exchange", "connection", "usermanagement", "virtualhost"}))); +new SimpleCompletor(new String[]{"get","set","list", "info", "exit", "quit", "delete", "move", "view", + "viewcontent", "queue", "exchange", "connection", "usermanagement", + "virtualhost"}))); while ((line = reader.readLine("qpid-admin-$ ")) != null) { out.flush(); if (removeSpaces(line).equalsIgnoreCase("quit") || removeSpaces(line).equalsIgnoreCase("exit")) @@ -140,6 +151,7 @@ engine.runcommand(); } } + conn.getConnector().close(); } catch (Exception ex) { @@ -150,10 +162,12 @@ private static void registerCommands() { CommandExecutionEngine.addCommand(Commanddelete.COMMAND_NAME, Commanddelete.class); +CommandExecutionEngine.addCommand(Commandget.COMMAND_NAME, Commandget.class); CommandExecutionEngine.addCommand(Commandhelp.COMMAND_NAME, Commandhelp.class); CommandExecutionEngine.addCommand(Commandinfo.COMMAND_NAME, Commandinfo.class); CommandExecutionEngine.addCommand(Commandlist.COMMAND_NAME, Commandlist.class); CommandExecutionEngine.addCommand(Commandmove.COMMAND_NAME, Commandmove.class); +CommandExecutionEngine.addCommand(Commandset.COMMAND_NAME, Commandset.class); CommandExecutionEngine.addCommand(Commandview.COMMAND_NAME, Commandview.class); CommandExecutionEngine.addCommand(Commandviewcontent.COMMAND_NAME, Commandviewcontent.class); } Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/commands/objects/ObjectNames.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/sr
svn commit: r732317 - /qpid/trunk/qpid/cpp/etc/sasl2/qpidd.conf
Author: gsim Date: Wed Jan 7 04:22:05 2009 New Revision: 732317 URL: http://svn.apache.org/viewvc?rev=732317&view=rev Log: Remove mechanism restrictions from default sasl config file. Modified: qpid/trunk/qpid/cpp/etc/sasl2/qpidd.conf Modified: qpid/trunk/qpid/cpp/etc/sasl2/qpidd.conf URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/etc/sasl2/qpidd.conf?rev=732317&r1=732316&r2=732317&view=diff == --- qpid/trunk/qpid/cpp/etc/sasl2/qpidd.conf (original) +++ qpid/trunk/qpid/cpp/etc/sasl2/qpidd.conf Wed Jan 7 04:22:05 2009 @@ -36,7 +36,6 @@ # NOTE: The sasldb file must be readable by the user running the qpidd # daemon, and should be readable only by that user. # -mech_list: plain anonymous pwcheck_method: auxprop auxprop_plugin: sasldb sasldb_path: /var/lib/qpidd/qpidd.sasldb
svn commit: r732330 - in /qpid/trunk/qpid/java: ./ management/common/ management/common/src/main/java/org/apache/qpid/management/common/sasl/ management/eclipse-plugin/ management/eclipse-plugin/META-
Author: aidan Date: Wed Jan 7 05:32:59 2009 New Revision: 732330 URL: http://svn.apache.org/viewvc?rev=732330&view=rev Log: QPID-1539: add management/common module. Move SASL and login code there. Make gui depend on management common and OSGify it a bit. Added: qpid/trunk/qpid/java/management/common/build.xml qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/sasl/ qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/sasl/CRAMMD5HashedSaslClientFactory.java - copied, changed from r732325, qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/CRAMMD5HashedSaslClientFactory.java qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/sasl/ClientSaslFactory.java - copied, changed from r732325, qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/ClientSaslFactory.java qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/sasl/Constants.java qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/sasl/JCAProvider.java - copied, changed from r732325, qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/JCAProvider.java qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/sasl/PlainSaslClient.java - copied, changed from r732325, qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/PlainSaslClient.java qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/sasl/SaslProvider.java - copied, changed from r732325, qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/SaslProvider.java qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/sasl/UserPasswordCallbackHandler.java - copied, changed from r732325, qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/UserPasswordCallbackHandler.java qpid/trunk/qpid/java/management/common/src/main/java/org/apache/qpid/management/common/sasl/UsernameHashedPasswordCallbackHandler.java - copied, changed from r732325, qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/UsernameHashedPasswordCallbackHandler.java qpid/trunk/qpid/java/management/eclipse-plugin/src/main/resources/qpidmanagementcommon/ qpid/trunk/qpid/java/management/eclipse-plugin/src/main/resources/qpidmanagementcommon/MANIFEST.MF Removed: qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/CRAMMD5HashedSaslClientFactory.java qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/ClientSaslFactory.java qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/JCAProvider.java qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/PlainSaslClient.java qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/SaslProvider.java qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/UserPasswordCallbackHandler.java qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/sasl/UsernameHashedPasswordCallbackHandler.java Modified: qpid/trunk/qpid/java/build.deps qpid/trunk/qpid/java/build.xml qpid/trunk/qpid/java/management/eclipse-plugin/META-INF/MANIFEST.MF qpid/trunk/qpid/java/management/eclipse-plugin/build-release-common.properties qpid/trunk/qpid/java/management/eclipse-plugin/build-release.xml qpid/trunk/qpid/java/management/eclipse-plugin/build.xml qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/Constants.java qpid/trunk/qpid/java/management/eclipse-plugin/src/main/java/org/apache/qpid/management/ui/jmx/JMXServerRegistry.java qpid/trunk/qpid/java/management/eclipse-plugin/src/main/resources/macosx/Configuration/config.ini qpid/trunk/qpid/java/management/eclipse-plugin/src/main/resources/unix/configuration/config.ini qpid/trunk/qpid/java/management/eclipse-plugin/src/main/resources/win32/configuration/config.ini Modified: qpid/trunk/qpid/java/build.deps URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/build.deps?rev=732330&r1=732329&r2=732330&view=diff == --- qpid/trunk/qpid/java/build.deps (original) +++ qpid/trunk/qpid/java/build.deps Wed Jan 7 05:32:59 2009 @@ -102,3 +102,4 @@ management-eclipse-plugin.test.libs=${systests.libs} broker-plugins.test.libs=${test.libs} m
svn commit: r732332 - in /qpid/trunk/qpid/java/management/tools/qpid-cli: ./ bin/ src/org/apache/qpid/ src/org/apache/qpid/utils/ test/org/apache/qpid/ test/org/apache/qpid/commands/ test/org/apache/q
Author: aidan Date: Wed Jan 7 05:41:40 2009 New Revision: 732332 URL: http://svn.apache.org/viewvc?rev=732332&view=rev Log: QPID-1548: Make the CLI depend on management-common, use the login logic there. Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/bin/qpid-cli.bat qpid/trunk/qpid/java/management/tools/qpid-cli/build.xml qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/Connector.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/ConnectorFactory.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/utils/CommandLineOptionConstants.java qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/utils/JMXConfiguration.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/ConnectionConstants.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandExecutionEngine.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestCommandLineInterpreter.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/TestConnector.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommand.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommanddelete.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandinfo.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandlist.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandmove.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandview.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/TestCommandviewcontent.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestAllObject.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestConnectionObject.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestExchangeObject.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestQueueObject.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestUserManagementObject.java qpid/trunk/qpid/java/management/tools/qpid-cli/test/org/apache/qpid/commands/objects/TestVirtualHostObject.java Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/bin/qpid-cli.bat URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/bin/qpid-cli.bat?rev=732332&r1=732331&r2=732332&view=diff == --- qpid/trunk/qpid/java/management/tools/qpid-cli/bin/qpid-cli.bat (original) +++ qpid/trunk/qpid/java/management/tools/qpid-cli/bin/qpid-cli.bat Wed Jan 7 05:41:40 2009 @@ -19,6 +19,7 @@ set CLASSPATH=%CLASSPATH%;%QPID_HOME%/lib/jline-0.9.94.jar set CLASSPATH=%CLASSPATH%;%QPID_HOME%/lib/junit-4.4.jar set CLASSPATH=%CLASSPATH%;%QPID_HOME%/lib/qpid-cli-1.0.jar +set CLASSPATH=%CLASSPATH%;%QPID_HOME%/lib/qpid-management-common-M4.jar set CLASSPATH=%CLASSPATH%;%QPID_HOME%/management/tools/qpid-cli/main/classes/ java -classpath %CLASSPATH% org.apache.qpid.CommandLineInterpreter %1 Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/build.xml URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/build.xml?rev=732332&r1=732331&r2=732332&view=diff == --- qpid/trunk/qpid/java/management/tools/qpid-cli/build.xml (original) +++ qpid/trunk/qpid/java/management/tools/qpid-cli/build.xml Wed Jan 7 05:41:40 2009 @@ -20,7 +20,7 @@ --> - + Modified: qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java?rev=732332&r1=732331&r2=732332&view=diff == --- qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java (original) +++ qpid/trunk/qpid/java/management/tools/qpid-cli/src/org/apache/qpid/CommandLineInterpreter.java Wed Jan 7 05:41:40 2009 @@ -96,7 +96,8 @@ commandlineoptionparser = new CommandLineOptionParser(args); JMXConfiguration config = new JMXConfiguration(commandlineoptionparser.getAlloptions()); -conn = ConnectorFactory.getConnector(config.gethostname(), config.getport()); +conn = ConnectorFactory.getConnector(config.gethostname()
svn commit: r732340 - in /qpid/trunk/qpid/java/broker/scripts: ./ resetAlerting.sh
Author: aidan Date: Wed Jan 7 05:56:38 2009 New Revision: 732340 URL: http://svn.apache.org/viewvc?rev=732340&view=rev Log: Add script to reset the alerting levels, which were broken in M2.1 Added: qpid/trunk/qpid/java/broker/scripts/ qpid/trunk/qpid/java/broker/scripts/resetAlerting.sh Added: qpid/trunk/qpid/java/broker/scripts/resetAlerting.sh URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/scripts/resetAlerting.sh?rev=732340&view=auto == --- qpid/trunk/qpid/java/broker/scripts/resetAlerting.sh (added) +++ qpid/trunk/qpid/java/broker/scripts/resetAlerting.sh Wed Jan 7 05:56:38 2009 @@ -0,0 +1,58 @@ +#!/bin/bash +# +# Alerting Rest Scripts to renabled the alerts on the queue. +# +# Defaults to Localhost broker +# + +CLI=./build/bin/qpid-cli +OUTPUT=0 + + +resetQueue() +{ +vhost=$1 +queue=$2 +echo "Resetting Values for $queue on $vhost" +rawQDepth=`$CLI get -o queue -v $vhost -n $queue -a MaximumQueueDepth` +# Note that MaxQueDepth is returned as Kb but set as b! +queueDepth=$[ $rawQDepth * 1024 ] +messageAge=`$CLI get -o queue -v $vhost -n $queue -a MaximumMessageAge` +messageCount=`$CLI get -o queue -v $vhost -n $queue -a MaximumMessageCount` +messageSize=`$CLI get -o queue -v $vhost -n $queue -a MaximumMessageSize` + +if [ $OUTPUT == 1 ] ; then + echo Current Values: + echo MaximumQueueDepth : $queueDepth + echo MaximumMessageAge : $messageAge + echo MaximumMessageCount : $messageCount + echo MaximumMessageSize : $messageSize +fi + +$CLI set -o queue -v $vhost -n $queue -a MaximumMessageSize -s $messageSize +$CLI set -o queue -v $vhost -n $queue -a MaximumMessageAge -s $messageAge +$CLI set -o queue -v $vhost -n $queue -a MaximumMessageCount -s $messageCount +$CLI set -o queue -v $vhost -n $queue -a MaximumQueueDepth -s $queueDepth +} + +resetVirtualHost() +{ + vhost=$1 + ignore=0 + for queue in `$CLI list -o queue -v $vhost |grep '|' | cut -d '|' -f 1 ` ; do + + if [ $ignore == 0 ] ; then + ignore=1 + else + resetQueue $vhost $queue + fi + + done +} + +for vhost in `$CLI list -o virtualhost|grep VirtualHost|cut -d '=' -f 3` ; do + + resetVirtualHost $vhost + +done +
svn commit: r732354 - /qpid/trunk/qpid/cpp/src/qpid/cluster/types.h
Author: aconway Date: Wed Jan 7 07:00:55 2009 New Revision: 732354 URL: http://svn.apache.org/viewvc?rev=732354&view=rev Log: Consistent #if defined for header selectino. Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/types.h Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/types.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/types.h?rev=732354&r1=732353&r2=732354&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/cluster/types.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/cluster/types.h Wed Jan 7 07:00:55 2009 @@ -34,9 +34,9 @@ #include extern "C" { -#ifdef HAVE_OPENAIS_CPG_H -#include -#elif HAVE_COROSYNC_CPG_H +#if defined (HAVE_OPENAIS_CPG_H) +# include +#elif defined (HAVE_COROSYNC_CPG_H) # include #else # error "No cpg.h header file available"
[CONF] Apache Qpid: Cheat Sheet for configuring Exchange Options (page edited)
Page Edited : qpid : Cheat Sheet for configuring Exchange Options Cheat Sheet for configuring Exchange Options has been edited by Carl Trieloff (Jan 07, 2009). (View changes) Content: Configuring Exchange Options The C++ Broker M4 or later supports the following additional Exchange options in addition to the standard AMQP define options Exchange Level Message sequencing Initial Value Exchange Exclusive binding for key Note that these features can be used on any exchange type, that has been declared with the options set. Exchange Level Message sequencing This feature can be used to place a sequence number into each message's headers, based on the order they pass through an exchange. The sequencing starts at 0 and then wraps in an AMQP int64 type. The field name used is "qpid.msg_sequence" To use this feature an exchange needs to be declared specifying this option in the declare FieldTable args; args.setInt("qpid.msg_sequence",1); ... // now declare the exchange session.exchangeDeclare(arg::exchange="direct", arg::arguments=args); Then each message passing through that exchange will be numbers in the application headers. unit64_t seqNo; //after message transfer seqNo = message.getHeaders().getAsInt64("qpid.msg_sequence"); Initial Value Exchange This feature caches a last message sent to an exchange. When a new binding is created onto the exchange it will then attempt to route this cached messaged to the queue, based on the binding. This allows for topics or the creation of configurations where a new consumer can receive the last message sent to the broker, with matching routing. To use this feature an exchange needs to be declared specifying this option in the declare FieldTable args; args.setInt("qpid.ive",1); ... // now declare the exchange session.exchangeDeclare(arg::exchange="direct", arg::arguments=args); now use the exchange in the same way you would use any other exchange. Exclusive binding for key Direct exchanges in qpidd support a qpid.exclusive-binding option on the bind operation that causes the binding specified to be the only one for the given key. I.e. if there is already a binding at this exchange with this key it will be atomically updated to bind the new queue. This means that the binding can be changed concurrently with an incoming stream of messages and each message will be routed to exactly one queue. FieldTable args; args.setInt("qpid.exclusive-binding",1); //the following will cause the only binding from amq.direct with 'my-key' //to be the one to 'my-queue'; if there were any previous bindings for that //key they will be removed. This is atomic w.r.t message routing through the //exchange. session.exchangeBind(arg::exchange="amq.direct", arg::queue="my-queue", arg::bindingKey="my-key", arg::arguments=args); ... Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request Unsubscribe or edit your notifications preferences
svn commit: r732390 - in /qpid/trunk/qpid/java: build.xml common.xml module.xml
Author: aidan Date: Wed Jan 7 08:38:20 2009 New Revision: 732390 URL: http://svn.apache.org/viewvc?rev=732390&view=rev Log: Only define cobertura task definition when it's about to get used. Modified: qpid/trunk/qpid/java/build.xml qpid/trunk/qpid/java/common.xml qpid/trunk/qpid/java/module.xml Modified: qpid/trunk/qpid/java/build.xml URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/build.xml?rev=732390&r1=732389&r2=732390&view=diff == --- qpid/trunk/qpid/java/build.xml (original) +++ qpid/trunk/qpid/java/build.xml Wed Jan 7 08:38:20 2009 @@ -195,7 +195,7 @@ - + Modified: qpid/trunk/qpid/java/common.xml URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/common.xml?rev=732390&r1=732389&r2=732390&view=diff == --- qpid/trunk/qpid/java/common.xml (original) +++ qpid/trunk/qpid/java/common.xml Wed Jan 7 08:38:20 2009 @@ -61,8 +61,6 @@ - - @@ -134,6 +132,10 @@ + + + + ant build Modified: qpid/trunk/qpid/java/module.xml URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/module.xml?rev=732390&r1=732389&r2=732390&view=diff == --- qpid/trunk/qpid/java/module.xml (original) +++ qpid/trunk/qpid/java/module.xml Wed Jan 7 08:38:20 2009 @@ -470,7 +470,7 @@ - + @@ -530,7 +530,7 @@ - +
[CONF] Apache Qpid: Cheat Sheet for configuring Exchange Options (page edited)
Page Edited : qpid : Cheat Sheet for configuring Exchange Options Cheat Sheet for configuring Exchange Options has been edited by Gordon Sim (Jan 07, 2009). (View changes) Content: Configuring Exchange Options The C++ Broker M4 or later supports the following additional Exchange options in addition to the standard AMQP define options Exchange Level Message sequencing Initial Value Exchange Note that these features can be used on any exchange type, that has been declared with the options set. It also supports an additional option to the bind operation on a direct exchange Exclusive binding for key Exchange Level Message sequencing This feature can be used to place a sequence number into each message's headers, based on the order they pass through an exchange. The sequencing starts at 0 and then wraps in an AMQP int64 type. The field name used is "qpid.msg_sequence" To use this feature an exchange needs to be declared specifying this option in the declare FieldTable args; args.setInt("qpid.msg_sequence",1); ... // now declare the exchange session.exchangeDeclare(arg::exchange="direct", arg::arguments=args); Then each message passing through that exchange will be numbers in the application headers. unit64_t seqNo; //after message transfer seqNo = message.getHeaders().getAsInt64("qpid.msg_sequence"); Initial Value Exchange This feature caches a last message sent to an exchange. When a new binding is created onto the exchange it will then attempt to route this cached messaged to the queue, based on the binding. This allows for topics or the creation of configurations where a new consumer can receive the last message sent to the broker, with matching routing. To use this feature an exchange needs to be declared specifying this option in the declare FieldTable args; args.setInt("qpid.ive",1); ... // now declare the exchange session.exchangeDeclare(arg::exchange="direct", arg::arguments=args); now use the exchange in the same way you would use any other exchange. Exclusive binding for key Direct exchanges in qpidd support a qpid.exclusive-binding option on the bind operation that causes the binding specified to be the only one for the given key. I.e. if there is already a binding at this exchange with this key it will be atomically updated to bind the new queue. This means that the binding can be changed concurrently with an incoming stream of messages and each message will be routed to exactly one queue. FieldTable args; args.setInt("qpid.exclusive-binding",1); //the following will cause the only binding from amq.direct with 'my-key' //to be the one to 'my-queue'; if there were any previous bindings for that //key they will be removed. This is atomic w.r.t message routing through the //exchange. session.exchangeBind(arg::exchange="amq.direct", arg::queue="my-queue", arg::bindingKey="my-key", arg::arguments=args); ... Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request Unsubscribe or edit your notifications preferences
svn commit: r732436 - /qpid/trunk/qpid/python/tests_0-8/
Author: rhs Date: Wed Jan 7 11:22:44 2009 New Revision: 732436 URL: http://svn.apache.org/viewvc?rev=732436&view=rev Log: added *.pyc to svn:ignore Modified: qpid/trunk/qpid/python/tests_0-8/ (props changed) Propchange: qpid/trunk/qpid/python/tests_0-8/ -- --- svn:ignore (added) +++ svn:ignore Wed Jan 7 11:22:44 2009 @@ -0,0 +1 @@ +*.pyc
svn commit: r732466 - in /qpid/trunk/qpid/cpp/src: qpid/acl/AclReader.cpp qpid/acl/AclReader.h tests/acl.py
Author: rajith Date: Wed Jan 7 12:24:42 2009 New Revision: 732466 URL: http://svn.apache.org/viewvc?rev=732466&view=rev Log: This is related to QPID-1558. The test case test_group_and_user_with_same_name covers the error condition in QPID-1545 Modified: qpid/trunk/qpid/cpp/src/qpid/acl/AclReader.cpp qpid/trunk/qpid/cpp/src/qpid/acl/AclReader.h qpid/trunk/qpid/cpp/src/tests/acl.py Modified: qpid/trunk/qpid/cpp/src/qpid/acl/AclReader.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/acl/AclReader.cpp?rev=732466&r1=732465&r2=732466&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/acl/AclReader.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/acl/AclReader.cpp Wed Jan 7 12:24:42 2009 @@ -312,6 +312,7 @@ errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Name \"" << toks[i] << "\" contains illegal characters."; return false; } +if (!isValidUserName(toks[i])) return false; addName(toks[i], citr->second); } } else { @@ -330,6 +331,7 @@ errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Name \"" << toks[i] << "\" contains illegal characters."; return false; } +if (!isValidUserName(toks[i])) return false; addName(toks[i], citr->second); } } @@ -508,4 +510,14 @@ return nvPair(nvpString.substr(0, pos), nvpString.substr(pos+1)); } +// Returns true if a username has the n...@realm format +bool AclReader::isValidUserName(const std::string& name){ + size_t pos = name.find('@'); + if ( pos == std::string::npos || pos == name.length() -1){ + errorStream << ACL_FORMAT_ERR_LOG_PREFIX << "Username '" << name << "' must contain a realm"; + return false; + } + return true; +} + }} // namespace qpid::acl Modified: qpid/trunk/qpid/cpp/src/qpid/acl/AclReader.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/acl/AclReader.h?rev=732466&r1=732465&r2=732466&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/acl/AclReader.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/acl/AclReader.h Wed Jan 7 12:24:42 2009 @@ -107,11 +107,12 @@ bool processAclLine(tokList& toks); void printRules() const; // debug aid - +bool isValidUserName(const std::string& name); + static bool checkName(const std::string& name); static nvPair splitNameValuePair(const std::string& nvpString); }; - + }} // namespace qpid::acl #endif // QPID_ACL_ACLREADER_H Modified: qpid/trunk/qpid/cpp/src/tests/acl.py URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/acl.py?rev=732466&r1=732465&r2=732466&view=diff == --- qpid/trunk/qpid/cpp/src/tests/acl.py (original) +++ qpid/trunk/qpid/cpp/src/tests/acl.py Wed Jan 7 12:24:42 2009 @@ -132,7 +132,35 @@ except qpid.session.SessionException, e: self.assertEqual(530,e.args[0].error_code) - + +def test_group_and_user_with_same_name(self): +""" +Test a group and user with same name +Ex. group admin admin +""" +aclf = ACLFile() +aclf.write('group b...@qpid b...@qpid\n') +aclf.write('acl deny b...@qpid bind exchange\n') +aclf.write('acl allow all all') +aclf.close() + +self.reload_acl() + +session = get_session('bob','bob') +try: +session.queue_declare(queue="allow_queue") +except qpid.session.SessionException, e: +if (530 == e.args[0].error_code): +self.fail("ACL should allow queue create request"); +self.fail("Error during queue create request"); + +try: +session.exchange_bind(exchange="amq.direct", queue="allow_queue", binding_key="routing_key") +self.fail("ACL should deny queue bind request"); +except qpid.session.SessionException, e: +self.assertEqual(530,e.args[0].error_code) + + #= # ACL file format tests #= @@ -180,7 +208,21 @@ if (result.text.find("contains illegal characters",0,len(result.text)) == -1): self.fail(result) - +def test_user_without_realm(self): +""" +Test a user defined without a realm +Ex. group admin rajith +""" +aclf = ACLFile() +aclf.write('group admin bob\n') +aclf.write('acl deny admin bind exchange\n') +aclf.write('acl allow all all') +aclf.close() + +result = self.reload_acl() +if (result.text.find("Username 'bob' must contain a realm",0,len(result.text)) == -1): +
svn commit: r732482 - in /qpid/trunk/qpid/cpp/src: qpid/broker/MessageStoreModule.cpp qpid/broker/MessageStoreModule.h qpid/broker/NullMessageStore.cpp tests/QueuePolicyTest.cpp
Author: gsim Date: Wed Jan 7 12:50:35 2009 New Revision: 732482 URL: http://svn.apache.org/viewvc?rev=732482&view=rev Log: Ensure that if no store is loaded we don't flow to disk, but revert to rejecting messages. Modified: qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp qpid/trunk/qpid/cpp/src/tests/QueuePolicyTest.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp?rev=732482&r1=732481&r2=732482&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp Wed Jan 7 12:50:35 2009 @@ -20,6 +20,7 @@ */ #include "MessageStoreModule.h" +#include "NullMessageStore.h" #include // This transfer protects against the unloading of the store lib prior to the handling of the exception @@ -165,4 +166,9 @@ TRANSFER_EXCEPTION(store->collectPreparedXids(xids)); } +bool MessageStoreModule::isNull() const +{ +return NullMessageStore::isNullStore(store); +} + }} // namespace qpid::broker Modified: qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h?rev=732482&r1=732481&r2=732482&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/MessageStoreModule.h Wed Jan 7 12:50:35 2009 @@ -73,7 +73,8 @@ const PersistableQueue& queue); uint32_t outstandingQueueAIO(const PersistableQueue& queue); void flush(const qpid::broker::PersistableQueue& queue); - +bool isNull() const; + ~MessageStoreModule(); }; Modified: qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp?rev=732482&r1=732481&r2=732482&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/NullMessageStore.cpp Wed Jan 7 12:50:35 2009 @@ -20,8 +20,10 @@ */ #include "NullMessageStore.h" +#include "MessageStoreModule.h" #include "RecoveryManager.h" #include "qpid/log/Statement.h" +#include "qpid/framing/reply_exceptions.h" #include @@ -90,7 +92,10 @@ void NullMessageStore::loadContent(const qpid::broker::PersistableQueue&, const intrusive_ptr&, - string&, uint64_t, uint32_t) {} + string&, uint64_t, uint32_t) +{ +throw qpid::framing::InternalErrorException("Can't load content; persistence not enabled"); +} void NullMessageStore::enqueue(TransactionContext*, const intrusive_ptr& msg, @@ -149,8 +154,13 @@ bool NullMessageStore::isNullStore(const MessageStore* store) { -const NullMessageStore* test = dynamic_cast(store); -return test && test->isNull(); +const MessageStoreModule* wrapper = dynamic_cast(store); +if (wrapper) { +return wrapper->isNull(); +} else { +const NullMessageStore* test = dynamic_cast(store); +return test && test->isNull(); +} } }} // namespace qpid::broker Modified: qpid/trunk/qpid/cpp/src/tests/QueuePolicyTest.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/QueuePolicyTest.cpp?rev=732482&r1=732481&r2=732482&view=diff == --- qpid/trunk/qpid/cpp/src/tests/QueuePolicyTest.cpp (original) +++ qpid/trunk/qpid/cpp/src/tests/QueuePolicyTest.cpp Wed Jan 7 12:50:35 2009 @@ -22,6 +22,7 @@ #include "test_tools.h" #include "qpid/broker/QueuePolicy.h" +#include "qpid/client/QueueOptions.h" #include "qpid/sys/Time.h" #include "qpid/framing/reply_exceptions.h" #include "MessageUtils.h" @@ -242,5 +243,32 @@ other.messageTransfer(arg::content=client::Message("Message_6", q)); } +QPID_AUTO_TEST_CASE(testFlowToDiskWithNoStore) +{ +//Ensure that with no store loaded, we don't flow to disk but +//fallback to rejecting messages +QueueOptions args; +args.setSizePolicy(FLOW_TO_DISK, 0, 5); + +ProxySessionFixture f; +std::string q("my-queue"); +f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg::arguments=args); +LocalQueue incoming; +SubscriptionSettings settings(FlowControl::unlimited()); +settings.autoAck = 0; // no auto ack. +Subscription sub = f.subs.subscribe(incoming, q, settings); +for (int i = 0
svn commit: r732503 - in /qpid/branches/M4-RCs/qpid/cpp/src: qpid/broker/MessageStoreModule.cpp qpid/broker/MessageStoreModule.h qpid/broker/NullMessageStore.cpp tests/QueuePolicyTest.cpp
Author: gsim Date: Wed Jan 7 13:25:06 2009 New Revision: 732503 URL: http://svn.apache.org/viewvc?rev=732503&view=rev Log: Ensure that if no store is loaded we don't flow to disk, but revert to rejecting messages. Merged from r732482 on trunk. Modified: qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/MessageStoreModule.h qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/NullMessageStore.cpp qpid/branches/M4-RCs/qpid/cpp/src/tests/QueuePolicyTest.cpp Modified: qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp URL: http://svn.apache.org/viewvc/qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp?rev=732503&r1=732502&r2=732503&view=diff == --- qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp (original) +++ qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/MessageStoreModule.cpp Wed Jan 7 13:25:06 2009 @@ -20,6 +20,7 @@ */ #include "MessageStoreModule.h" +#include "NullMessageStore.h" #include // This transfer protects against the unloading of the store lib prior to the handling of the exception @@ -165,4 +166,9 @@ TRANSFER_EXCEPTION(store->collectPreparedXids(xids)); } +bool MessageStoreModule::isNull() const +{ +return NullMessageStore::isNullStore(store); +} + }} // namespace qpid::broker Modified: qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/MessageStoreModule.h URL: http://svn.apache.org/viewvc/qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/MessageStoreModule.h?rev=732503&r1=732502&r2=732503&view=diff == --- qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/MessageStoreModule.h (original) +++ qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/MessageStoreModule.h Wed Jan 7 13:25:06 2009 @@ -73,7 +73,8 @@ const PersistableQueue& queue); uint32_t outstandingQueueAIO(const PersistableQueue& queue); void flush(const qpid::broker::PersistableQueue& queue); - +bool isNull() const; + ~MessageStoreModule(); }; Modified: qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/NullMessageStore.cpp URL: http://svn.apache.org/viewvc/qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/NullMessageStore.cpp?rev=732503&r1=732502&r2=732503&view=diff == --- qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/NullMessageStore.cpp (original) +++ qpid/branches/M4-RCs/qpid/cpp/src/qpid/broker/NullMessageStore.cpp Wed Jan 7 13:25:06 2009 @@ -20,8 +20,10 @@ */ #include "NullMessageStore.h" +#include "MessageStoreModule.h" #include "RecoveryManager.h" #include "qpid/log/Statement.h" +#include "qpid/framing/reply_exceptions.h" #include @@ -90,7 +92,10 @@ void NullMessageStore::loadContent(const qpid::broker::PersistableQueue&, const intrusive_ptr&, - string&, uint64_t, uint32_t) {} + string&, uint64_t, uint32_t) +{ +throw qpid::framing::InternalErrorException("Can't load content; persistence not enabled"); +} void NullMessageStore::enqueue(TransactionContext*, const intrusive_ptr& msg, @@ -149,8 +154,13 @@ bool NullMessageStore::isNullStore(const MessageStore* store) { -const NullMessageStore* test = dynamic_cast(store); -return test && test->isNull(); +const MessageStoreModule* wrapper = dynamic_cast(store); +if (wrapper) { +return wrapper->isNull(); +} else { +const NullMessageStore* test = dynamic_cast(store); +return test && test->isNull(); +} } }} // namespace qpid::broker Modified: qpid/branches/M4-RCs/qpid/cpp/src/tests/QueuePolicyTest.cpp URL: http://svn.apache.org/viewvc/qpid/branches/M4-RCs/qpid/cpp/src/tests/QueuePolicyTest.cpp?rev=732503&r1=732502&r2=732503&view=diff == --- qpid/branches/M4-RCs/qpid/cpp/src/tests/QueuePolicyTest.cpp (original) +++ qpid/branches/M4-RCs/qpid/cpp/src/tests/QueuePolicyTest.cpp Wed Jan 7 13:25:06 2009 @@ -22,6 +22,7 @@ #include "test_tools.h" #include "qpid/broker/QueuePolicy.h" +#include "qpid/client/QueueOptions.h" #include "qpid/sys/Time.h" #include "qpid/framing/reply_exceptions.h" #include "MessageUtils.h" @@ -242,5 +243,32 @@ other.messageTransfer(arg::content=client::Message("Message_6", q)); } +QPID_AUTO_TEST_CASE(testFlowToDiskWithNoStore) +{ +//Ensure that with no store loaded, we don't flow to disk but +//fallback to rejecting messages +QueueOptions args; +args.setSizePolicy(FLOW_TO_DISK, 0, 5); + +ProxySessionFixture f; +std::string q("my-queue"); +f.session.queueDeclare(arg::queue=q, arg::exclusive=true, arg::autoDelete=true, arg:
svn commit: r732540 - in /qpid/branches/M4-RCs/qpid/cpp/src: MaxMethodBodySize.vcproj broker.vcproj client.vcproj common.vcproj protocol_gen.mak qpid.sln
Author: shuston Date: Wed Jan 7 14:25:21 2009 New Revision: 732540 URL: http://svn.apache.org/viewvc?rev=732540&view=rev Log: Added cluster-related gen file to protocol_gen.mak and regenerated all VC projects; left out qmfconsole since it won't build Modified: qpid/branches/M4-RCs/qpid/cpp/src/MaxMethodBodySize.vcproj qpid/branches/M4-RCs/qpid/cpp/src/broker.vcproj qpid/branches/M4-RCs/qpid/cpp/src/client.vcproj qpid/branches/M4-RCs/qpid/cpp/src/common.vcproj qpid/branches/M4-RCs/qpid/cpp/src/protocol_gen.mak qpid/branches/M4-RCs/qpid/cpp/src/qpid.sln Modified: qpid/branches/M4-RCs/qpid/cpp/src/MaxMethodBodySize.vcproj URL: http://svn.apache.org/viewvc/qpid/branches/M4-RCs/qpid/cpp/src/MaxMethodBodySize.vcproj?rev=732540&r1=732539&r2=732540&view=diff == --- qpid/branches/M4-RCs/qpid/cpp/src/MaxMethodBodySize.vcproj (original) +++ qpid/branches/M4-RCs/qpid/cpp/src/MaxMethodBodySize.vcproj Wed Jan 7 14:25:21 2009 @@ -24,7 +24,7 @@ ProjectType="Visual C++" Version="9.00" Name="MaxMethodBodySize" - ProjectGUID="{CB5C939B-FECA-1BAD-BB9C-8C3A4564ADCF}" + ProjectGUID="{CB5C939B-FECA-1BAD-BB9C-8C3A688E2823}" RootNamespace="MaxMethodBodySize" Keyword="Win32Proj" SignManifests="true" Modified: qpid/branches/M4-RCs/qpid/cpp/src/broker.vcproj URL: http://svn.apache.org/viewvc/qpid/branches/M4-RCs/qpid/cpp/src/broker.vcproj?rev=732540&r1=732539&r2=732540&view=diff == --- qpid/branches/M4-RCs/qpid/cpp/src/broker.vcproj (original) +++ qpid/branches/M4-RCs/qpid/cpp/src/broker.vcproj Wed Jan 7 14:25:21 2009 @@ -24,7 +24,7 @@ ProjectType="Visual C++" Version="9.00" Name="broker" - ProjectGUID="{09613D48-FECA-1BAD-9D20-8C374564ADCF}" + ProjectGUID="{09613D48-FECA-1BAD-9D20-8C37688E2823}" RootNamespace="broker" Keyword="Win32Proj" SignManifests="true" Modified: qpid/branches/M4-RCs/qpid/cpp/src/client.vcproj URL: http://svn.apache.org/viewvc/qpid/branches/M4-RCs/qpid/cpp/src/client.vcproj?rev=732540&r1=732539&r2=732540&view=diff == --- qpid/branches/M4-RCs/qpid/cpp/src/client.vcproj (original) +++ qpid/branches/M4-RCs/qpid/cpp/src/client.vcproj Wed Jan 7 14:25:21 2009 @@ -24,7 +24,7 @@ ProjectType="Visual C++" Version="9.00" Name="client" - ProjectGUID="{6961DBA3-FECA-1BAD-F396-8C394564ADCF}" + ProjectGUID="{6961DBA3-FECA-1BAD-F396-8C39688E2823}" RootNamespace="client" Keyword="Win32Proj" SignManifests="true" Modified: qpid/branches/M4-RCs/qpid/cpp/src/common.vcproj URL: http://svn.apache.org/viewvc/qpid/branches/M4-RCs/qpid/cpp/src/common.vcproj?rev=732540&r1=732539&r2=732540&view=diff == --- qpid/branches/M4-RCs/qpid/cpp/src/common.vcproj (original) +++ qpid/branches/M4-RCs/qpid/cpp/src/common.vcproj Wed Jan 7 14:25:21 2009 @@ -24,7 +24,7 @@ ProjectType="Visual C++" Version="9.00" Name="common" - ProjectGUID="{C961EF23-FECA-1BAD-BB9C-8C3A4564ADCF}" + ProjectGUID="{C961EF23-FECA-1BAD-BB9C-8C3A688E2823}" RootNamespace="common" Keyword="Win32Proj" SignManifests="true" @@ -360,6 +360,72 @@ RelativePath="gen\qpid\framing\ClientInvoker.cpp"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
svn commit: r732549 - in /qpid/trunk/qpid/cpp/src: broker.vcproj client.vcproj common.vcproj protocol_gen.mak qmfconsole.vcproj
Author: shuston Date: Wed Jan 7 15:05:45 2009 New Revision: 732549 URL: http://svn.apache.org/viewvc?rev=732549&view=rev Log: Add cluster-related content to generated sources; re-gen vc projects. Fixes QPID-1559 Modified: qpid/trunk/qpid/cpp/src/broker.vcproj qpid/trunk/qpid/cpp/src/client.vcproj qpid/trunk/qpid/cpp/src/common.vcproj qpid/trunk/qpid/cpp/src/protocol_gen.mak qpid/trunk/qpid/cpp/src/qmfconsole.vcproj Modified: qpid/trunk/qpid/cpp/src/broker.vcproj URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/broker.vcproj?rev=732549&r1=732548&r2=732549&view=diff == --- qpid/trunk/qpid/cpp/src/broker.vcproj (original) +++ qpid/trunk/qpid/cpp/src/broker.vcproj Wed Jan 7 15:05:45 2009 @@ -781,6 +781,12 @@ RelativePath="qpid\broker\RecoveryManagerImpl.cpp"> + + + + + + + + http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/client.vcproj?rev=732549&r1=732548&r2=732549&view=diff == --- qpid/trunk/qpid/cpp/src/client.vcproj (original) +++ qpid/trunk/qpid/cpp/src/client.vcproj Wed Jan 7 15:05:45 2009 @@ -414,6 +414,9 @@ RelativePath="qpid\client\Results.cpp"> + + + + + + http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/common.vcproj?rev=732549&r1=732548&r2=732549&view=diff == --- qpid/trunk/qpid/cpp/src/common.vcproj (original) +++ qpid/trunk/qpid/cpp/src/common.vcproj Wed Jan 7 15:05:45 2009 @@ -360,6 +360,72 @@ RelativePath="gen\qpid\framing\ClientInvoker.cpp"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
svn commit: r732551 - in /qpid/trunk/qpid/cpp/src/qpid: client/Sasl.h sys/windows/IocpPoller.cpp
Author: shuston Date: Wed Jan 7 15:08:13 2009 New Revision: 732551 URL: http://svn.apache.org/viewvc?rev=732551&view=rev Log: Adapt to recent changes/additions Modified: qpid/trunk/qpid/cpp/src/qpid/client/Sasl.h qpid/trunk/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/client/Sasl.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/Sasl.h?rev=732551&r1=732550&r2=732551&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/client/Sasl.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/client/Sasl.h Wed Jan 7 15:08:13 2009 @@ -24,6 +24,7 @@ #include #include +#include "qpid/sys/IntegerTypes.h" namespace qpid { @@ -33,7 +34,7 @@ namespace client { -class ConnectionSettings; +struct ConnectionSettings; /** * Interface to SASL support Modified: qpid/trunk/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp?rev=732551&r1=732550&r2=732551&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/sys/windows/IocpPoller.cpp Wed Jan 7 15:08:13 2009 @@ -21,6 +21,7 @@ #include "qpid/sys/Poller.h" #include "qpid/sys/Mutex.h" +#include "qpid/sys/Dispatcher.h" #include "AsynchIoResult.h" #include "IoHandlePrivate.h" @@ -88,6 +89,24 @@ } }; +void Poller::shutdown() { +// Allow sloppy code to shut us down more than once. +if (impl->isShutdown) +return; +ULONG_PTR key = 1;// Tell wait() it's a shutdown, not I/O +PostQueuedCompletionStatus(impl->iocp, 0, key, 0); +} + +bool Poller::interrupt(PollerHandle&) { +return false; // There's no concept of a registered handle. +} + +void Poller::run() { +Poller::shared_ptr p(this); +qpid::sys::Dispatcher d(p); +d.run(); +} + void Poller::addFd(PollerHandle& handle, Direction dir) { HANDLE h = (HANDLE)(handle.impl->fd); if (h != INVALID_HANDLE_VALUE) { @@ -100,14 +119,6 @@ } } -void Poller::shutdown() { -// Allow sloppy code to shut us down more than once. -if (impl->isShutdown) -return; -ULONG_PTR key = 1;// Tell wait() it's a shutdown, not I/O -PostQueuedCompletionStatus(impl->iocp, 0, key, 0); -} - // All no-ops... void Poller::delFd(PollerHandle& handle) {} void Poller::modFd(PollerHandle& handle, Direction dir) {}
svn commit: r732552 - in /qpid/trunk/qpid/cpp/src/qpid/console: Event.h Object.h Package.h Value.cpp
Author: shuston Date: Wed Jan 7 15:08:53 2009 New Revision: 732552 URL: http://svn.apache.org/viewvc?rev=732552&view=rev Log: Resolve some compile errors on Windows qmfconsole Modified: qpid/trunk/qpid/cpp/src/qpid/console/Event.h qpid/trunk/qpid/cpp/src/qpid/console/Object.h qpid/trunk/qpid/cpp/src/qpid/console/Package.h qpid/trunk/qpid/cpp/src/qpid/console/Value.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/console/Event.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/console/Event.h?rev=732552&r1=732551&r2=732552&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/console/Event.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/console/Event.h Wed Jan 7 15:08:53 2009 @@ -31,9 +31,9 @@ } namespace console { -class Broker; -class SchemaClass; -class ClassKey; +class Broker; +struct SchemaClass; +class ClassKey; /** * Modified: qpid/trunk/qpid/cpp/src/qpid/console/Object.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/console/Object.h?rev=732552&r1=732551&r2=732552&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/console/Object.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/console/Object.h Wed Jan 7 15:08:53 2009 @@ -35,12 +35,12 @@ } namespace console { -class Broker; -class SchemaClass; -class SchemaMethod; -class ObjectId; -class ClassKey; -class Value; +class Broker; +struct SchemaClass; +struct SchemaMethod; +class ObjectId; +class ClassKey; +class Value; /** * \ingroup qmfconsoleapi Modified: qpid/trunk/qpid/cpp/src/qpid/console/Package.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/console/Package.h?rev=732552&r1=732551&r2=732552&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/console/Package.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/console/Package.h Wed Jan 7 15:08:53 2009 @@ -26,7 +26,7 @@ namespace qpid { namespace console { -class SchemaClass; +struct SchemaClass; /** * Modified: qpid/trunk/qpid/cpp/src/qpid/console/Value.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/console/Value.cpp?rev=732552&r1=732551&r2=732552&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/console/Value.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/console/Value.cpp Wed Jan 7 15:08:53 2009 @@ -22,6 +22,7 @@ #include "Value.h" #include "qpid/framing/Buffer.h" +using namespace qpid; using namespace qpid::console; using namespace std;
svn commit: r732559 - in /qpid/trunk/qpid/cpp/src/qpid/console: Broker.cpp ClassKey.cpp Event.cpp Object.cpp ObjectId.cpp ObjectId.h Package.h Schema.cpp SessionManager.cpp
Author: shuston Date: Wed Jan 7 15:36:30 2009 New Revision: 732559 URL: http://svn.apache.org/viewvc?rev=732559&view=rev Log: Namespace and IntegerTypes.h tweaks to build on Windows Visual C++ Modified: qpid/trunk/qpid/cpp/src/qpid/console/Broker.cpp qpid/trunk/qpid/cpp/src/qpid/console/ClassKey.cpp qpid/trunk/qpid/cpp/src/qpid/console/Event.cpp qpid/trunk/qpid/cpp/src/qpid/console/Object.cpp qpid/trunk/qpid/cpp/src/qpid/console/ObjectId.cpp qpid/trunk/qpid/cpp/src/qpid/console/ObjectId.h qpid/trunk/qpid/cpp/src/qpid/console/Package.h qpid/trunk/qpid/cpp/src/qpid/console/Schema.cpp qpid/trunk/qpid/cpp/src/qpid/console/SessionManager.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/console/Broker.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/console/Broker.cpp?rev=732559&r1=732558&r2=732559&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/console/Broker.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/console/Broker.cpp Wed Jan 7 15:36:30 2009 @@ -66,7 +66,7 @@ return url.str(); } -void Broker::encodeHeader(framing::Buffer& buf, uint8_t opcode, uint32_t seq) const +void Broker::encodeHeader(Buffer& buf, uint8_t opcode, uint32_t seq) const { buf.putOctet('A'); buf.putOctet('M'); @@ -75,7 +75,7 @@ buf.putLong (seq); } -bool Broker::checkHeader(framing::Buffer& buf, uint8_t *opcode, uint32_t *seq) const +bool Broker::checkHeader(Buffer& buf, uint8_t *opcode, uint32_t *seq) const { if (buf.getSize() < 8) return false; @@ -90,7 +90,7 @@ return h1 == 'A' && h2 == 'M' && h3 == '2'; } -void Broker::received(client::Message& msg) +void Broker::received(qpid::client::Message& msg) { string data = msg.getData(); Buffer inBuffer(const_cast(data.c_str()), data.size()); Modified: qpid/trunk/qpid/cpp/src/qpid/console/ClassKey.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/console/ClassKey.cpp?rev=732559&r1=732558&r2=732559&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/console/ClassKey.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/console/ClassKey.cpp Wed Jan 7 15:36:30 2009 @@ -90,7 +90,7 @@ return !(*this < other); } -void ClassKey::encode(framing::Buffer& buffer) const +void ClassKey::encode(qpid::framing::Buffer& buffer) const { buffer.putShortString(package); buffer.putShortString(name); Modified: qpid/trunk/qpid/cpp/src/qpid/console/Event.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/console/Event.cpp?rev=732559&r1=732558&r2=732559&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/console/Event.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/console/Event.cpp Wed Jan 7 15:36:30 2009 @@ -32,7 +32,7 @@ using qpid::framing::Uuid; using qpid::framing::FieldTable; -Event::Event(Broker* _broker, SchemaClass* _schema, framing::Buffer& buffer) : +Event::Event(Broker* _broker, SchemaClass* _schema, qpid::framing::Buffer& buffer) : broker(_broker), schema(_schema) { timestamp = buffer.getLongLong(); Modified: qpid/trunk/qpid/cpp/src/qpid/console/Object.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/console/Object.cpp?rev=732559&r1=732558&r2=732559&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/console/Object.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/console/Object.cpp Wed Jan 7 15:36:30 2009 @@ -30,6 +30,7 @@ using namespace qpid::console; using namespace qpid::sys; +using namespace qpid; using namespace std; using qpid::framing::Uuid; using qpid::framing::FieldTable; @@ -79,12 +80,12 @@ (*this)[key] = Value::Ptr(new DoubleValue(val)); } -void Object::AttributeMap::addUuid(const string& key, const framing::Uuid& val) +void Object::AttributeMap::addUuid(const string& key, const Uuid& val) { (*this)[key] = Value::Ptr(new UuidValue(val)); } -void Object::AttributeMap::addMap(const string& key, const framing::FieldTable& val) +void Object::AttributeMap::addMap(const string& key, const FieldTable& val) { (*this)[key] = Value::Ptr(new MapValue(val)); } Modified: qpid/trunk/qpid/cpp/src/qpid/console/ObjectId.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/console/ObjectId.cpp?rev=732559&r1=732558&r2=732559&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/console/ObjectId.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/console/ObjectId.cpp Wed Jan 7 15:36:30 2009 @@ -23,6 +23,7 @@ #include "qpid/framing/Buffer.h" using namespace qpid::console; +using namespace qpid; using namespace std; ObjectId::ObjectId(framing::Buffer& buffer) Modified: qpid/trunk/qpid/cpp/src/qpid/console/Obj
svn commit: r732620 - in /qpid/trunk/qpid/cpp/src/qpid: broker/Broker.h client/Connector.cpp client/RdmaConnector.cpp sys/AsynchIO.h sys/TCPIOPlugin.cpp sys/posix/AsynchIO.cpp sys/windows/AsynchIO.cpp
Author: astitcher Date: Wed Jan 7 22:20:28 2009 New Revision: 732620 URL: http://svn.apache.org/viewvc?rev=732620&view=rev Log: Tidied up a number of TODO items Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp qpid/trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIO.h qpid/trunk/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp qpid/trunk/qpid/cpp/src/qpid/sys/posix/AsynchIO.cpp qpid/trunk/qpid/cpp/src/qpid/sys/windows/AsynchIO.cpp Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h?rev=732620&r1=732619&r2=732620&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/Broker.h Wed Jan 7 22:20:28 2009 @@ -205,8 +205,6 @@ const std::string& destQueue, uint32_t qty); -// TODO: There isn't a single ProtocolFactory so the use of the following needs to be fixed -// For the present just return the first ProtocolFactory registered. boost::shared_ptr getProtocolFactory(const std::string& name = TCP_TRANSPORT) const; /** Expose poller so plugins can register their descriptors. */ Modified: qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp?rev=732620&r1=732619&r2=732620&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/client/Connector.cpp Wed Jan 7 22:20:28 2009 @@ -373,8 +373,6 @@ handleClosed(); } -// TODO: astitcher 20070908 This version of the code can never time out, so the idle processing -// will never be called void TCPConnector::run() { // Keep the connection impl in memory until run() completes. boost::shared_ptr protect = impl.lock(); Modified: qpid/trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp?rev=732620&r1=732619&r2=732620&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/client/RdmaConnector.cpp Wed Jan 7 22:20:28 2009 @@ -365,8 +365,6 @@ handleClosed(); } -// TODO: astitcher 20070908 This version of the code can never time out, so the idle processing -// will never be called void RdmaConnector::run(){ // Keep the connection impl in memory until run() completes. //GRS: currently the ConnectionImpls destructor is where the Io thread is joined Modified: qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIO.h URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIO.h?rev=732620&r1=732619&r2=732620&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIO.h (original) +++ qpid/trunk/qpid/cpp/src/qpid/sys/AsynchIO.h Wed Jan 7 22:20:28 2009 @@ -21,16 +21,14 @@ * */ -// @@TODO: TAKE THIS OUT... SHould be in posix version. -#include "DispatchHandle.h" - #include -#include +#include namespace qpid { namespace sys { class Socket; +class Poller; /* * Asynchronous acceptor: accepts connections then does a callback with the @@ -47,7 +45,7 @@ public: AsynchAcceptor(const Socket& s, Callback callback); ~AsynchAcceptor(); -void start(Poller::shared_ptr poller); +void start(boost::shared_ptr poller); }; /* @@ -66,7 +64,7 @@ // deletes. To correctly manage heaps when needed, the allocate and // delete should both be done from the same class/library. static AsynchConnector* create(const Socket& s, - Poller::shared_ptr poller, + boost::shared_ptr poller, std::string hostname, uint16_t port, ConnectedCallback connCb, @@ -131,7 +129,7 @@ public: virtual void queueForDeletion() = 0; -virtual void start(Poller::shared_ptr poller) = 0; +virtual void start(boost::shared_ptr poller) = 0; virtual void queueReadBuffer(BufferBase* buff) = 0; virtual void unread(BufferBase* buff) = 0; virtual void queueWrite(BufferBase* buff) = 0; Modified: qpid/trunk/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp?rev=732620&r1=732619&r2=732620&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/sys/TCPIOPlugin.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid