Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 61260 invoked from network); 22 Feb 2009 21:10:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Feb 2009 21:10:13 -0000 Received: (qmail 32022 invoked by uid 500); 22 Feb 2009 21:10:13 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 31998 invoked by uid 500); 22 Feb 2009 21:10:13 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 31989 invoked by uid 99); 22 Feb 2009 21:10:13 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Feb 2009 13:10:13 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 22 Feb 2009 21:10:10 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B76DC238889F; Sun, 22 Feb 2009 21:09:49 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r746820 - /activemq/activemq-cpp/trunk/src/main/cms/Connection.h Date: Sun, 22 Feb 2009 21:09:49 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090222210949.B76DC238889F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Sun Feb 22 21:09:48 2009 New Revision: 746820 URL: http://svn.apache.org/viewvc?rev=746820&view=rev Log: Documentation cleanup Modified: activemq/activemq-cpp/trunk/src/main/cms/Connection.h Modified: activemq/activemq-cpp/trunk/src/main/cms/Connection.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/cms/Connection.h?rev=746820&r1=746819&r2=746820&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/src/main/cms/Connection.h (original) +++ activemq/activemq-cpp/trunk/src/main/cms/Connection.h Sun Feb 22 21:09:48 2009 @@ -31,6 +31,40 @@ /** * The client's connection to its provider. + * + * Connections support concurrent use. + * + * A connection serves several purposes: + * - It encapsulates an open connection with a JMS provider. It typically represents + * an open TCP/IP socket between a client and the service provider software. + * - Its creation is where client authentication takes place. + * - It can specify a unique client identifier. + * - It provides a ConnectionMetaData object. + * - It supports an optional ExceptionListener object. + * + * Because the creation of a connection involves setting up authentication and communication, + * a connection is a relatively heavyweight object. Most clients will do all their messaging + * with a single connection. Other more advanced applications may use several connections. + * The CMS API does not architect a reason for using multiple connections; however, there + * may be operational reasons for doing so. + * + * A CMS client typically creates a connection, one or more sessions, and a number of message + * producers and consumers. When a connection is created, it is in stopped mode. That means + * that no messages are being delivered. + * + * It is typical to leave the connection in stopped mode until setup is complete (that is, + * until all message consumers have been created). At that point, the client calls the + * connection's start method, and messages begin arriving at the connection's consumers. + * This setup convention minimizes any client confusion that may result from asynchronous + * message delivery while the client is still in the process of setting itself up. + * + * A connection can be started immediately, and the setup can be done afterwards. Clients + * that do this must be prepared to handle asynchronous message delivery while they are still + * in the process of setting up. + * + * A message producer can send messages while a connection is stopped. + * + * @since 1.0 */ class CMS_API Connection : public Startable, public Stoppable, @@ -62,7 +96,7 @@ */ virtual const ConnectionMetaData* getMetaData() const throw( CMSException ) = 0; - /** + /** * Creates an AUTO_ACKNOWLEDGE Session. * * @throws CMSException @@ -74,7 +108,7 @@ * specified acknowledgment mode * * @param ackMode - * the Acknowledgement Mode to use. + * the Acknowledgment Mode to use. * @throws CMSException */ virtual Session* createSession( Session::AcknowledgeMode ackMode ) @@ -90,15 +124,15 @@ /** * Gets the registered Exception Listener for this connection * - * @return pointer to an exception listnener or NULL + * @return pointer to an exception listener or NULL */ virtual ExceptionListener* getExceptionListener() const = 0; /** - * Sets the registed Exception Listener for this connection + * Sets the registered Exception Listener for this connection * * @param listener - * pointer to and ExceptionListener + * pointer to and ExceptionListener */ virtual void setExceptionListener( ExceptionListener* listener ) = 0;