activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nmitt...@apache.org
Subject svn commit: r593958 - in /activemq/activemq-cpp/decaf/trunk/src: main/ main/decaf/internal/ main/decaf/lang/ main/decaf/net/ main/decaf/util/ test/
Date Sun, 11 Nov 2007 21:24:56 GMT
Author: nmittler
Date: Sun Nov 11 13:24:55 2007
New Revision: 593958

URL: http://svn.apache.org/viewvc?rev=593958&view=rev
Log:
fixed problem with linking to decaf on os x.  APR methods were getting invoked by static objects
before the APR runtime was initialized.

Added:
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprRuntime.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprRuntime.h
Removed:
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/util/Config.cpp
Modified:
    activemq/activemq-cpp/decaf/trunk/src/main/Makefile.am
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprPool.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprPool.h
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Exception.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.h
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/ServerSocket.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/ServerSocket.h
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/SocketError.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.cpp
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.h
    activemq/activemq-cpp/decaf/trunk/src/main/decaf/util/Config.h
    activemq/activemq-cpp/decaf/trunk/src/test/Makefile.am

Modified: activemq/activemq-cpp/decaf/trunk/src/main/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/Makefile.am?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/Makefile.am (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/Makefile.am Sun Nov 11 13:24:55 2007
@@ -16,6 +16,13 @@
 # ---------------------------------------------------------------------------
 
 cc_sources = \
+   decaf/internal/AprRuntime.cpp \
+   decaf/internal/AprPool.cpp \
+   decaf/internal/util/BigInt.cpp \
+   decaf/internal/util/BitOps.cpp \
+   decaf/internal/util/NumberConverter.cpp \
+   decaf/internal/util/FloatingPointParser.cpp \
+   decaf/internal/util/HexStringParser.cpp \
    decaf/net/ServerSocket.cpp \
    decaf/net/SocketOutputStream.cpp \
    decaf/net/BufferedSocket.cpp \
@@ -58,14 +65,7 @@
    decaf/util/logging/Logger.cpp \
    decaf/util/logging/LogWriter.cpp \
    decaf/util/logging/SimpleLogger.cpp \
-   decaf/util/logging/LogManager.cpp \
-   decaf/util/Config.cpp \
-   decaf/internal/AprPool.cpp \
-   decaf/internal/util/BigInt.cpp \
-   decaf/internal/util/BitOps.cpp \
-   decaf/internal/util/NumberConverter.cpp \
-   decaf/internal/util/FloatingPointParser.cpp \
-   decaf/internal/util/HexStringParser.cpp
+   decaf/util/logging/LogManager.cpp
 
 h_sources = \
    decaf/net/BindException.h \
@@ -173,6 +173,7 @@
    decaf/util/logging/SimpleLogger.h \
    decaf/util/logging/PropertiesChangeListener.h \
    decaf/internal/AprPool.h \
+   decaf/internal/AprRuntime.h \
    decaf/internal/util/NumberConverter.h \
    decaf/internal/util/FloatingPointParser.h \
    decaf/internal/util/HexStringParser.h \

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprPool.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprPool.cpp?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprPool.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprPool.cpp Sun Nov 11 13:24:55
2007
@@ -20,17 +20,43 @@
 using namespace decaf;
 using namespace decaf::internal;
 
+// Initialize the static AprRuntime object.
+AprRuntime AprPool::aprRuntime;
+
 ////////////////////////////////////////////////////////////////////////////////
 AprPool::AprPool() {
-    apr_pool_create( &aprPool, NULL );
+    aprPool = NULL;    
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 AprPool::~AprPool() {
-    apr_pool_destroy( aprPool );
+    
+    // Destroy the pool if it was allocated.
+    destroyPool();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void AprPool::allocatePool() const {
+    
+    if( aprPool == NULL ) {
+        apr_pool_create( &aprPool, NULL );
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void AprPool::destroyPool() {
+    
+    if( aprPool != NULL ) {
+        apr_pool_destroy( aprPool );
+    }
+    
+    aprPool = NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 void AprPool::cleanup() {
-    apr_pool_clear( aprPool );
+    
+    if( aprPool != NULL ) {
+        apr_pool_clear( aprPool );
+    }
 }

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprPool.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprPool.h?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprPool.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprPool.h Sun Nov 11 13:24:55
2007
@@ -19,6 +19,8 @@
 #define _DECAF_INTERNAL_APRPOOL_H_
 
 #include <decaf/util/Config.h>
+#include <decaf/internal/AprRuntime.h>
+
 #include <apr_pools.h>
 
 namespace decaf{
@@ -32,8 +34,16 @@
     class AprPool {
     private:
 
-        apr_pool_t* aprPool;
-
+        /**
+         * Internal APR pool
+         */
+        mutable apr_pool_t* aprPool;
+        
+        /**
+         * Manages the initialization of APR.
+         */
+        static AprRuntime aprRuntime;
+        
     public:
 
         AprPool();
@@ -44,6 +54,10 @@
          * @returns the internal APR pool
          */
         apr_pool_t* getAprPool() const {
+            
+            // Ensure that the pool has been allocated.
+            allocatePool();
+            
             return aprPool;
         }
 
@@ -54,6 +68,17 @@
          */
         void cleanup();
 
+    private:
+        
+        /**
+         * Allocates the pool if it isn't already allocated.
+         */
+        void allocatePool() const;
+        
+        /**
+         * Destroys the pool if it has been allocated.
+         */
+        void destroyPool();
     };
 
 }}

Added: activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprRuntime.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprRuntime.cpp?rev=593958&view=auto
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprRuntime.cpp (added)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprRuntime.cpp Sun Nov 11 13:24:55
2007
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "AprRuntime.h"
+
+#include <apr.h>
+#include <apr_general.h>
+#include <apr_pools.h>
+
+using namespace decaf::internal;
+
+////////////////////////////////////////////////////////////////////////////////
+AprRuntime::AprRuntime() {
+            
+    // Initializes the APR Runtime from within a library.
+    apr_initialize();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+AprRuntime::~AprRuntime() {
+    
+    // Cleans up APR data structures.
+    apr_terminate();
+} 
+

Added: activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprRuntime.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprRuntime.h?rev=593958&view=auto
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprRuntime.h (added)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/internal/AprRuntime.h Sun Nov 11 13:24:55
2007
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _DECAF_INTERNAL_APRRUNTIME_H
+#define _DECAF_INTERNAL_APRRUNTIME_H
+
+namespace decaf {
+namespace internal {
+
+    /**
+     * Handles APR initialization and termination.
+     */
+    class AprRuntime {
+    public:
+    
+        /**
+         * Initializes the APR Runtime for a library.
+         */
+        AprRuntime();
+    
+        /**
+         * Terminates the APR Runtime for a library.
+         */
+        virtual ~AprRuntime();
+    
+    };
+    
+}}
+
+#endif /*_DECAF_INTERNAL_APRRUNTIME_H*/

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Exception.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Exception.cpp?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Exception.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Exception.cpp Sun Nov 11 13:24:55
2007
@@ -17,13 +17,14 @@
 #include <stdio.h>
 #include "Exception.h"
 #include <decaf/util/logging/LoggerDefines.h>
-#include <sstream>
+#include <decaf/internal/AprPool.h>
 
-#include <apr_pools.h>
+#include <sstream>
 #include <apr_strings.h>
 
 using namespace std;
 using namespace decaf;
+using namespace decaf::internal;
 using namespace decaf::lang;
 using namespace decaf::util::logging;
 
@@ -62,21 +63,13 @@
 void Exception::buildMessage( const char* format, va_list& vargs ) {
 
     // Allocate buffer with a guess of it's size
-    apr_pool_t* pool = NULL;
-    apr_pool_create( &pool, NULL );
+    AprPool pool;
 
     // Allocate a buffer of the specified size.
-    char* buffer = apr_pvsprintf( pool, format, vargs );
+    char* buffer = apr_pvsprintf( pool.getAprPool(), format, vargs );
 
     // Guessed size was enough. Assign the string.
     message.assign( buffer, strlen( buffer ) );
-
-    // assign isn't passing ownership, just copying, delete
-    // the allocated buffer.
-    apr_pool_destroy( pool );
-
-    //decaf::util::logger::SimpleLogger logger("com.yadda1");
-    //logger.log( message );
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.cpp?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.cpp Sun Nov 11 13:24:55 2007
@@ -24,6 +24,7 @@
 #include <decaf/lang/exceptions/RuntimeException.h>
 
 using namespace decaf;
+using namespace decaf::internal;
 using namespace decaf::lang;
 using namespace decaf::lang::exceptions;
 
@@ -32,7 +33,6 @@
     this->task = this;
     this->started = false;
     this->joined = false;
-    this->pool = NULL;
     this->threadHandle = NULL;
 }
 
@@ -41,15 +41,11 @@
     this->task = task;
     this->started = false;
     this->joined = false;
-    this->pool = NULL;
     this->threadHandle = NULL;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 Thread::~Thread(){
-    if( pool != NULL ) {
-        apr_pool_destroy( pool );
-    }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -61,13 +57,12 @@
             "Thread::start - Thread already started");
     }
 
-    apr_pool_create( &pool, NULL );
     apr_status_t err = apr_thread_create(
         &this->threadHandle,
         NULL,
         runCallback,
         this,
-        pool );
+        pool.getAprPool() );
 
     if( err != APR_SUCCESS ) {
         throw Exception(

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.h?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/lang/Thread.h Sun Nov 11 13:24:55 2007
@@ -23,7 +23,7 @@
 #include <stdexcept>
 #include <assert.h>
 
-#include <apr_pools.h>
+#include <decaf/internal/AprPool.h>
 #include <apr_thread_proc.h>
 
 namespace decaf{
@@ -47,7 +47,7 @@
         /**
          * APR Pool to allocate thread from
          */
-        apr_pool_t* pool;
+        decaf::internal::AprPool pool;
 
         /**
          * APR Thread Handle

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/ServerSocket.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/ServerSocket.cpp?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/ServerSocket.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/ServerSocket.cpp Sun Nov 11 13:24:55
2007
@@ -32,17 +32,12 @@
 ////////////////////////////////////////////////////////////////////////////////
 ServerSocket::ServerSocket() {
     socketHandle = (apr_socket_t*)Socket::INVALID_SOCKET_HANDLE;
-    apr_pool_create( &apr_pool, NULL );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 ServerSocket::~ServerSocket() {
     // No shutdown, just close - dont want blocking destructor.
     close();
-
-    // Free up the APR pool, this will release any remaining data we
-    // allocated but have deallocated.
-    apr_pool_destroy( apr_pool );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -71,7 +66,7 @@
 
     // Create the Address Info for the Socket
     result = apr_sockaddr_info_get(
-        &socketAddress, host, APR_INET, port, 0, apr_pool );
+        &socketAddress, host, APR_INET, port, 0, apr_pool.getAprPool() );
 
     if( result != APR_SUCCESS ) {
         socketHandle = (apr_socket_t*)Socket::INVALID_SOCKET_HANDLE;
@@ -82,7 +77,7 @@
 
     // Create the socket.
     result = apr_socket_create(
-        &socketHandle, APR_INET, SOCK_STREAM, APR_PROTO_TCP, apr_pool );
+        &socketHandle, APR_INET, SOCK_STREAM, APR_PROTO_TCP, apr_pool.getAprPool() );
 
     if( result != APR_SUCCESS ) {
         socketHandle = (apr_socket_t*)Socket::INVALID_SOCKET_HANDLE;
@@ -141,7 +136,7 @@
 
     // Loop to ignore any signal interruptions that occur during the operation.
     do {
-        result = apr_socket_accept( &incoming, socketHandle, apr_pool );
+        result = apr_socket_accept( &incoming, socketHandle, apr_pool.getAprPool() );
     } while( result == APR_EINTR );
 
     if( result != APR_SUCCESS ) {

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/ServerSocket.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/ServerSocket.h?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/ServerSocket.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/ServerSocket.h Sun Nov 11 13:24:55
2007
@@ -20,8 +20,8 @@
 #include <decaf/net/TcpSocket.h>
 #include <decaf/net/SocketException.h>
 #include <decaf/util/Config.h>
+#include <decaf/internal/AprPool.h>
 
-#include <apr_pools.h>
 #include <apr_network_io.h>
 
 namespace decaf{
@@ -41,7 +41,7 @@
 
         SocketHandle socketHandle;
         SocketAddress socketAddress;
-        apr_pool_t* apr_pool;
+        decaf::internal::AprPool apr_pool;
 
     public:
 

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/SocketError.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/SocketError.cpp?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/SocketError.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/SocketError.cpp Sun Nov 11 13:24:55
2007
@@ -18,6 +18,9 @@
 #include "SocketError.h"
 #include <decaf/util/Config.h>
 
+#include <apr.h>
+#include <apr_general.h>
+
 using namespace decaf;
 using namespace decaf::net;
 

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.cpp?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.cpp (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.cpp Sun Nov 11 13:24:55
2007
@@ -22,21 +22,23 @@
 #include "SocketError.h"
 
 using namespace decaf;
+using namespace decaf::internal;
 using namespace decaf::net;
 using namespace decaf::io;
 using namespace decaf::lang;
 
 ////////////////////////////////////////////////////////////////////////////////
 TcpSocket::TcpSocket() throw ( SocketException )
-  : apr_pool( NULL ),
+  : 
     socketHandle( INVALID_SOCKET_HANDLE ),
     inputStream( NULL ),
-    outputStream( NULL ) {
+    outputStream( NULL ) 
+{
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 TcpSocket::TcpSocket( SocketHandle socketHandle )
- :  apr_pool( NULL ),
+ :
     socketHandle( INVALID_SOCKET_HANDLE ),
     inputStream( NULL ),
     outputStream( NULL ) {
@@ -77,16 +79,13 @@
                 "Socket::connect - Socket already connected.  host: %s, port: %d", host,
port );
         }
 
-        // Create the APR Pool
-        apr_pool_create( &apr_pool, NULL );
-
         // Create the Address data
         checkResult( apr_sockaddr_info_get(
-            &socketAddress, host, APR_INET, port, 0, apr_pool ) );
+            &socketAddress, host, APR_INET, port, 0, apr_pool.getAprPool() ) );
 
         // Create the actual socket.
         checkResult( apr_socket_create(
-            &socketHandle, socketAddress->family, SOCK_STREAM, APR_PROTO_TCP, apr_pool
) );
+            &socketHandle, socketAddress->family, SOCK_STREAM, APR_PROTO_TCP, apr_pool.getAprPool()
) );
 
         // it is a good idea to specify socket options explicitly. in this
         // case, we make a blocking socket with system timeout, this should allow us
@@ -142,12 +141,7 @@
         apr_socket_close( socketHandle );
         socketHandle = INVALID_SOCKET_HANDLE;
     }
-
-    // Destroy the APR Pool
-    if( apr_pool != NULL ) {
-        apr_pool_destroy( apr_pool );
-        apr_pool = NULL;
-    }
+    
 }
 
 ////////////////////////////////////////////////////////////////////////////////

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.h?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/net/TcpSocket.h Sun Nov 11 13:24:55 2007
@@ -22,8 +22,7 @@
 #include <decaf/io/InputStream.h>
 #include <decaf/io/OutputStream.h>
 #include <decaf/util/Config.h>
-
-#include <apr_pools.h>
+#include <decaf/internal/AprPool.h>
 
 namespace decaf{
 namespace net{
@@ -41,7 +40,7 @@
         /**
          * APR Socket Pool to allocate from
          */
-        apr_pool_t* apr_pool;
+        decaf::internal::AprPool apr_pool;
 
         /**
          * The handle for this socket.

Modified: activemq/activemq-cpp/decaf/trunk/src/main/decaf/util/Config.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/main/decaf/util/Config.h?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/main/decaf/util/Config.h (original)
+++ activemq/activemq-cpp/decaf/trunk/src/main/decaf/util/Config.h Sun Nov 11 13:24:55 2007
@@ -86,28 +86,4 @@
    #define DECAF_UNUSED
 #endif
 
-
-// Define a class to hanlde APR initialization and termination, then declare a global
-// static instance that will cause the library to only be initialized once.
-#include <apr.h>
-#include <apr_general.h>
-#include <apr_pools.h>
-
-class _APR_LIBRARY {
-public:
-
-    _APR_LIBRARY() {
-        apr_initialize();
-    }
-
-    ~_APR_LIBRARY() {
-        apr_terminate();
-    }
-
-private:
-
-    static _APR_LIBRARY self;
-
-};
-
 #endif /*_DECAF_UTIL_CONFIG_H_*/

Modified: activemq/activemq-cpp/decaf/trunk/src/test/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/decaf/trunk/src/test/Makefile.am?rev=593958&r1=593957&r2=593958&view=diff
==============================================================================
--- activemq/activemq-cpp/decaf/trunk/src/test/Makefile.am (original)
+++ activemq/activemq-cpp/decaf/trunk/src/test/Makefile.am Sun Nov 11 13:24:55 2007
@@ -94,7 +94,7 @@
 ## Compile this as part of make check
 check_PROGRAMS = decaf-test
 ## Also run the tests as part of make check
-## TESTS = $(check_PROGRAMS)
+TESTS = $(check_PROGRAMS)
 
 ## 
 ## Compiler/Linker Options



Mime
View raw message