svn commit: r811188 - in /qpid/trunk/qpid: cpp/src/qpid/broker/SessionAdapter.cpp python/tests_0-10/alternate_exchange.py
Author: tross Date: Fri Sep 4 00:27:37 2009 New Revision: 811188 URL: http://svn.apache.org/viewvc?rev=811188&view=rev Log: QPID-2080 - crash when attempting to modify an exchange's alternate Committed patch from Ken Giusti Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp qpid/trunk/qpid/python/tests_0-10/alternate_exchange.py Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp?rev=811188&r1=811187&r2=811188&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp Fri Sep 4 00:27:37 2009 @@ -121,9 +121,11 @@ void SessionAdapter::ExchangeHandlerImpl::checkAlternate(Exchange::shared_ptr exchange, Exchange::shared_ptr alternate) { -if (alternate && alternate != exchange->getAlternate()) +if (alternate && ((exchange->getAlternate() && alternate != exchange->getAlternate()) + || !exchange->getAlternate())) throw NotAllowedException(QPID_MSG("Exchange declared with alternate-exchange " - << exchange->getAlternate()->getName() << ", requested " + << (exchange->getAlternate() ? exchange->getAlternate()->getName() : "") + << ", requested " << alternate->getName())); } Modified: qpid/trunk/qpid/python/tests_0-10/alternate_exchange.py URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/tests_0-10/alternate_exchange.py?rev=811188&r1=811187&r2=811188&view=diff == --- qpid/trunk/qpid/python/tests_0-10/alternate_exchange.py (original) +++ qpid/trunk/qpid/python/tests_0-10/alternate_exchange.py Fri Sep 4 00:27:37 2009 @@ -141,7 +141,61 @@ session.exchange_delete(exchange="e") session.exchange_delete(exchange="alternate") self.assertEquals(530, e.args[0].error_code) - + + +def test_modify_existing_exchange_alternate(self): +""" +Ensure that attempting to modify an exhange to change +the alternate throws an exception +""" +session = self.session +session.exchange_declare(exchange="alt1", type="direct") +session.exchange_declare(exchange="alt2", type="direct") +session.exchange_declare(exchange="onealternate", type="fanout", alternate_exchange="alt1") +try: +# attempt to change the alternate on an already existing exchange +session.exchange_declare(exchange="onealternate", type="fanout", alternate_exchange="alt2") +self.fail("Expected changing an alternate on an existing exchange to fail") +except SessionException, e: +self.assertEquals(530, e.args[0].error_code) +session = self.conn.session("alternate", 2) +session.exchange_delete(exchange="onealternate") +session.exchange_delete(exchange="alt2") +session.exchange_delete(exchange="alt1") + + +def test_add_alternate_to_exchange(self): +""" +Ensure that attempting to modify an exhange by adding +an alternate throws an exception +""" +session = self.session +session.exchange_declare(exchange="alt1", type="direct") +session.exchange_declare(exchange="noalternate", type="fanout") +try: +# attempt to add an alternate on an already existing exchange +session.exchange_declare(exchange="noalternate", type="fanout", alternate_exchange="alt1") +self.fail("Expected adding an alternate on an existing exchange to fail") +except SessionException, e: +self.assertEquals(530, e.args[0].error_code) +session = self.conn.session("alternate", 2) +session.exchange_delete(exchange="noalternate") +session.exchange_delete(exchange="alt1") + + +def test_del_alternate_to_exchange(self): +""" +Ensure that attempting to modify an exhange by declaring +it again without an alternate does nothing +""" +session = self.session +session.exchange_declare(exchange="alt1", type="direct") +session.exchange_declare(exchange="onealternate", type="fanout", alternate_exchange="alt1") +# attempt to re-declare without an alternate - silently ignore +session.exchange_declare(exchange="onealternate", type="fanout" ) +session.exchange_delete(exchange="onealternate") +session.exchange_delete(exchange="alt1") + def assertEmpty(self, queue): try: - Apache Qpid - AMQP Messaging Impl
svn commit: r811088 - /qpid/trunk/qpid/python/qpid/messaging.py
Author: rhs Date: Thu Sep 3 19:39:07 2009 New Revision: 811088 URL: http://svn.apache.org/viewvc?rev=811088&view=rev Log: removed final use of catchup Modified: qpid/trunk/qpid/python/qpid/messaging.py Modified: qpid/trunk/qpid/python/qpid/messaging.py URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging.py?rev=811088&r1=811087&r2=811088&view=diff == --- qpid/trunk/qpid/python/qpid/messaging.py (original) +++ qpid/trunk/qpid/python/qpid/messaging.py Thu Sep 3 19:39:07 2009 @@ -128,11 +128,6 @@ self._modcount += 1 self._driver.wakeup() - def _catchup(self, exc=ConnectionError): -mc = self._modcount -self._wait(lambda: not self._driver._modcount < mc) -self._check_error(exc) - def _check_error(self, exc=ConnectionError): if self.error: raise exc(*self.error) @@ -304,9 +299,6 @@ def _wakeup(self): self.connection._wakeup() - def _catchup(self, exc=SessionError): -self.connection._catchup(exc) - def _check_error(self, exc=SessionError): self.connection._check_error(exc) @@ -491,8 +483,7 @@ self.closing = True self._wakeup() -self._catchup() -self._wait(lambda: self.closed) +self._ewait(lambda: self.closed) while self.thread.isAlive(): self.thread.join(3) self.thread = None @@ -525,9 +516,6 @@ def _wakeup(self): self.session._wakeup() - def _catchup(self, exc=SendError): -self.session._catchup(exc) - def _check_error(self, exc=SendError): self.session._check_error(exc) @@ -642,9 +630,6 @@ def _wakeup(self): self.session._wakeup() - def _catchup(self, exc=ReceiveError): -self.session._catchup() - def _check_error(self, exc=ReceiveError): self.session._check_error(exc) - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
svn commit: r811066 - in /qpid/trunk/qpid/python/qpid: messaging.py tests/messaging.py
Author: rhs Date: Thu Sep 3 18:22:10 2009 New Revision: 811066 URL: http://svn.apache.org/viewvc?rev=811066&view=rev Log: added timeout option to send Modified: qpid/trunk/qpid/python/qpid/messaging.py qpid/trunk/qpid/python/qpid/tests/messaging.py Modified: qpid/trunk/qpid/python/qpid/messaging.py URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/messaging.py?rev=811066&r1=811065&r2=811066&view=diff == --- qpid/trunk/qpid/python/qpid/messaging.py (original) +++ qpid/trunk/qpid/python/qpid/messaging.py Thu Sep 3 18:22:10 2009 @@ -544,18 +544,25 @@ return self.queued - self.acked @synchronized - def send(self, object, sync=True): + def send(self, object, sync=True, timeout=None): """ Send a message. If the object passed in is of type L{unicode}, L{str}, L{list}, or L{dict}, it will automatically be wrapped in a L{Message} and sent. If it is of type L{Message}, it will be sent -directly. +directly. If the sender capacity is not L{UNLIMITED} then send +will block until there is available capacity to send the message. +If the timeout parameter is specified, then send will throw an +L{InsufficientCapacity} exception if capacity does not become +available within the specified time. @type object: unicode, str, list, dict, Message @param object: the message or content to send @type sync: boolean @param sync: if true then block until the message is sent + +@type timeout: float +@param timeout: the time to wait for available capacity """ if not self.session.connection._connected or self.session.closing: @@ -569,7 +576,8 @@ if self.capacity is not UNLIMITED: if self.capacity <= 0: raise InsufficientCapacity("capacity = %s" % self.capacity) - self._ewait(lambda: self.pending() < self.capacity) + if not self._ewait(lambda: self.pending() < self.capacity, timeout=timeout): +raise InsufficientCapacity("capacity = %s" % self.capacity) # XXX: what if we send the same message to multiple senders? message._sender = self Modified: qpid/trunk/qpid/python/qpid/tests/messaging.py URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid/tests/messaging.py?rev=811066&r1=811065&r2=811066&view=diff == --- qpid/trunk/qpid/python/qpid/tests/messaging.py (original) +++ qpid/trunk/qpid/python/qpid/tests/messaging.py Thu Sep 3 18:22:10 2009 @@ -599,6 +599,22 @@ def testSendAsyncCapacityUNLIMITED(self): self.asyncTest(UNLIMITED) + def testCapacityTimeout(self): +self.snd.capacity = 1 +msgs = [] +caught = False +while len(msgs) < 100: + m = self.content("testCapacity", len(msgs)) + try: +self.snd.send(m, sync=False, timeout=0) +msgs.append(m) + except InsufficientCapacity: +caught = True +break +self.drain(self.rcv, expected=msgs) +self.ssn.acknowledge() +assert caught, "did not exceed capacity" + class MessageTests(Base): def testCreateString(self): - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
svn commit: r811046 - in /qpid/trunk/qpid/cpp/src: qpid/broker/Link.cpp tests/federation.py
Author: tross Date: Thu Sep 3 17:20:45 2009 New Revision: 811046 URL: http://svn.apache.org/viewvc?rev=811046&view=rev Log: QPID-2045 - crash when destroying a federation link with a dynamic bridge Committed patch from Ken Guisti Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp qpid/trunk/qpid/cpp/src/tests/federation.py Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp?rev=811046&r1=811045&r2=811046&view=diff == --- qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp (original) +++ qpid/trunk/qpid/cpp/src/qpid/broker/Link.cpp Thu Sep 3 17:20:45 2009 @@ -200,8 +200,10 @@ // Move the bridges to be deleted into a local vector so there is no // corruption of the iterator caused by bridge deletion. -for (Bridges::iterator i = active.begin(); i != active.end(); i++) +for (Bridges::iterator i = active.begin(); i != active.end(); i++) { +(*i)->closed(); toDelete.push_back(*i); +} active.clear(); for (Bridges::iterator i = created.begin(); i != created.end(); i++) Modified: qpid/trunk/qpid/cpp/src/tests/federation.py URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/federation.py?rev=811046&r1=811045&r2=811046&view=diff == --- qpid/trunk/qpid/cpp/src/tests/federation.py (original) +++ qpid/trunk/qpid/cpp/src/tests/federation.py Thu Sep 3 17:20:45 2009 @@ -573,8 +573,13 @@ result = bridge.close() self.assertEqual(result.status, 0) -result = bridge2.close() -self.assertEqual(result.status, 0) + +# Extra test: don't explicitly close() bridge2. When the link is closed, +# it should clean up bridge2 automagically. verify_cleanup() will detect +# if bridge2 isn't cleaned up and will fail the test. +# +#result = bridge2.close() +#self.assertEqual(result.status, 0) result = link.close() self.assertEqual(result.status, 0) - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
[CONF] Apache Qpid > Qpid Design - Framing
Qpid Design - Framing Page edited by Aidan Skinner Frame Classes The framing definition in the protocol specification maps quite nicely to an object-oriented representation. The class diagram is shown below: The AMQDataBlock at the root of the hierarchy defines a writePayload method that subclasses implement in order to be able to transform themselves into bytes. This is called by the encoder, documented below. The decoding (from bytes into objects) is slightly more complex since it involves factories for the instantiation of the correct objects (again documented below). An AMQFrame is the basic unit transmitted over the network, and contains a body which is the real payload. There are numerous method frames, which are subclasses of AMQMethodBody. The method body subclasses are all code generated from the protocol specification. The ContentHeaderBody can support different types of content properties or metadata (examples being file or stream in addition to basic which is standard JMS-style messaging). ContentBody is a lightweight wrapper for message data. Encoding Encoding is a straightforward process. The AMQDataBlock class has only two method: getSize() and writePayloadToBuffer(ByteBuffer). The encoder simply needs to ask the data block its size, allocate a buffer of that size, then ask the data block to write itself into the buffer. Decoding The classes involved in decoding are illustrated in this UML class diagram: The AMQDataBlockDecoder has only two methods: decodable() in which it attempts to read enough information from the supplied buffer to determine whether it has all the data and whether it appears to represent a known data block. If it needs more data, it return false. If the frame appears to be invalid it throws an exception. The decoder stores the factories for HeartbeatBody, ContentHeaderBody and ContentBody frame types in an array, indexed on type. The AMQMethodBody factory is version specific and retrieved from the current session. The decoder constructs an AMQFrame, passing in the factory the appropriate factory. The result of that call is either a fully populated frame or an exception being thrown if data is invalid or inconsistent. The MethodBodyDecoderRegistry is generated from the protocol XML. Each method is registered by protocol class and protocol method and when looked up by the AMQMethodBodyFactory an instance of the appropriate method body is returned. The generated code for the methods handles the reading and writing of the bytes to and from ByteBuffers as well as calculation of the size of the populated method bodies. Change Notification Preferences View Online | View Change | Add Comment - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
svn commit: r810998 - in /qpid/trunk/qpid/cpp/bindings/qmf: Makefile.am python/Makefile.am tests/Makefile.am tests/run_interop_tests
Author: tross Date: Thu Sep 3 15:34:19 2009 New Revision: 810998 URL: http://svn.apache.org/viewvc?rev=810998&view=rev Log: Improved automake for the qmf bindings. - Added conditionals for HAVE_PYTHON_DEVEL - Added conditionals in the run_interop_tests script to skip tests of unbuilt components - Removed from distribution the code generated by swig for Python Modified: qpid/trunk/qpid/cpp/bindings/qmf/Makefile.am qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am qpid/trunk/qpid/cpp/bindings/qmf/tests/Makefile.am qpid/trunk/qpid/cpp/bindings/qmf/tests/run_interop_tests Modified: qpid/trunk/qpid/cpp/bindings/qmf/Makefile.am URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/Makefile.am?rev=810998&r1=810997&r2=810998&view=diff == --- qpid/trunk/qpid/cpp/bindings/qmf/Makefile.am (original) +++ qpid/trunk/qpid/cpp/bindings/qmf/Makefile.am Thu Sep 3 15:34:19 2009 @@ -18,10 +18,16 @@ # if HAVE_SWIG -if HAVE_RUBY_DEVEL EXTRA_DIST = qmfengine.i -SUBDIRS = ruby python tests +SUBDIRS = tests +if HAVE_RUBY_DEVEL +SUBDIRS += ruby endif + +if HAVE_PYTHON_DEVEL +SUBDIRS += python +endif + endif Modified: qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am?rev=810998&r1=810997&r2=810998&view=diff == --- qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am (original) +++ qpid/trunk/qpid/cpp/bindings/qmf/python/Makefile.am Thu Sep 3 15:34:19 2009 @@ -40,8 +40,7 @@ _qmfengine_la_LDFLAGS = -avoid-version -module -shared _qmfengine_la_LIBADD = $(PYTHON_LIBS) -L$(top_builddir)/src/.libs -lqpidclient $(top_builddir)/src/libqmfagent.la _qmfengine_la_CXXFLAGS = $(INCLUDES) -I$(srcdir)/qmf -I$(PYTHON_INC) -_qmfengine_la_SOURCES = \ - qmfengine.cpp +nodist__qmfengine_la_SOURCES = qmfengine.cpp CLEANFILES = $(generated_file_list) Modified: qpid/trunk/qpid/cpp/bindings/qmf/tests/Makefile.am URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/tests/Makefile.am?rev=810998&r1=810997&r2=810998&view=diff == --- qpid/trunk/qpid/cpp/bindings/qmf/tests/Makefile.am (original) +++ qpid/trunk/qpid/cpp/bindings/qmf/tests/Makefile.am Thu Sep 3 15:34:19 2009 @@ -18,4 +18,10 @@ # TESTS = run_interop_tests -EXTRA_DIST = run_interop_tests + +EXTRA_DIST = \ + agent_ruby.rb \ + python_agent.py \ + python_console.py \ + ruby_console.rb \ + run_interop_tests Modified: qpid/trunk/qpid/cpp/bindings/qmf/tests/run_interop_tests URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/bindings/qmf/tests/run_interop_tests?rev=810998&r1=810997&r2=810998&view=diff == --- qpid/trunk/qpid/cpp/bindings/qmf/tests/run_interop_tests (original) +++ qpid/trunk/qpid/cpp/bindings/qmf/tests/run_interop_tests Thu Sep 3 15:34:19 2009 @@ -28,6 +28,9 @@ API_DIR=${BUILD_DIR}/bindings/qmf SPEC_DIR=${QPID_DIR}/specs +RUBY_LIB_DIR=${API_DIR}/ruby/.libs +PYTHON_LIB_DIR=${API_DIR}/python/.libs + trap stop_broker INT TERM QUIT start_broker() { @@ -41,7 +44,7 @@ } start_ruby_agent() { -ruby -I${MY_DIR}/../ruby -I${API_DIR}/ruby/.libs ${MY_DIR}/agent_ruby.rb localhost $BROKER_PORT & +ruby -I${MY_DIR}/../ruby -I${RUBY_LIB_DIR} ${MY_DIR}/agent_ruby.rb localhost $BROKER_PORT & AGENT_PID=$! } @@ -50,7 +53,7 @@ } start_python_agent() { -PYTHONPATH="${MY_DIR}/../python:${API_DIR}/python:${API_DIR}/python/.libs" python ${MY_DIR}/python_agent.py localhost $BROKER_PORT & +PYTHONPATH="${MY_DIR}/../python:${API_DIR}/python:${PYTHON_LIB_DIR}" python ${MY_DIR}/python_agent.py localhost $BROKER_PORT & PY_AGENT_PID=$! } @@ -66,26 +69,30 @@ PYTHONPATH=${PYTHON_DIR}:${MY_DIR} export PYTHONPATH -echo "Python Agent (external storage) vs. Pure-Python Console" -start_python_agent -echo "Python agent started at pid $PY_AGENT_PID" -${PYTHON_DIR}/qpid-python-test -m python_console -b localhost:$BROKER_PORT $@ -RETCODE=$? -stop_python_agent -if test x$RETCODE != x0; then - echo "FAIL qmf interop tests (Python Agent)"; - TESTS_FAILED=1 +if test -d ${PYTHON_LIB_DIR} ; then +echo "Python Agent (external storage) vs. Pure-Python Console" +start_python_agent +echo "Python agent started at pid $PY_AGENT_PID" +${PYTHON_DIR}/qpid-python-test -m python_console -b localhost:$BROKER_PORT $@ +RETCODE=$? +stop_python_agent +if test x$RETCODE != x0; then +echo "FAIL qmf interop tests (Python Agent)"; +TESTS_FAILED=1 +fi fi -echo "Ruby Agent (external storage) vs. Pure-Python Console" -
[CONF] Apache Qpid > Qpid Design - Framing
Qpid Design - Framing File attached by Aidan Skinner frame-decoding.png (24 kB image/png) Change Notification Preferences View Attachments - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
svn commit: r810953 - in /qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol: AMQPFastProtocolHandler.java AMQPProtocolProvider.java
Author: aidan Date: Thu Sep 3 14:09:09 2009 New Revision: 810953 URL: http://svn.apache.org/viewvc?rev=810953&view=rev Log: QPID-2025: remove dead classes Removed: qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQPFastProtocolHandler.java qpid/branches/java-network-refactor/qpid/java/broker/src/main/java/org/apache/qpid/server/protocol/AMQPProtocolProvider.java - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
[CONF] Apache Qpid > Qpid JMX Management Console FAQ
Qpid JMX Management Console FAQ Page edited by Robbie Gemmell Errors How do I connect the management console to my broker using security ? The Management Console Security page will give you the instructions that you should use to set this up. I am unable to connect Qpid JMX MC/JConsole to a remote broker running on Linux, but connecting to localhost on that machine works ? The RMI based JMX ConnectorServer used by the broker requries two ports to operate. The console connects to an RMI Registry running on the primary (default 8999) port and retrieves the information actually needed to connect to the JMX Server. This information embeds the hostname of the remote machine, and if this is incorrect or unreachable by the connecting client the connection will fail. This situation arises due to the hostname configuration on Linux and is generally encountered when the remote machine does not have a DNS hostname entry on the local network, causing the hostname command to return a loopback IP instead of a fully qualified domain name or IP address accessible by remote client machines. It is described in further detail at: http://java.sun.com/javase/6/docs/technotes/guides/management/faq.html#linux1 To remedy this issue you can set the java.rmi.server.hostname system property to control the hostname/ip reported to the RMI runtime when advertising the JMX ConnectorServer. This can also be used to dictate the address returned on a computer with multiple network interfaces to control reachability. To do so, add the value -Djava.rmi.server.hostname= to the QPID_OPTS environment variable before starting the qpid-server script. Change Notification Preferences View Online | View Change | Add Comment - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
[CONF] Apache Qpid > Management Console Security
Management Console Security Page edited by Robbie Gemmell SSL encrypted RMI (0.5 and above) Current versions of the broker make use of SSL encryption to secure their RMI based JMX ConnectorServer for security purposes. This ships enabled by default, although the test SSL keystore used during development is not provided for security reasons (using this would provide no security as anyone could have access to it). Broker Configuration The broker configuration must be updated before the broker will start. This can be done either by disabling the SSL support, utilizing a purchased SSL certificate to create a keystore of your own, or using the example 'create-example-ssl-stores' script in the brokers bin/ directory to generate a self-signed keystore. The broker must be configured with a keystore containing the private and public keys associated with its SSL certificate. This is accomplished by setting the Java environment properties javax.net.ssl.keyStore and javax.net.ssl.keyStorePassword respectively with the location and password of an appropriate SSL keystore. Entries for these properties exist in the brokers main configuration file alongside the other management settings (see below), although the command line options will still work and take precedence over the configuration file. true ${prefix}/../test_resources/ssl/keystore.jks password JMX Management Console Configuration If the broker makes use of an SSL certificate signed by a known signing CA (Certification Authority), the management console needs no extra configuration, and will make use of Java's built-in CA truststore for certificate verification (you may however have to update the system-wide default truststore if your CA is not already present in it). If however you wish to use a self-signed SSL certificate, then the management console must be provided with an SSL truststore containing a record for the SSL certificate so that it is able to validate it when presented by the broker. This is performed by setting the javax.net.ssl.trustStore and javax.net.ssl.trustStorePassword environment variables when starting the console. This can be done at the command line, or alternatively an example configuration has been made within the console's qpidmc.ini launcher configuration file that may pre-configured in advance for repeated usage. See the User Guide for more information on this configuration process. JConsole Configuration As with the JMX Management Console above, if the broker is using a self-signed SSL certificate then in order to connect remotely using JConsole, an appropriate trust store must be provided at startup. See JConsole for further details on configuration. Additional Information More information on Java's handling of SSL certificate verification and customizing the keystores can be found in the JSSE Reference Guide . JMXMP (M4 and previous) In previous releases of Qpid (M4 and below) the broker, can make use of Sun's Java Management Extensions Messaging Protocol (JMXMP) to provide encryption of the JMX connection, offering increased security over the default unencrypted RMI based JMX connection. Download and Install This is possible by adding the jmxremote_optional.jar as provided by Sun. This jar is covered by the Sun Binary Code License and is not compatible with the Apache License which is why this component is not bundled with Qpid. Download the JMX Remote API 1.0.1_04 Reference Implementation from here. The included 'jmxremote-1_0_1-bin\lib\jmxremote_optional.jar' file must be added to the broker classpath: First set your classpath to something like this: CLASSPATH=jmxremote_optional.jar Then, run qpid-server passing the following additional flag: qpid-server -run:external-classpath=first Following this the configuration option can be updated to enabled use of the JMXMP based JMXConnectorServer. Broker Configuration To enabled this security option change the security-enabled value in your broker configuration file. true JMX Management Console Configuration If you wish to connect to a broker configured to use JMXMP then the console also requires provision of the Optional sections of the JMX Remote API that are not included within the JavaSE platform. In order to make it available to the console, place the 'jmxremote_optional.jar' (rename the file if any additional information is present in the file name) jar file within the 'plugins/jmxremote.sasl_1.0.1/' folder of the console release (on Mac OS X you will need to select 'Show package contents' from the context menu whilst selecting the management console bundle in order to reveal the inner file tree). Following the the console will automatically load the JMX Remote Optional classes and attempt the JMXMP connection when connecting to a JMXMP enabled broker. User Accounts & Access Rights In order to access t
[CONF] Apache Qpid > Qpid Design - Configuration
Qpid Design - Configuration Page edited by Robbie Gemmell Configuration Methods QPID supports two methods of configuration: command line switches (e.g. passing a -p flag on startup to specify the port) configuration file It is intended that the configuration file will be used for nearly all configuration but that some very common or useful options are exposed using command line switches. CLI QPID uses Commons CLI to parse command line arguments. It provides the following features: Ability to parse both short and long flags (e.g. -p and --port) and treat them as the same logical option Generation of well formatted usage messages Ability to specify configuration options in different ways, such as from files or from system properties, which can help when writing unit tests The result of parsing options, however they are specified, is a CommandLine object which can then be queried to find out specific values. Currently this is done in org.apache.qpid.server.Main and the CommandLine object is not exposed elsewhere but if it does require to be more widely used it could be added to the ApplicationRegistry. However it is strongly recommended that the configuration approach in the follow section is used where possible. Configuration File QPID uses Commons Configuration to handle all configuration. It provides methods that allow parsing of options from a range of sources, including configuration files, system properties or simply hard coded classes of values (which is very useful in unit test cases). Broker configuration is accessed through the class in the org.apache.qpid.server.configuration, primarily starting at ServerConfiguration and retrieving values or other Configuration classes from there. Command Line Options The following options are available: Option Long Option Description b bind Bind to the specified address overriding any value in the config file c config Use the given configuration file h help Prints list of options l logconfig Use the specified log4j.xml file rather than that in the etc directory m mport Specify port to listen on for the JMX Management. Overrides value in config file p port Specify port to listen on. Overrides value in config file v version Print version information and exit w logwatch Specify interval for checking for logging config changes. Zero means no checking Logging Logging is handled slightly differently. The main reason for this is that logging is something we want configured before the main configuration file is processed. The broker uses log4j as the logging implementation, and configuration must be done using the more expressive XML format. A couple of command line switches are used to configure logging: -l, --logconfig specifies the log configuration file to use. By default it looks for a file called log4j.xml located in the same directory as the config.xml file -w, --logwatch the interval in seconds to poll the log configuration file for changes. The default is 60 seconds and zero means do not poll for changes. By using the logwatch option it is possible to make changes to the logging configuration at runtime without restarting the broker. (For example, enabling more logging on certain packages in order to diagnose a problem). Change Notification Preferences View Online | View Change | Add Comment - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org
[CONF] Apache Qpid > Qpid Design - Management
Qpid Design - Management Page edited by Robbie Gemmell The broker makes several general JMX MBeans available for functionality such as User Management and Logging Management, as well as MBeans to allow management of each individual Connection, Exchange, and Queue.These are accessible via a JMX ConnectorServer started by the broker if its configuration calls for management to be enabled. This can then be used for management by a compatible JMX client. For further details on configuring and accessing the management functionality, see Qpid JMX Management Console or JConsole. Change Notification Preferences View Online | View Change | Add Comment - Apache Qpid - AMQP Messaging Implementation Project: http://qpid.apache.org Use/Interact: mailto:commits-subscr...@qpid.apache.org