activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r593309 [4/8] - in /activemq/activemq-cpp/trunk/src: examples/ examples/consumers/ examples/producers/ main/ main/activemq/concurrent/ main/activemq/connector/ main/activemq/connector/openwire/ main/activemq/connector/openwire/marshal/ main...
Date Thu, 08 Nov 2007 21:02:22 GMT
Modified: activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSession.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSession.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSession.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSession.h Thu Nov  8 13:02:02 2007
@@ -19,13 +19,14 @@
 
 #include <cms/Session.h>
 #include <cms/ExceptionListener.h>
+#include <activemq/exceptions/ActiveMQException.h>
 #include <activemq/connector/SessionInfo.h>
 #include <activemq/connector/ConnectorResourceListener.h>
 #include <activemq/core/Dispatcher.h>
-#include <activemq/util/Map.h>
-#include <activemq/util/Set.h>
-#include <activemq/util/Queue.h>
-#include <activemq/util/Properties.h>
+#include <decaf/util/Map.h>
+#include <decaf/util/Set.h>
+#include <decaf/util/Queue.h>
+#include <decaf/util/Properties.h>
 
 namespace activemq{
 namespace core{
@@ -70,12 +71,12 @@
          * This can consist of consumers and producers and sometimes
          * destination.
          */
-        util::Set<cms::Closeable*> closableSessionResources;
+        decaf::util::Set<cms::Closeable*> closableSessionResources;
 
         /**
          * Map of consumers.
          */
-        util::Map<long long, ActiveMQConsumer*> consumers;
+        decaf::util::Map<long long, ActiveMQConsumer*> consumers;
 
         /**
          * Sends incoming messages to the registered consumers.
@@ -85,12 +86,12 @@
     public:
 
         ActiveMQSession( connector::SessionInfo* sessionInfo,
-                         const util::Properties& properties,
+                         const decaf::util::Properties& properties,
                          ActiveMQConnection* connection );
 
         virtual ~ActiveMQSession();
 
-        util::Map<long long, ActiveMQConsumer*>& getConsumers() {
+        decaf::util::Map<long long, ActiveMQConsumer*>& getConsumers() {
             return consumers;
         }
 
@@ -98,7 +99,7 @@
          * Redispatches the given set of unconsumed messages to the consumers.
          * @param unconsumedMessages - unconsumed messages to be redelivered.
          */
-        void redispatch( util::Queue<DispatchData>& unconsumedMessages );
+        void redispatch( decaf::util::Queue<DispatchData>& unconsumedMessages );
 
         /**
          * Stops asynchronous message delivery.

Modified: activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSessionExecutor.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSessionExecutor.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSessionExecutor.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSessionExecutor.cpp Thu Nov  8 13:02:02 2007
@@ -24,9 +24,10 @@
 using namespace std;
 using namespace activemq;
 using namespace activemq::core;
-using namespace activemq::util;
-using namespace activemq::concurrent;
 using namespace activemq::exceptions;
+using namespace decaf::lang;
+using namespace decaf::util;
+using namespace decaf::util::concurrent;
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQSessionExecutor::ActiveMQSessionExecutor( ActiveMQSession* session ) {
@@ -174,9 +175,9 @@
     try {
 
         ActiveMQConsumer* consumer = NULL;
-        util::Map<long long, ActiveMQConsumer*>& consumers = session->getConsumers();
+        Map<long long, ActiveMQConsumer*>& consumers = session->getConsumers();
 
-        synchronized(&consumers) {
+        synchronized( &consumers ) {
             consumer = consumers.getValue( data.getConsumer()->getConsumerId() );
         }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSessionExecutor.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSessionExecutor.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSessionExecutor.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQSessionExecutor.h Thu Nov  8 13:02:02 2007
@@ -19,61 +19,61 @@
 #define ACTIVEMQ_CORE_ACTIVEMQSESSIONEXECUTOR_
 
 #include <activemq/core/Dispatcher.h>
-#include <activemq/concurrent/Runnable.h>
-#include <activemq/concurrent/Thread.h>
-#include <activemq/concurrent/Mutex.h>
+#include <decaf/lang/Thread.h>
+#include <decaf/lang/Runnable.h>
+#include <decaf/util/concurrent/Mutex.h>
 #include <vector>
 #include <list>
 
 namespace activemq{
 namespace core{
-  
+
     class ActiveMQSession;
     class ActiveMQConsumer;
-  
+
     /**
      * Delegate dispatcher for a single session.  Contains a thread
      * to provide for asynchronous dispatching.
      */
-    class ActiveMQSessionExecutor : 
-        public Dispatcher, 
-        public concurrent::Runnable 
-    {   
+    class ActiveMQSessionExecutor :
+        public Dispatcher,
+        public decaf::lang::Runnable
+    {
     private:
-        
+
         ActiveMQSession* session;
-        std::list<DispatchData> messageQueue;        
-        concurrent::Thread* thread;
-        concurrent::Mutex mutex;
+        std::list<DispatchData> messageQueue;
+        decaf::lang::Thread* thread;
+        decaf::util::concurrent::Mutex mutex;
         bool started;
         bool closed;
-        
+
     public:
-    
+
         /**
          * Creates an un-started executor for the given session.
          */
         ActiveMQSessionExecutor( ActiveMQSession* session );
-        
+
         /**
          * Calls stop() then clear().
          */
         virtual ~ActiveMQSessionExecutor();
-        
+
         /**
          * Executes the dispatch.  Adds the given data to the
          * end of the queue.
          * @param data - the data to be dispatched.
          */
         virtual void execute( DispatchData& data );
-        
+
         /**
          * Executes the dispatch.  Adds the given data to the
          * beginning of the queue.
          * @param data - the data to be dispatched.
          */
         virtual void executeFirst( DispatchData& data );
-            
+
         /**
          * Removes all messages for the given consumer from the queue and
          * returns them.
@@ -81,56 +81,56 @@
          * @return all messages that were queued for the consumer.
          */
         virtual std::vector<ActiveMQMessage*> purgeConsumerMessages( ActiveMQConsumer* consumer );
-        
+
         /**
          * Starts the dispatching.
          */
         virtual void start();
-        
+
         /**
          * Stops dispatching.
          */
         virtual void stop();
-        
+
         /**
          * Terminates the dispatching thread.  Once this is called, the executor is no longer
          * usable.
-         */         
+         */
         virtual void close();
-        
+
         /**
          * Indicates if the executor is started
          */
         virtual bool isStarted() const {
             return started;
         }
-        
+
         /**
          * Removes all queued messgaes and destroys them.
          */
         virtual void clear();
-            
+
         /**
          * Dispatches a message to a particular consumer.
          * @param consumer - The consumer to dispatch to.
          * @param msg - The message to be dispatched.
          */
         virtual void dispatch( DispatchData& data );
-            
+
         /**
          * Run method - called by the Thread class in the context
          * of the thread.
          */
         virtual void run();
-        
+
     private:
-    
+
         /**
          * Dispatches all messages currently in the queue.
          */
         void dispatchAll();
     };
-    
+
 }}
 
 #endif /*ACTIVEMQ_CORE_ACTIVEMQSESSIONEXECUTOR_*/

Modified: activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.cpp Thu Nov  8 13:02:02 2007
@@ -16,21 +16,23 @@
  */
 #include "ActiveMQTransaction.h"
 
-#include <activemq/exceptions/NullPointerException.h>
 #include <activemq/core/ActiveMQSession.h>
 #include <activemq/core/ActiveMQConnection.h>
 #include <activemq/core/ActiveMQConsumer.h>
 #include <activemq/core/ActiveMQMessage.h>
-#include <activemq/util/Integer.h>
+#include <decaf/lang/exceptions/NullPointerException.h>
+#include <decaf/lang/Integer.h>
 
 using namespace std;
 using namespace cms;
 using namespace activemq;
 using namespace activemq::core;
-using namespace activemq::util;
-using namespace activemq::connector;
-using namespace activemq::concurrent;
 using namespace activemq::exceptions;
+using namespace activemq::connector;
+using namespace decaf::lang::exceptions;
+using namespace decaf::lang;
+using namespace decaf::util;
+using namespace decaf::util::concurrent;
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQTransaction::ActiveMQTransaction( ActiveMQConnection* connection,
@@ -273,7 +275,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void ActiveMQTransaction::redeliverMessages( ActiveMQConsumer* consumer,
-                                             MessageList& messages ) 
+                                             MessageList& messages )
     throw ( exceptions::ActiveMQException ) {
 
     try

Modified: activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/core/ActiveMQTransaction.h Thu Nov  8 13:02:02 2007
@@ -23,11 +23,12 @@
 #include <cms/Message.h>
 #include <cms/CMSException.h>
 
-#include <activemq/concurrent/Mutex.h>
+#include <activemq/exceptions/ActiveMQException.h>
 #include <activemq/connector/TransactionInfo.h>
-#include <activemq/exceptions/InvalidStateException.h>
-#include <activemq/exceptions/IllegalArgumentException.h>
-#include <activemq/util/Properties.h>
+#include <decaf/lang/exceptions/InvalidStateException.h>
+#include <decaf/lang/exceptions/IllegalArgumentException.h>
+#include <decaf/util/Properties.h>
+#include <decaf/util/concurrent/Mutex.h>
 
 namespace activemq{
 namespace core{
@@ -76,13 +77,13 @@
         RollbackMap rollbackMap;
 
         // Lock object to protect the rollback Map
-        concurrent::Mutex rollbackLock;
+        decaf::util::concurrent::Mutex rollbackLock;
 
         // Max number of redeliveries before we quit
         int maxRedeliveries;
 
         // Mutex that is signaled when all tasks complete.
-        concurrent::Mutex tasksDone;
+        decaf::util::concurrent::Mutex tasksDone;
 
     public:
 
@@ -94,7 +95,7 @@
          */
         ActiveMQTransaction( ActiveMQConnection* connection,
                              ActiveMQSession* session,
-                             const util::Properties& properties );
+                             const decaf::util::Properties& properties );
 
         virtual ~ActiveMQTransaction();
 
@@ -190,14 +191,14 @@
 
         /**
          * Redelivers each message that is in the Message List to the specified
-         * consumer, throwing messages away as they hit their max redilviery 
+         * consumer, throwing messages away as they hit their max redilviery
          * count.
          * @param consumer - the ActiveMQConsumer to redeliver to
          * @param messages - the list of messages that should be sent.
          * @throws ActiveMQException if an error occurs.
          */
         virtual void redeliverMessages( ActiveMQConsumer* consumer,
-                                        MessageList& messages ) 
+                                        MessageList& messages )
                                             throw ( exceptions::ActiveMQException );
     };
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.cpp Thu Nov  8 13:02:02 2007
@@ -16,10 +16,11 @@
  */
 #include <stdio.h>
 #include "ActiveMQException.h"
-#include <activemq/logger/LoggerDefines.h>
+#include <decaf/util/logging/LoggerDefines.h>
 
 using namespace activemq;
 using namespace activemq::exceptions;
+using namespace decaf::lang;
 using namespace std;
 
 // For supporting older versions of msvc (<=2003)
@@ -33,21 +34,28 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 ActiveMQException::ActiveMQException( const ActiveMQException& ex ) throw()
-: cms::CMSException()
-{
+: cms::CMSException(),
+  decaf::lang::Exception() {
+
+    *this = ex;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+ActiveMQException::ActiveMQException( const Exception& ex ) throw()
+: cms::CMSException() {
     *this = ex;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-ActiveMQException::ActiveMQException( const char* file, const int lineNumber, 
+ActiveMQException::ActiveMQException( const char* file, const int lineNumber,
                    const char* msg, ... ) throw()
 {
     va_list vargs;
     va_start( vargs, msg ) ;
     buildMessage( msg, vargs );
-    
+
     // Set the first mark for this exception.
-    setMark( file, lineNumber );
+    Exception::setMark( file, lineNumber );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -55,103 +63,13 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void ActiveMQException::setMessage( const char* msg, ... ){
-    va_list vargs;
-    va_start(vargs, msg);
-    buildMessage(msg, vargs);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-void ActiveMQException::buildMessage(const char* format, va_list& vargs)
-{
-    // Allocate buffer with a guess of it's size
-    int size = 128;
-    
-    // Format string
-    while( true ){
-    	
-    	// Allocate a buffer of the specified size.
-    	char* buffer = new char[size];
-    	
-        int written = vsnprintf(buffer, size, format, vargs);
-        if (written > -1 && written < size-1) {
-            
-            // Guessed size was enough. Assign the string.
-            message.assign (buffer, written);
-            
-            // assign isn't passing ownership, just copying, delete
-            // the allocated buffer.
-            delete [] buffer;
-            
-            break;
-        }
-                
-        // Our buffer wasn't big enough - destroy the old buffer,
-        // double the size and try again.
-        delete [] buffer;
-        size *= 2;
-    }
-    
-    //activemq::logger::SimpleLogger logger("com.yadda1");
-    //logger.log( message );   
-}
-
-////////////////////////////////////////////////////////////////////////////////
-void ActiveMQException::setMark( const char* file, const int lineNumber ){
-    
-    // Add this mark to the end of the stack trace.
-    stackTrace.push_back( std::make_pair( (std::string)file, (int)lineNumber ) );
-    
-    ostringstream stream;
-    stream << "\tFILE: " << stackTrace[stackTrace.size()-1].first;
-    stream << ", LINE: " << stackTrace[stackTrace.size()-1].second;
-                 
-    //activemq::logger::SimpleLogger logger("com.yadda2");
-    //logger.log( stream.str() );    
-}
-
-////////////////////////////////////////////////////////////////////////////////
 ActiveMQException* ActiveMQException::clone() const{
     return new ActiveMQException( *this );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-std::vector< std::pair< std::string, int> > ActiveMQException::getStackTrace() const{ 
-    return stackTrace; 
-}
-
-////////////////////////////////////////////////////////////////////////////////
-void ActiveMQException::printStackTrace() const{
-    printStackTrace( std::cerr );
-}
-
-////////////////////////////////////////////////////////////////////////////////
-void ActiveMQException::printStackTrace( std::ostream& stream ) const{
-    stream << getStackTraceString();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-std::string ActiveMQException::getStackTraceString() const{
-    
-    // Create the output stream.
-    std::ostringstream stream;
-    
-    // Write the message and each stack entry.
-    stream << message << std::endl;
-    for( unsigned int ix=0; ix<stackTrace.size(); ++ix ){
-        stream << "\tFILE: " << stackTrace[ix].first;
-        stream << ", LINE: " << stackTrace[ix].second;
-        stream << std::endl;                    
-    }
-    
-    // Return the string from the output stream.
-    return stream.str();
-}
-
-////////////////////////////////////////////////////////////////////////////////
-ActiveMQException& ActiveMQException::operator =( const ActiveMQException& ex ){
-    this->message = ex.message;
-    this->stackTrace = ex.stackTrace;
+ActiveMQException& ActiveMQException::operator =( const Exception& ex ){
+    this->setMessage( ex.getMessage().c_str() );
+    this->setStackTrace( ex.getStackTrace() );
     return *this;
 }
-

Modified: activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/exceptions/ActiveMQException.h Thu Nov  8 13:02:02 2007
@@ -14,10 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef ACTIVEMQ_EXCEPTIONS_ACTIVEMQEXCEPTION_H
-#define ACTIVEMQ_EXCEPTIONS_ACTIVEMQEXCEPTION_H
+#ifndef _ACTIVEMQ_EXCEPTIONS_ACTIVEMQEXCEPTION_H_
+#define _ACTIVEMQ_EXCEPTIONS_ACTIVEMQEXCEPTION_H_
 
 #include <cms/CMSException.h>
+#include <decaf/lang/Exception.h>
 #include <activemq/exceptions/ExceptionDefines.h>
 #include <stdarg.h>
 #include <sstream>
@@ -28,20 +29,8 @@
     /*
      * Base class for all exceptions.
      */
-    class ActiveMQException : public cms::CMSException
-    {
-    private:
-
-        /**
-         * The cause of this exception.
-         */
-        std::string message;
-
-        /**
-         * The stack trace.
-         */
-        std::vector< std::pair< std::string, int> > stackTrace;
-
+    class ActiveMQException : public cms::CMSException,
+                              public decaf::lang::Exception {
     public:
 
         /**
@@ -55,6 +44,11 @@
         ActiveMQException( const ActiveMQException& ex ) throw();
 
         /**
+         * Copy Constructor
+         */
+        ActiveMQException( const decaf::lang::Exception& ex ) throw();
+
+        /**
          * Constructor - Initializes the file name and line number where
          * this message occured.  Sets the message to report, using an
          * optional list of arguments to parse into the message
@@ -69,81 +63,92 @@
         virtual ~ActiveMQException() throw();
 
         /**
-         * Gets the message for this exception.
-         * @return Text formatted error message
+         * Clones this exception.  This is useful for cases where you need
+         * to preserve the type of the original exception as well as the message.
+         * All subclasses should override.
+         * @return Copy of this Exception object
          */
-        virtual std::string getMessage() const{
-            return message;
-        }
+        virtual ActiveMQException* clone() const;
 
         /**
-         * Implement method from std::exception
-         * @return the const char* of <code>getMessage()</code>.
+         * Assignment operator.
+         * @param const reference to another ActiveMQException
          */
-        virtual const char* what() const throw (){
-            return message.c_str();
-        }
+        //virtual ActiveMQException& operator =( const ActiveMQException& ex );
 
         /**
-         * Sets the cause for this exception.
-         * @param msg the format string for the msg.
-         * @param variable - params to format into the string
+         * Assignment operator.
+         * @param const reference to another ActiveMQException
+         */
+        virtual ActiveMQException& operator =( const Exception& ex );
+
+        /**
+         * Gets the cause of the error.
+         *
+         * @return string errors message
          */
-        virtual void setMessage( const char* msg, ... );
+        virtual std::string getMessage() const {
+            return decaf::lang::Exception::getMessage();
+        }
 
         /**
          * Adds a file/line number to the stack trace.
-         * @param file The name of the file calling this method (use __FILE__).
-         * @param lineNumber The line number in the calling file (use __LINE__).
+         *
+         * @param file
+         *      The name of the file calling this method (use __FILE__).
+         * @param lineNumber
+         *      The line number in the calling file (use __LINE__).
          */
-        virtual void setMark( const char* file, const int lineNumber );
+        virtual void setMark( const char* file, const int lineNumber ) {
+            decaf::lang::Exception::setMark( file, lineNumber );
+        }
 
         /**
          * Clones this exception.  This is useful for cases where you need
          * to preserve the type of the original exception as well as the message.
          * All subclasses should override.
+         *
          * @return Copy of this Exception object
          */
-        virtual ActiveMQException* clone() const;
+        //virtual CMSException* clone() const = 0
 
         /**
          * Provides the stack trace for every point where
-         * this exception was caught, marked, and rethrown.  The first
-         * item in the returned vector is the first point where the mark
-         * was set (e.g. where the exception was created).
-         * @return the stack trace.
+         * this exception was caught, marked, and rethrown.
+         *
+         * @return vector containing stack trace strings
          */
-        virtual std::vector< std::pair< std::string, int> > getStackTrace() const;
+        virtual std::vector< std::pair< std::string, int> > getStackTrace() const {
+            return decaf::lang::Exception::getStackTrace();
+        }
 
         /**
          * Prints the stack trace to std::err
          */
-        virtual void printStackTrace() const;
+        virtual void printStackTrace() const {
+            decaf::lang::Exception::printStackTrace();
+        }
 
         /**
          * Prints the stack trace to the given output stream.
+         *
          * @param stream the target output stream.
          */
-        virtual void printStackTrace( std::ostream& stream ) const;
+        virtual void printStackTrace( std::ostream& stream ) const {
+            decaf::lang::Exception::printStackTrace( stream );
+        }
 
         /**
          * Gets the stack trace as one contiguous string.
+         *
          * @return string with formatted stack trace data
          */
-        virtual std::string getStackTraceString() const;
-
-        /**
-         * Assignment operator.
-         * @param const reference to another ActiveMQException
-         */
-        virtual ActiveMQException& operator =( const ActiveMQException& ex );
-
-    protected:
-
-        virtual void buildMessage( const char* format, va_list& vargs );
+        virtual std::string getStackTraceString() const {
+            return decaf::lang::Exception::getStackTraceString();
+        }
 
    };
 
 }}
 
-#endif /*ACTIVEMQ_EXCEPTIONS_ACTIVEMQEXCEPTION_H*/
+#endif /*_ACTIVEMQ_EXCEPTIONS_ACTIVEMQEXCEPTION_H_*/

Modified: activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingInputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingInputStream.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingInputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingInputStream.cpp Thu Nov  8 13:02:02 2007
@@ -1,4 +1,4 @@
-/* 
+/*
  * 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.
@@ -14,35 +14,34 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 #include "LoggingInputStream.h"
 #include <sstream>
 #include <iomanip>
+#include <activemq/exceptions/ExceptionDefines.h>
 
 using namespace std;
 using namespace activemq;
 using namespace activemq::io;
+using namespace decaf::io;
+using namespace decaf::lang::exceptions;
 
-LOGCMS_INITIALIZE( logger, LoggingInputStream, "activemq.io.LoggingInputStream")
+LOGDECAF_INITIALIZE( logger, LoggingInputStream, "activemq.io.LoggingInputStream")
 
 ////////////////////////////////////////////////////////////////////////////////
-LoggingInputStream::LoggingInputStream( InputStream* inputStream, bool own )
- : FilterInputStream( inputStream, own )
-{
-}
+LoggingInputStream::LoggingInputStream( decaf::io::InputStream* inputStream, bool own )
+ : decaf::io::FilterInputStream( inputStream, own ) {}
 
 ////////////////////////////////////////////////////////////////////////////////
-LoggingInputStream::~LoggingInputStream()
-{
-}
+LoggingInputStream::~LoggingInputStream() {}
 
 ////////////////////////////////////////////////////////////////////////////////
 unsigned char LoggingInputStream::read() throw ( IOException ) {
     try {
         unsigned char c = FilterInputStream::read();
-        
+
         log( &c, 1 );
-        
+
         return c;
     }
     AMQ_CATCH_RETHROW( IOException )
@@ -50,14 +49,23 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-std::size_t LoggingInputStream::read( unsigned char* buffer, std::size_t bufferSize ) 
-    throw ( IOException )
+int LoggingInputStream::read( unsigned char* buffer,
+                              std::size_t offset,
+                              std::size_t bufferSize )
+    throw ( IOException, NullPointerException )
 {
     try {
-        std::size_t numRead = FilterInputStream::read( buffer, bufferSize );
-        
+
+        if( buffer == NULL ) {
+            throw NullPointerException(
+                __FILE__, __LINE__,
+                "LoggingInputStream::read - Passed Buffer is Null" );
+        }
+
+        std::size_t numRead = FilterInputStream::read( buffer, offset, bufferSize );
+
         log( buffer, numRead );
-        
+
         return numRead;
     }
     AMQ_CATCH_RETHROW( IOException )
@@ -66,21 +74,21 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void LoggingInputStream::log( const unsigned char* buffer, size_t len ) {
-        
+
     ostringstream ostream;
-    
+
     ostream << "TCP Trace: Reading: " << endl << "[";
-    
+
     for( size_t ix=0; ix<len; ++ix ){
         ostream << setw(2) << setfill('0') << std::hex << (int)buffer[ix];
-        
+
         if( ((ix+1) % 2) == 0 ){
             ostream << ' ';
         }
     }
-    
+
     ostream << "] len: " << std::dec << len << " bytes";
-        
+
     // Log the data
-    LOGCMS_INFO( logger, ostream.str() )
+    LOGDECAF_INFO( logger, ostream.str() )
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingInputStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingInputStream.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingInputStream.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingInputStream.h Thu Nov  8 13:02:02 2007
@@ -1,4 +1,4 @@
-/* 
+/*
  * 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.
@@ -18,29 +18,29 @@
 #ifndef _ACTIVEMQ_IO_LOGGINGINPUTSTREAM_H_
 #define _ACTIVEMQ_IO_LOGGINGINPUTSTREAM_H_
 
-#include <activemq/io/FilterInputStream.h>
-#include <activemq/logger/LoggerDefines.h>
+#include <decaf/io/FilterInputStream.h>
+#include <decaf/util/logging/LoggerDefines.h>
+#include <decaf/lang/exceptions/NullPointerException.h>
 
 namespace activemq{
 namespace io{
-    
-    class LoggingInputStream : public FilterInputStream
-    {
+
+    class LoggingInputStream : public decaf::io::FilterInputStream {
     private:
-    
-        LOGCMS_DECLARE(logger) 
-        
+
+        LOGDECAF_DECLARE(logger)
+
     public:
-    
+
         /**
-         * Creates a DataInputStream that uses the specified underlying 
+         * Creates a DataInputStream that uses the specified underlying
          * InputStream.
          * @param inputStream the InputStream instance to wrap.
          * @param own, indicates if this class owns the wrapped string
          * defaults to false.
          */
-        LoggingInputStream( InputStream* inputStream, bool own = false );
-        
+        LoggingInputStream( decaf::io::InputStream* inputStream, bool own = false );
+
         virtual ~LoggingInputStream();
 
         /**
@@ -49,21 +49,26 @@
          * @return The next byte.
          * @throws IOException thrown if an error occurs.
          */
-        virtual unsigned char read() throw ( IOException );
-        
+        virtual unsigned char read() throw ( decaf::io::IOException );
+
         /**
          * Reads an array of bytes from the buffer.  Blocks until
          * the requested number of bytes are available.
          * @param buffer (out) the target buffer.
+         * @param offset the position in the buffer to start at
          * @param bufferSize the size of the output buffer.
          * @return The number of bytes read or -1 if EOF is detected
          * @throws IOException thrown if an error occurs.
+         * @throws NullPointerException if buffer is null
          */
-        virtual std::size_t read( unsigned char* buffer, std::size_t bufferSize ) 
-            throw ( IOException );
-            
+        virtual int read( unsigned char* buffer,
+                          std::size_t offset,
+                          std::size_t bufferSize )
+            throw ( decaf::io::IOException,
+                    decaf::lang::exceptions::NullPointerException );
+
     private:
-    
+
         /**
          * Logs the data in the buffer.
          */

Modified: activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingOutputStream.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingOutputStream.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingOutputStream.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingOutputStream.cpp Thu Nov  8 13:02:02 2007
@@ -1,4 +1,4 @@
-/* 
+/*
  * 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.
@@ -14,48 +14,56 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
+
 #include "LoggingOutputStream.h"
 #include <sstream>
 #include <iomanip>
+#include <activemq/exceptions/ExceptionDefines.h>
 
 using namespace std;
 using namespace activemq;
 using namespace activemq::io;
+using namespace decaf::io;
+using namespace decaf::lang::exceptions;
 
-LOGCMS_INITIALIZE( logger, LoggingOutputStream, "activemq.io.LoggingOutputStream")
+LOGDECAF_INITIALIZE( logger, LoggingOutputStream, "activemq.io.LoggingOutputStream")
 
 ////////////////////////////////////////////////////////////////////////////////
 LoggingOutputStream::LoggingOutputStream( OutputStream* outputStream, bool own )
- : FilterOutputStream( outputStream, own )
-{
-}
+ : decaf::io::FilterOutputStream( outputStream, own ) {}
 
 ////////////////////////////////////////////////////////////////////////////////
-LoggingOutputStream::~LoggingOutputStream()
-{
-}
+LoggingOutputStream::~LoggingOutputStream() {}
 
 ////////////////////////////////////////////////////////////////////////////////
 void LoggingOutputStream::write( const unsigned char c ) throw ( IOException ) {
     try {
-        
+
         log( &c, 1 );
-        
-        FilterOutputStream::write( c );       
+
+        FilterOutputStream::write( c );
     }
     AMQ_CATCH_RETHROW( IOException )
     AMQ_CATCHALL_THROW( IOException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void LoggingOutputStream::write( const unsigned char* buffer, size_t len )
-    throw ( IOException ) {
+void LoggingOutputStream::write( const unsigned char* buffer,
+                                 size_t offset,
+                                 size_t len )
+    throw ( IOException, NullPointerException ) {
 
     try {
+
+        if( buffer == NULL ) {
+            throw NullPointerException(
+                __FILE__, __LINE__,
+                "LoggingOutputStream::write - Passed Buffer is Null" );
+        }
+
         log( buffer, len );
-        
-        FilterOutputStream::write( buffer, len );
+
+        FilterOutputStream::write( buffer, offset, len );
     }
     AMQ_CATCH_RETHROW( IOException )
     AMQ_CATCHALL_THROW( IOException )
@@ -63,21 +71,21 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void LoggingOutputStream::log( const unsigned char* buffer, size_t len ) {
-        
-    // Write the buffer as hex to a string stream.    
+
+    // Write the buffer as hex to a string stream.
     ostringstream ostream;
     ostream << "TCP Trace: Writing:" << endl << '[';
-        
+
     for( size_t ix=0; ix<len; ++ix ){
         ostream << setw(2) << setfill('0') << std::hex << (int)buffer[ix];
-        
+
         if( ((ix+1) % 2) == 0 ){
             ostream << ' ';
         }
     }
-    
+
     ostream << "] len: " << std::dec << len << " bytes";
-        
+
     // Log the data
-    LOGCMS_INFO( logger, ostream.str() )
+    LOGDECAF_INFO( logger, ostream.str() )
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingOutputStream.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingOutputStream.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingOutputStream.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/io/LoggingOutputStream.h Thu Nov  8 13:02:02 2007
@@ -17,25 +17,24 @@
 
 #ifndef ACTIVEMQ_IO_LOGGINGOUTPUTSTREAM_H_
 #define ACTIVEMQ_IO_LOGGINGOUTPUTSTREAM_H_
- 
-#include <activemq/io/FilterOutputStream.h>
-#include <activemq/logger/LoggerDefines.h>
+
+#include <decaf/io/FilterOutputStream.h>
+#include <decaf/util/logging/LoggerDefines.h>
 
 namespace activemq{
 namespace io{
-      
+
     /**
      * OutputStream filter that just logs the data being
      * written.
      */
-    class LoggingOutputStream : public FilterOutputStream
-    {     
+    class LoggingOutputStream : public decaf::io::FilterOutputStream {
     private:
-    
-        LOGCMS_DECLARE(logger)         
-        
+
+        LOGDECAF_DECLARE(logger)
+
     public:
-   
+
         /**
          * Constructor.
          * @param outputStream the OutputStream to wrap
@@ -43,34 +42,39 @@
          * output stream that it encapsulates.
          */
         LoggingOutputStream( OutputStream* next, bool own = false );
-      
+
         virtual ~LoggingOutputStream();
-       
+
         /**
          * Writes a single byte to the output stream.
          * @param c the byte.
          * @throws IOException thrown if an error occurs.
          */
-        virtual void write( unsigned char c ) throw ( IOException );
-      
+        virtual void write( unsigned char c ) throw ( decaf::io::IOException );
+
         /**
          * Writes an array of bytes to the output stream.
          * @param buffer The array of bytes to write.
+         * @param offset the position in the buffer to start at
          * @param len The number of bytes from the buffer to be written.
          * @throws IOException thrown if an error occurs.
+         * @throws NullPointerException if buffer is null.
          */
-        virtual void write( const unsigned char* buffer, 
-                            std::size_t len ) throw ( IOException );
-                            
+        virtual void write( const unsigned char* buffer,
+                            std::size_t offset,
+                            std::size_t len )
+            throw ( decaf::io::IOException,
+                    decaf::lang::exceptions::NullPointerException );
+
     private:
-    
+
         /**
          * Logs the data in the buffer.
          */
         void log( const unsigned char* buffer, std::size_t len );
-        
+
     };
-   
+
 }}
 
 #endif /*ACTIVEMQ_IO_LOGGINGOUTPUTSTREAM_H_*/

Modified: activemq/activemq-cpp/trunk/src/main/activemq/support/InitDirector.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/support/InitDirector.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/support/InitDirector.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/support/InitDirector.cpp Thu Nov  8 13:02:02 2007
@@ -16,7 +16,7 @@
  */
 #include "InitDirector.h"
 
-#include <activemq/logger/LogWriter.h>
+#include <decaf/util/logging/LogWriter.h>
 #include <activemq/transport/IOTransportFactory.h>
 #include <activemq/transport/MockTransportFactory.h>
 #include <activemq/transport/filters/AsyncSendTransportFactory.h>
@@ -28,15 +28,14 @@
 
 using namespace activemq;
 using namespace activemq::support;
+using namespace decaf::util::logging;
 
 int InitDirector::refCount;
 
 ////////////////////////////////////////////////////////////////////////////////
 InitDirector::InitDirector(void)
 {
-    if( refCount == 0 )
-    {
-        logger::LogWriter::getInstance();
+    if( refCount == 0 ) {
         connector::stomp::StompConnectorFactory::getInstance();
         connector::openwire::OpenWireConnectorFactory::getInstance();
         transport::filters::TcpTransportFactory::getInstance();
@@ -55,7 +54,6 @@
 {
     refCount--;
 
-    if( refCount == 0 )
-    {
+    if( refCount == 0 ) {
     }
 }

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandIOException.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandIOException.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandIOException.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandIOException.h Thu Nov  8 13:02:02 2007
@@ -18,13 +18,12 @@
 #ifndef ACTIVEMQ_TRANSPORT_COMMANDIOEXCEPTION_H_
 #define ACTIVEMQ_TRANSPORT_COMMANDIOEXCEPTION_H_
 
-#include <activemq/io/IOException.h>
-#include <activemq/exceptions/ActiveMQException.h>
+#include <decaf/io/IOException.h>
 
 namespace activemq{
 namespace transport{
 
-    class CommandIOException : public io::IOException{
+    class CommandIOException : public decaf::io::IOException{
     public:
 
         /**
@@ -36,10 +35,10 @@
          * Copy Constructor
          * @param ex the exception to copy
          */
-        CommandIOException( const exceptions::ActiveMQException& ex ) throw()
-        : io::IOException()
+        CommandIOException( const decaf::lang::Exception& ex ) throw()
+        : decaf::io::IOException()
         {
-            *(exceptions::ActiveMQException*)this = ex;
+            *this = ex;
         }
 
         /**
@@ -47,9 +46,8 @@
          * @param ex the exception to copy, which is an instance of this type
          */
         CommandIOException( const CommandIOException& ex ) throw()
-        : io::IOException()
-        {
-            *(exceptions::ActiveMQException*)this = ex;
+        : decaf::io::IOException() {
+            *this = ex;
         }
 
         /**
@@ -60,7 +58,7 @@
          */
         CommandIOException( const char* file, const int lineNumber,
                             const char* msg, ... ) throw()
-        : io::IOException()
+        : decaf::io::IOException()
         {
             va_list vargs;
             va_start( vargs, msg );
@@ -76,7 +74,7 @@
          * All subclasses should override.
          * @return cloned version of this exception
          */
-        virtual exceptions::ActiveMQException* clone() const{
+        virtual CommandIOException* clone() const{
             return new CommandIOException( *this );
         }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandReader.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandReader.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandReader.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandReader.h Thu Nov  8 13:02:02 2007
@@ -15,10 +15,10 @@
  * limitations under the License.
  */
 
-#ifndef ACTIVEMQ_TRANSPORT_COMMANDREADER_H_
-#define ACTIVEMQ_TRANSPORT_COMMANDREADER_H_
+#ifndef _ACTIVEMQ_TRANSPORT_COMMANDREADER_H_
+#define _ACTIVEMQ_TRANSPORT_COMMANDREADER_H_
 
-#include <activemq/io/Reader.h>
+#include <decaf/io/Reader.h>
 #include <activemq/transport/CommandIOException.h>
 #include <activemq/transport/Command.h>
 
@@ -29,8 +29,7 @@
      * Interface for an object responsible for reading a command
      * from an input stream.
      */
-    class CommandReader : public io::Reader
-    {
+    class CommandReader : public decaf::io::Reader {
     public:
 
         virtual ~CommandReader(){}
@@ -47,4 +46,4 @@
 
 }}
 
-#endif /*ACTIVEMQ_COMMANDS_COMMANDREADER_H_*/
+#endif /*_ACTIVEMQ_TRANSPORT_COMMANDREADER_H_*/

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandWriter.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandWriter.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandWriter.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/CommandWriter.h Thu Nov  8 13:02:02 2007
@@ -18,8 +18,8 @@
 #ifndef ACTIVEMQ_TRANSPORT_COMMANDWRITER_H_
 #define ACTIVEMQ_TRANSPORT_COMMANDWRITER_H_
 
-#include <activemq/io/OutputStream.h>
-#include <activemq/io/Writer.h>
+#include <decaf/io/OutputStream.h>
+#include <decaf/io/Writer.h>
 #include <activemq/transport/CommandIOException.h>
 #include <activemq/transport/Command.h>
 
@@ -30,7 +30,7 @@
      * Interface for an object responsible for writing a command
      * to an output stream.
      */
-    class CommandWriter : public io::Writer
+    class CommandWriter : public decaf::io::Writer
     {
     public:
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransport.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransport.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransport.cpp Thu Nov  8 13:02:02 2007
@@ -19,15 +19,16 @@
 #include "CommandReader.h"
 #include "CommandWriter.h"
 
-#include <activemq/concurrent/Concurrent.h>
-#include <activemq/exceptions/UnsupportedOperationException.h>
+#include <decaf/util/concurrent/Concurrent.h>
+#include <decaf/lang/exceptions/UnsupportedOperationException.h>
 #include <activemq/util/Config.h>
 
 using namespace activemq;
 using namespace activemq::transport;
-using namespace activemq::concurrent;
+using namespace decaf::lang;
+using namespace decaf::util::concurrent;
 
-LOGCMS_INITIALIZE(logger, IOTransport, "activemq.transport.IOTransport" )
+LOGDECAF_INITIALIZE(logger, IOTransport, "activemq.transport.IOTransport" )
 
 ////////////////////////////////////////////////////////////////////////////////
 IOTransport::IOTransport(){
@@ -50,7 +51,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void IOTransport::oneway( Command* command )
-    throw(CommandIOException, exceptions::UnsupportedOperationException)
+    throw(CommandIOException, decaf::lang::exceptions::UnsupportedOperationException)
 {
     if( closed ){
         throw CommandIOException( __FILE__, __LINE__,
@@ -181,7 +182,7 @@
             __FILE__, __LINE__,
             "IOTransport::run - caught unknown exception" );
 
-        LOGCMS_WARN(logger, ex.getStackTraceString() );
+        LOGDECAF_WARN(logger, ex.getStackTraceString() );
 
         fire( ex );
     }
@@ -189,8 +190,10 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 Response* IOTransport::request( Command* command AMQCPP_UNUSED )
-    throw( CommandIOException, exceptions::UnsupportedOperationException ){
+    throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException ){
 
-    throw exceptions::UnsupportedOperationException( __FILE__, __LINE__, "IOTransport::request() - unsupported operation" );
+    throw decaf::lang::exceptions::UnsupportedOperationException(
+        __FILE__, __LINE__,
+        "IOTransport::request() - unsupported operation" );
 }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransport.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransport.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransport.h Thu Nov  8 13:02:02 2007
@@ -21,11 +21,11 @@
 #include <activemq/transport/Transport.h>
 #include <activemq/transport/TransportExceptionListener.h>
 #include <activemq/transport/CommandListener.h>
-#include <activemq/concurrent/Runnable.h>
-#include <activemq/concurrent/Thread.h>
+#include <decaf/lang/Runnable.h>
+#include <decaf/lang/Thread.h>
 #include <activemq/exceptions/ActiveMQException.h>
 #include <activemq/transport/Command.h>
-#include <activemq/logger/LoggerDefines.h>
+#include <decaf/util/logging/LoggerDefines.h>
 
 namespace activemq{
 namespace transport{
@@ -42,13 +42,12 @@
      * destructor.  Once this object has been closed, it cannot be
      * restarted.
      */
-    class IOTransport
-    :
+    class IOTransport :
         public Transport,
-        public concurrent::Runnable
+        public decaf::lang::Runnable
     {
 
-        LOGCMS_DECLARE( logger )
+        LOGDECAF_DECLARE( logger )
 
     private:
 
@@ -75,17 +74,17 @@
         /**
          * The input stream for incoming commands.
          */
-        io::InputStream* inputStream;
+        decaf::io::InputStream* inputStream;
 
         /**
          * The output stream for out-going commands.
          */
-        io::OutputStream* outputStream;
+        decaf::io::OutputStream* outputStream;
 
         /**
          * The polling thread.
          */
-        concurrent::Thread* thread;
+        decaf::lang::Thread* thread;
 
         /**
          * Flag marking this transport as closed.
@@ -147,7 +146,8 @@
          * @throws UnsupportedOperationException if this method is not implemented
          * by this transport.
          */
-        virtual void oneway( Command* command ) throw( CommandIOException, exceptions::UnsupportedOperationException );
+        virtual void oneway( Command* command )
+            throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException );
 
         /**
          * Not supported by this class - throws an exception.
@@ -155,7 +155,8 @@
          * @returns the response to the command sent.
          * @throws UnsupportedOperationException.
          */
-        virtual Response* request( Command* command ) throw( CommandIOException, exceptions::UnsupportedOperationException );
+        virtual Response* request( Command* command )
+            throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException );
 
         /**
          * Assigns the command listener for non-response commands.
@@ -193,7 +194,7 @@
          * Sets the input stream for in-coming commands.
          * @param is The input stream.
          */
-        virtual void setInputStream( io::InputStream* is ){
+        virtual void setInputStream( decaf::io::InputStream* is ){
             this->inputStream = is;
         }
 
@@ -201,7 +202,7 @@
          * Sets the output stream for out-going commands.
          * @param os The output stream.
          */
-        virtual void setOutputStream( io::OutputStream* os ){
+        virtual void setOutputStream( decaf::io::OutputStream* os ){
             this->outputStream = os;
         }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.cpp Thu Nov  8 13:02:02 2007
@@ -24,7 +24,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 Transport* IOTransportFactory::createTransport(
-    const activemq::util::Properties& properties AMQCPP_UNUSED,
+    const decaf::util::Properties& properties AMQCPP_UNUSED,
     Transport* next AMQCPP_UNUSED,
     bool own AMQCPP_UNUSED ) throw ( exceptions::ActiveMQException ) {
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/IOTransportFactory.h Thu Nov  8 13:02:02 2007
@@ -18,6 +18,7 @@
 #ifndef ACTIVEMQ_TRANSPORT_IOTRANSPORTFACTORY_H_
 #define ACTIVEMQ_TRANSPORT_IOTRANSPORTFACTORY_H_
 
+#include <activemq/exceptions/ActiveMQException.h>
 #include <activemq/transport/TransportFactory.h>
 #include <activemq/transport/TransportFactoryMapRegistrar.h>
 
@@ -45,7 +46,7 @@
          * @throws ActiveMQException if an error occurs.
          */
         virtual Transport* createTransport(
-            const activemq::util::Properties& properties,
+            const decaf::util::Properties& properties,
             Transport* next,
             bool own ) throw ( exceptions::ActiveMQException );
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.cpp Thu Nov  8 13:02:02 2007
@@ -67,7 +67,8 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void MockTransport::oneway( Command* command )
-        throw(CommandIOException, exceptions::UnsupportedOperationException)
+        throw( CommandIOException,
+               decaf::lang::exceptions::UnsupportedOperationException)
 {
     // Process and send any new Commands back.
     internalListener.onCommand( command );
@@ -81,8 +82,8 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 Response* MockTransport::request( Command* command )
-    throw(CommandIOException,
-          exceptions::UnsupportedOperationException)
+    throw( CommandIOException,
+           decaf::lang::exceptions::UnsupportedOperationException)
 {
     if( responseBuilder != NULL ){
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransport.h Thu Nov  8 13:02:02 2007
@@ -18,17 +18,17 @@
 #ifndef ACTIVEMQ_TANSPORT_MOCKTRANSPORT_H_
 #define ACTIVEMQ_TANSPORT_MOCKTRANSPORT_H_
 
+#include <activemq/util/Config.h>
 #include <activemq/transport/Transport.h>
-#include <activemq/concurrent/Concurrent.h>
 #include <activemq/transport/CommandListener.h>
 #include <activemq/transport/TransportExceptionListener.h>
 #include <activemq/transport/CommandIOException.h>
-#include <activemq/concurrent/Concurrent.h>
-#include <activemq/concurrent/Mutex.h>
-#include <activemq/concurrent/Thread.h>
-#include <activemq/util/Config.h>
-#include <activemq/util/Queue.h>
-#include <activemq/concurrent/CountDownLatch.h>
+#include <decaf/util/concurrent/Concurrent.h>
+#include <decaf/util/concurrent/Mutex.h>
+#include <decaf/lang/Thread.h>
+#include <decaf/util/Queue.h>
+#include <decaf/util/concurrent/CountDownLatch.h>
+#include <decaf/util/concurrent/Concurrent.h>
 
 #include <cms/Message.h>
 
@@ -78,7 +78,7 @@
              * @param queue - Queue of Command sent back from the broker.
              */
             virtual void buildIncomingCommands(
-                const Command* cmd, util::Queue<Command*>& queue ) = 0;
+                const Command* cmd, decaf::util::Queue<Command*>& queue ) = 0;
 
         };
 
@@ -91,15 +91,15 @@
          */
         class InternalCommandListener :
             public CommandListener,
-            public concurrent::Thread
+            public decaf::lang::Thread
         {
         private:
 
             MockTransport* transport;
             ResponseBuilder* responseBuilder;
             bool done;
-            concurrent::CountDownLatch startedLatch;
-            util::Queue<Command*> inboundQueue;
+            decaf::util::concurrent::CountDownLatch startedLatch;
+            decaf::util::Queue<Command*> inboundQueue;
 
         public:
 
@@ -178,7 +178,7 @@
         CommandListener* outgoingCommandListener;
         TransportExceptionListener* exceptionListener;
         unsigned int nextCommandId;
-        concurrent::Mutex commandIdMutex;
+        decaf::util::concurrent::Mutex commandIdMutex;
         bool own;
         InternalCommandListener internalListener;
         static MockTransport* instance;
@@ -205,11 +205,11 @@
         }
 
         virtual void oneway( Command* command )
-            throw(CommandIOException, exceptions::UnsupportedOperationException);
+            throw(CommandIOException, decaf::lang::exceptions::UnsupportedOperationException);
 
         virtual Response* request( Command* command )
-            throw(CommandIOException,
-                  exceptions::UnsupportedOperationException);
+            throw( CommandIOException,
+                   decaf::lang::exceptions::UnsupportedOperationException);
 
         virtual void setCommandListener( CommandListener* listener ){
             this->commandListener = listener;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.cpp Thu Nov  8 13:02:02 2007
@@ -24,11 +24,11 @@
 
 using namespace activemq;
 using namespace activemq::transport;
-using namespace activemq::util;
+using namespace decaf::util;
 
 ////////////////////////////////////////////////////////////////////////////////
 Transport* MockTransportFactory::createTransport(
-    const activemq::util::Properties& properties,
+    const decaf::util::Properties& properties,
     Transport* next,
     bool own ) throw ( exceptions::ActiveMQException )
 {

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/MockTransportFactory.h Thu Nov  8 13:02:02 2007
@@ -37,7 +37,7 @@
          * @param properties The properties for the transport.
          */
         virtual Transport* createTransport(
-            const activemq::util::Properties& properties,
+            const decaf::util::Properties& properties,
             Transport* next = NULL,
             bool own = true ) throw ( exceptions::ActiveMQException );
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/Transport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/Transport.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/Transport.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/Transport.h Thu Nov  8 13:02:02 2007
@@ -18,10 +18,10 @@
 #ifndef ACTIVEMQ_TRANSPORT_TRANSPORT_H_
 #define ACTIVEMQ_TRANSPORT_TRANSPORT_H_
 
-#include <activemq/io/InputStream.h>
-#include <activemq/io/OutputStream.h>
+#include <decaf/io/InputStream.h>
+#include <decaf/io/OutputStream.h>
+#include <decaf/lang/exceptions/UnsupportedOperationException.h>
 #include <activemq/transport/CommandIOException.h>
-#include <activemq/exceptions/UnsupportedOperationException.h>
 #include <activemq/transport/Command.h>
 #include <activemq/transport/Response.h>
 #include <cms/Startable.h>
@@ -67,7 +67,7 @@
          */
         virtual void oneway( Command* command )
             throw( CommandIOException,
-                   exceptions::UnsupportedOperationException ) = 0;
+                   decaf::lang::exceptions::UnsupportedOperationException ) = 0;
 
         /**
          * Sends the given command to the broker and then waits for the response.
@@ -80,7 +80,7 @@
          */
         virtual Response* request( Command* command )
             throw( CommandIOException,
-                   exceptions::UnsupportedOperationException ) = 0;
+                    decaf::lang::exceptions::UnsupportedOperationException ) = 0;
 
         /**
          * Assigns the command listener for non-response commands.

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportBuilder.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportBuilder.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportBuilder.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportBuilder.cpp Thu Nov  8 13:02:02 2007
@@ -17,23 +17,24 @@
 
 #include "TransportBuilder.h"
 
-#include <activemq/util/StringTokenizer.h>
+#include <decaf/util/StringTokenizer.h>
 #include <activemq/transport/TransportFactoryMap.h>
+#include <activemq/exceptions/ActiveMQException.h>
 
 using namespace std;
 using namespace activemq;
-using namespace activemq::transport;
-using namespace activemq::util;
 using namespace activemq::exceptions;
+using namespace activemq::transport;
+using namespace decaf;
+using namespace decaf::util;
+using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
-TransportBuilder::TransportBuilder()
-{
+TransportBuilder::TransportBuilder() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-TransportBuilder::~TransportBuilder()
-{
+TransportBuilder::~TransportBuilder() {
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -87,7 +88,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 void TransportBuilder::parseURL( const std::string& URI,
                                  util::Properties& properties )
-    throw ( exceptions::IllegalArgumentException ) {
+    throw ( decaf::lang::exceptions::IllegalArgumentException ) {
 
     try
     {
@@ -99,7 +100,7 @@
         // transport, url, port.
         if( tokenizer.countTokens() < 3 )
         {
-            throw exceptions::IllegalArgumentException(
+            throw decaf::lang::exceptions::IllegalArgumentException(
                 __FILE__, __LINE__,
                 (string( "TransportBuilder::parseURL - "
                          "Marlformed URI: ") + URI).c_str() );
@@ -123,7 +124,7 @@
 
             if( tokenizer.countTokens() != 2 )
             {
-                throw exceptions::IllegalArgumentException(
+                throw decaf::lang::exceptions::IllegalArgumentException(
                     __FILE__, __LINE__,
                     ( string( "TransportBuilder::parseURL - "
                               "Marlformed Parameter = " ) + tokens[i] ).c_str() );

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportBuilder.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportBuilder.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportBuilder.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportBuilder.h Thu Nov  8 13:02:02 2007
@@ -19,8 +19,8 @@
 #define _ACTIVEMQ_TRANSPORT_TRANSPORTBUILDER_H_
 
 #include <activemq/transport/Transport.h>
-#include <activemq/util/Properties.h>
-#include <activemq/exceptions/IllegalArgumentException.h>
+#include <decaf/util/Properties.h>
+#include <decaf/lang/exceptions/IllegalArgumentException.h>
 
 namespace activemq{
 namespace transport{
@@ -49,7 +49,7 @@
          * @throws CMSException on failure.
          */
         virtual Transport* buildTransport( const std::string& url,
-                                           util::Properties& properties )
+                                           decaf::util::Properties& properties )
                                             throw ( cms::CMSException );
 
     protected:
@@ -62,8 +62,8 @@
          * @throws IllegalArgumentException if the passed URI is invalid
          */
         virtual void parseURL( const std::string& URI,
-                               util::Properties& properties )
-            throw ( exceptions::IllegalArgumentException );
+                               decaf::util::Properties& properties )
+            throw ( decaf::lang::exceptions::IllegalArgumentException );
 
         /**
          * Given a Transport Name and the properties it should use to configure
@@ -76,7 +76,7 @@
          * @throws CMSException if an error occurs during creation.
          */
         virtual Transport* createTransport( const std::string& name,
-                                            const util::Properties& properties,
+                                            const decaf::util::Properties& properties,
                                             Transport* next = NULL )
                                                 throw ( cms::CMSException );
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportFactory.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportFactory.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportFactory.h Thu Nov  8 13:02:02 2007
@@ -19,8 +19,9 @@
 #define ACTIVEMQ_TRANSPORT_TRANSPORTFACTORY_H_
 
 #include <activemq/transport/Transport.h>
-#include <activemq/util/Properties.h>
+#include <decaf/util/Properties.h>
 #include <activemq/util/Config.h>
+#include <activemq/exceptions/ActiveMQException.h>
 
 namespace activemq{
 namespace transport{
@@ -45,7 +46,7 @@
          * @throws ActiveMQexception if an error occurs
          */
         virtual Transport* createTransport(
-            const activemq::util::Properties& properties,
+            const decaf::util::Properties& properties,
             Transport* next = NULL,
             bool own = true ) throw ( exceptions::ActiveMQException ) = 0;
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportFilter.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportFilter.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportFilter.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/TransportFilter.h Thu Nov  8 13:02:02 2007
@@ -124,7 +124,7 @@
          * @throws UnsupportedOperationException if this method is not implemented
          * by this transport.
          */
-        virtual void oneway( Command* command ) throw(CommandIOException, exceptions::UnsupportedOperationException){
+        virtual void oneway( Command* command ) throw(CommandIOException, decaf::lang::exceptions::UnsupportedOperationException){
             next->oneway( command );
         }
 
@@ -133,7 +133,7 @@
          * @param command the command that is sent as a request
          * @throws UnsupportedOperationException.
          */
-        virtual Response* request( Command* command ) throw(CommandIOException, exceptions::UnsupportedOperationException){
+        virtual Response* request( Command* command ) throw(CommandIOException, decaf::lang::exceptions::UnsupportedOperationException){
             return next->request( command );
         }
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransport.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransport.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransport.cpp Thu Nov  8 13:02:02 2007
@@ -21,9 +21,11 @@
 using namespace activemq;
 using namespace activemq::transport;
 using namespace activemq::transport::filters;
-using namespace activemq::util;
 using namespace activemq::exceptions;
-using namespace activemq::concurrent;
+using namespace decaf::lang;
+using namespace decaf::util;
+using namespace decaf::util::concurrent;
+using namespace decaf::lang::exceptions;
 
 ////////////////////////////////////////////////////////////////////////////////
 AsyncSendTransport::AsyncSendTransport( Transport* next, bool own )
@@ -45,7 +47,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void AsyncSendTransport::oneway( Command* command )
-    throw( CommandIOException, exceptions::UnsupportedOperationException ) {
+    throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException ) {
 
     try{
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransport.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransport.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransport.h Thu Nov  8 13:02:02 2007
@@ -19,26 +19,26 @@
 #define _ACTIVEMQ_TRANSPORT_FILTERS_ASYNCSENDTRANSPORT_H_
 
 #include <activemq/transport/TransportFilter.h>
-#include <activemq/util/Queue.h>
-#include <activemq/concurrent/Runnable.h>
+#include <decaf/util/Queue.h>
+#include <decaf/lang/Runnable.h>
 
 namespace activemq{
 namespace transport{
 namespace filters{
 
     class AsyncSendTransport : public TransportFilter,
-                               public concurrent::Runnable {
+                               public decaf::lang::Runnable {
     private:
 
         /**
          * Thread to send messages in when oneway is called.
          */
-        concurrent::Thread* asyncThread;
+        decaf::lang::Thread* asyncThread;
 
         /**
          * Outgoing Message Queue
          */
-        util::Queue<Command*> msgQueue;
+        decaf::util::Queue<Command*> msgQueue;
 
         /**
          * boolean indicating that this transport is closed
@@ -66,7 +66,7 @@
          * by this transport.
          */
         virtual void oneway( Command* command )
-            throw( CommandIOException, exceptions::UnsupportedOperationException );
+            throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException );
 
         /**
          * Starts this transport object and creates the thread for

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransportFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransportFactory.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransportFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransportFactory.cpp Thu Nov  8 13:02:02 2007
@@ -37,7 +37,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 Transport* AsyncSendTransportFactory::createTransport(
-    const activemq::util::Properties& properties AMQCPP_UNUSED,
+    const decaf::util::Properties& properties AMQCPP_UNUSED,
     Transport* next,
     bool own ) throw ( ActiveMQException ) {
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransportFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransportFactory.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransportFactory.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/AsyncSendTransportFactory.h Thu Nov  8 13:02:02 2007
@@ -43,7 +43,7 @@
          * @throws ActiveMQException if an error occurs.
          */
         virtual Transport* createTransport(
-            const activemq::util::Properties& properties,
+            const decaf::util::Properties& properties,
             Transport* next,
             bool own ) throw ( exceptions::ActiveMQException );
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/FutureResponse.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/FutureResponse.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/FutureResponse.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/FutureResponse.h Thu Nov  8 13:02:02 2007
@@ -18,8 +18,8 @@
 #ifndef ACTIVEMQ_TRANSPORT_FILTERS_FUTURERESPONSE_H_
 #define ACTIVEMQ_TRANSPORT_FILTERS_FUTURERESPONSE_H_
 
-#include <activemq/concurrent/Mutex.h>
-#include <activemq/concurrent/Concurrent.h>
+#include <decaf/util/concurrent/Mutex.h>
+#include <decaf/util/concurrent/Concurrent.h>
 #include <activemq/transport/Response.h>
 
 #include <activemq/exceptions/ActiveMQException.h>
@@ -34,11 +34,11 @@
      * and when a response comes in, notify can be called to
      * inform those waiting that the response is now available.
      */
-    class FutureResponse : public concurrent::Synchronizable{
+    class FutureResponse : public decaf::util::concurrent::Synchronizable{
     private:
 
         Response* response;
-        concurrent::Mutex mutex;
+        decaf::util::concurrent::Mutex mutex;
 
     public:
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransport.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransport.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransport.cpp Thu Nov  8 13:02:02 2007
@@ -22,7 +22,7 @@
 using namespace activemq::transport;
 using namespace activemq::transport::filters;
 
-LOGCMS_INITIALIZE( logger, LoggingTransport, "activemq.transport.filters.LoggingTransport")
+LOGDECAF_INITIALIZE( logger, LoggingTransport, "activemq.transport.filters.LoggingTransport")
 
 ////////////////////////////////////////////////////////////////////////////////
 LoggingTransport::LoggingTransport( Transport* next, bool own )
@@ -37,7 +37,7 @@
     ostream << command->toString() << endl;
     ostream << "*** END RECEIVED ASYNCHRONOUS COMMAND ***";
 
-    LOGCMS_INFO( logger, ostream.str() );
+    LOGDECAF_INFO( logger, ostream.str() );
 
     // Delegate to the base class.
     TransportFilter::onCommand( command );
@@ -45,7 +45,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void LoggingTransport::oneway( Command* command )
-    throw(CommandIOException, exceptions::UnsupportedOperationException) {
+    throw(CommandIOException, decaf::lang::exceptions::UnsupportedOperationException) {
 
     try {
 
@@ -54,19 +54,19 @@
         ostream << command->toString() << endl;
         ostream << "*** END SENDING ONEWAY COMMAND ***";
 
-        LOGCMS_INFO( logger, ostream.str() );
+        LOGDECAF_INFO( logger, ostream.str() );
 
         // Delegate to the base class.
         TransportFilter::oneway( command );
     }
     AMQ_CATCH_RETHROW( CommandIOException )
-    AMQ_CATCH_RETHROW( exceptions::UnsupportedOperationException )
+    AMQ_CATCH_RETHROW( decaf::lang::exceptions::UnsupportedOperationException )
     AMQ_CATCHALL_THROW( CommandIOException )
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 Response* LoggingTransport::request( Command* command )
-    throw(CommandIOException, exceptions::UnsupportedOperationException) {
+    throw(CommandIOException, decaf::lang::exceptions::UnsupportedOperationException) {
 
     try {
 
@@ -79,14 +79,11 @@
         ostream << "*** RECEIVED RESPONSE COMMAND ***" << endl;
         ostream << ( response == NULL? "NULL" : response->toString() );
 
-        LOGCMS_INFO( logger, ostream.str() );
+        LOGDECAF_INFO( logger, ostream.str() );
 
         return response;
     }
     AMQ_CATCH_RETHROW( CommandIOException )
-    AMQ_CATCH_RETHROW( exceptions::UnsupportedOperationException )
+    AMQ_CATCH_RETHROW( decaf::lang::exceptions::UnsupportedOperationException )
     AMQ_CATCHALL_THROW( CommandIOException )
 }
-
-
-

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransport.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransport.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransport.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransport.h Thu Nov  8 13:02:02 2007
@@ -19,7 +19,7 @@
 #define ACTIVEMQ_TRANSPORT_FILTERS_LOGGINGTRANSPORT_H_
 
 #include <activemq/transport/TransportFilter.h>
-#include <activemq/logger/LoggerDefines.h>
+#include <decaf/util/logging/LoggerDefines.h>
 
 namespace activemq{
 namespace transport{
@@ -32,7 +32,7 @@
     {
     private:
 
-        LOGCMS_DECLARE( logger )
+        LOGDECAF_DECLARE( logger )
 
     public:
 
@@ -60,14 +60,16 @@
          * @throws UnsupportedOperationException if this method is not implemented
          * by this transport.
          */
-        virtual void oneway( Command* command ) throw(CommandIOException, exceptions::UnsupportedOperationException);
+        virtual void oneway( Command* command )
+            throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException);
 
         /**
          * Not supported by this class - throws an exception.
          * @param command the command that is sent as a request
          * @throws UnsupportedOperationException.
          */
-        virtual Response* request( Command* command ) throw(CommandIOException, exceptions::UnsupportedOperationException);
+        virtual Response* request( Command* command )
+            throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException);
 
     };
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransportFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransportFactory.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransportFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransportFactory.cpp Thu Nov  8 13:02:02 2007
@@ -37,7 +37,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 Transport* LoggingTransportFactory::createTransport(
-    const activemq::util::Properties& properties AMQCPP_UNUSED,
+    const decaf::util::Properties& properties AMQCPP_UNUSED,
     Transport* next,
     bool own ) throw ( ActiveMQException ) {
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransportFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransportFactory.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransportFactory.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/LoggingTransportFactory.h Thu Nov  8 13:02:02 2007
@@ -43,7 +43,7 @@
          * @throws ActiveMQException if an error occurs.
          */
         virtual Transport* createTransport(
-            const activemq::util::Properties& properties,
+            const decaf::util::Properties& properties,
             Transport* next,
             bool own ) throw ( exceptions::ActiveMQException );
 

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelator.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelator.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelator.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelator.cpp Thu Nov  8 13:02:02 2007
@@ -75,7 +75,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 void ResponseCorrelator::oneway( Command* command )
-    throw( CommandIOException, exceptions::UnsupportedOperationException ) {
+    throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException ) {
 
     try{
         command->setCommandId( getNextCommandId() );
@@ -88,7 +88,7 @@
 
         next->oneway( command );
     }
-    AMQ_CATCH_RETHROW( exceptions::UnsupportedOperationException )
+    AMQ_CATCH_RETHROW( decaf::lang::exceptions::UnsupportedOperationException )
     AMQ_CATCH_RETHROW( CommandIOException )
     AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, CommandIOException )
     AMQ_CATCHALL_THROW( CommandIOException )
@@ -96,7 +96,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 Response* ResponseCorrelator::request( Command* command )
-    throw( CommandIOException, exceptions::UnsupportedOperationException ) {
+    throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException ) {
 
     try{
         command->setCommandId( getNextCommandId() );
@@ -150,7 +150,7 @@
 
         return response;
     }
-    AMQ_CATCH_RETHROW( exceptions::UnsupportedOperationException )
+    AMQ_CATCH_RETHROW( decaf::lang::exceptions::UnsupportedOperationException )
     AMQ_CATCH_RETHROW( CommandIOException )
     AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, CommandIOException )
     AMQ_CATCHALL_THROW( CommandIOException )

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelator.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelator.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelator.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelator.h Thu Nov  8 13:02:02 2007
@@ -21,8 +21,8 @@
 #include <activemq/transport/TransportFilter.h>
 #include <activemq/transport/filters/FutureResponse.h>
 #include <activemq/transport/Command.h>
-#include <activemq/concurrent/Mutex.h>
-#include <activemq/concurrent/Concurrent.h>
+#include <decaf/util/concurrent/Mutex.h>
+#include <decaf/util/concurrent/Concurrent.h>
 #include <map>
 #include <stdio.h>
 
@@ -58,12 +58,12 @@
         /**
          * Sync object for accessing the next command id variable.
          */
-        concurrent::Mutex commandIdMutex;
+        decaf::util::concurrent::Mutex commandIdMutex;
 
         /**
          * Sync object for accessing the request map.
          */
-        concurrent::Mutex mapMutex;
+        decaf::util::concurrent::Mutex mapMutex;
 
         /**
          * Flag to indicate the closed state.
@@ -110,7 +110,7 @@
          * by this transport.
          */
         virtual void oneway( Command* command )
-            throw( CommandIOException, exceptions::UnsupportedOperationException );
+            throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException );
 
         /**
          * Sends the given request to the server and waits for the response.
@@ -119,7 +119,7 @@
          * @throws CommandIOException if an error occurs with the request.
          */
         virtual Response* request( Command* command )
-            throw( CommandIOException, exceptions::UnsupportedOperationException );
+            throw( CommandIOException, decaf::lang::exceptions::UnsupportedOperationException );
 
         /**
          * This is called in the context of the nested transport's

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.cpp?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.cpp (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.cpp Thu Nov  8 13:02:02 2007
@@ -18,13 +18,14 @@
 #include "ResponseCorrelatorFactory.h"
 
 #include <activemq/transport/filters/ResponseCorrelator.h>
-#include <activemq/util/Long.h>
+#include <decaf/lang/Long.h>
 
 using namespace activemq;
 using namespace activemq::transport;
 using namespace activemq::transport::filters;
 using namespace activemq::exceptions;
-using namespace activemq::util;
+using namespace decaf::util;
+using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
 TransportFactory& ResponseCorrelatorFactory::getInstance(void)
@@ -39,7 +40,7 @@
 
 ////////////////////////////////////////////////////////////////////////////////
 Transport* ResponseCorrelatorFactory::createTransport(
-    const activemq::util::Properties& properties AMQCPP_UNUSED,
+    const decaf::util::Properties& properties AMQCPP_UNUSED,
     Transport* next,
     bool own ) throw ( ActiveMQException ) {
 
@@ -48,8 +49,8 @@
         ResponseCorrelator* transport = new ResponseCorrelator( next, own );
 
         transport->setMaxResponseWaitTime(
-            (unsigned long)Long::parseLong( 
-                properties.getProperty( 
+            (unsigned long)Long::parseLong(
+                properties.getProperty(
                     "transport.ResponseCorrelator.maxResponseWaitTime", "3000" ) ) );
 
         return transport;

Modified: activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.h?rev=593309&r1=593308&r2=593309&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.h (original)
+++ activemq/activemq-cpp/trunk/src/main/activemq/transport/filters/ResponseCorrelatorFactory.h Thu Nov  8 13:02:02 2007
@@ -43,7 +43,7 @@
          * @throws ActiveMQException if an error occurs.
          */
         virtual Transport* createTransport(
-            const activemq::util::Properties& properties,
+            const decaf::util::Properties& properties,
             Transport* next,
             bool own ) throw ( exceptions::ActiveMQException );
 



Mime
View raw message