activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1198962 - in /activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src: main/activemq/core/ test-integration/ test-integration/activemq/test/openwire/
Date Mon, 07 Nov 2011 21:55:02 GMT
Author: tabish
Date: Mon Nov  7 21:55:01 2011
New Revision: 1198962

URL: http://svn.apache.org/viewvc?rev=1198962&view=rev
Log:
Backport of https://issues.apache.org/jira/browse/AMQCPP-383

Added:
    activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
  (with props)
    activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.h
  (with props)
Modified:
    activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp
    activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/Makefile.am
    activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/TestRegistry.cpp

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp?rev=1198962&r1=1198961&r2=1198962&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/main/activemq/core/ActiveMQSession.cpp
Mon Nov  7 21:55:01 2011
@@ -412,9 +412,20 @@ void ActiveMQSession::recover() {
 
     try{
 
-        throw UnsupportedOperationException(
-            __FILE__, __LINE__,
-            "Recover Method is not yet supported." );
+        checkClosed();
+
+        if (isTransacted()) {
+            throw cms::IllegalStateException("This session is transacted");
+        }
+
+        synchronized( &this->consumers ) {
+            std::vector< ActiveMQConsumer* > consumers = this->consumers.values();
+
+            std::vector< ActiveMQConsumer* >::iterator iter = consumers.begin();
+            for( ; iter != consumers.end(); ++iter ) {
+                (*iter)->rollback();
+            }
+        }
     }
     AMQ_CATCH_ALL_THROW_CMSEXCEPTION()
 }

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/Makefile.am?rev=1198962&r1=1198961&r2=1198962&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/Makefile.am
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/Makefile.am
Mon Nov  7 21:55:01 2011
@@ -39,6 +39,7 @@ cc_sources = \
     activemq/test/openwire/OpenwireExpirationTest.cpp \
     activemq/test/openwire/OpenwireIndividualAckTest.cpp \
     activemq/test/openwire/OpenwireJmsMessageGroupsTest.cpp \
+    activemq/test/openwire/OpenwireJmsRecoverTest.cpp \
     activemq/test/openwire/OpenwireMapMessageTest.cpp \
     activemq/test/openwire/OpenwireMessageCompressionTest.cpp \
     activemq/test/openwire/OpenwireMessagePriorityTest.cpp \
@@ -90,6 +91,7 @@ h_sources = \
     activemq/test/openwire/OpenwireExpirationTest.h \
     activemq/test/openwire/OpenwireIndividualAckTest.h \
     activemq/test/openwire/OpenwireJmsMessageGroupsTest.h \
+    activemq/test/openwire/OpenwireJmsRecoverTest.h \
     activemq/test/openwire/OpenwireMapMessageTest.h \
     activemq/test/openwire/OpenwireMessageCompressionTest.h \
     activemq/test/openwire/OpenwireMessagePriorityTest.h \

Modified: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/TestRegistry.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/TestRegistry.cpp?rev=1198962&r1=1198961&r2=1198962&view=diff
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/TestRegistry.cpp
(original)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/TestRegistry.cpp
Mon Nov  7 21:55:01 2011
@@ -22,6 +22,8 @@
 #include "activemq/test/openwire/OpenwireDurableTest.h"
 #include "activemq/test/openwire/OpenwireExpirationTest.h"
 #include "activemq/test/openwire/OpenwireIndividualAckTest.h"
+#include "activemq/test/openwire/OpenwireJmsMessageGroupsTest.h"
+#include "activemq/test/openwire/OpenwireJmsRecoverTest.h"
 #include "activemq/test/openwire/OpenwireMessageCompressionTest.h"
 #include "activemq/test/openwire/OpenwireMessagePriorityTest.h"
 #include "activemq/test/openwire/OpenwireMapMessageTest.h"
@@ -31,7 +33,6 @@
 #include "activemq/test/openwire/OpenwireTransactionTest.h"
 #include "activemq/test/openwire/OpenwireTempDestinationTest.h"
 #include "activemq/test/openwire/OpenwireSlowListenerTest.h"
-#include "activemq/test/openwire/OpenwireJmsMessageGroupsTest.h"
 #include "activemq/test/openwire/OpenwireVirtualTopicTest.h"
 #include "activemq/test/openwire/OpenwireXATransactionsTest.h"
 
@@ -53,6 +54,8 @@ CPPUNIT_TEST_SUITE_REGISTRATION( activem
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireDurableTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireExpirationTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireIndividualAckTest );
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireJmsMessageGroupsTest );
+CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireJmsRecoverTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireMessageCompressionTest
);
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireMessagePriorityTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireMapMessageTest );
@@ -62,7 +65,6 @@ CPPUNIT_TEST_SUITE_REGISTRATION( activem
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireTransactionTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireSlowListenerTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireTempDestinationTest );
-CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireJmsMessageGroupsTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireVirtualTopicTest );
 CPPUNIT_TEST_SUITE_REGISTRATION( activemq::test::openwire::OpenwireXATransactionsTest );
 

Added: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp?rev=1198962&view=auto
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
(added)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
Mon Nov  7 21:55:01 2011
@@ -0,0 +1,304 @@
+/*
+ * 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 "OpenwireJmsRecoverTest.h"
+
+#include <activemq/core/ActiveMQConnectionFactory.h>
+#include <activemq/core/ActiveMQConnection.h>
+#include <activemq/core/ActiveMQSession.h>
+#include <activemq/commands/ActiveMQTopic.h>
+#include <activemq/commands/ActiveMQQueue.h>
+#include <activemq/exceptions/ActiveMQException.h>
+
+#include <decaf/lang/Thread.h>
+#include <decaf/lang/Long.h>
+#include <decaf/util/UUID.h>
+#include <decaf/util/concurrent/TimeUnit.h>
+#include <decaf/util/concurrent/CountDownLatch.h>
+
+#include <cms/ConnectionFactory.h>
+#include <cms/Connection.h>
+#include <cms/Session.h>
+#include <cms/MessageConsumer.h>
+#include <cms/MessageProducer.h>
+#include <cms/MessageListener.h>
+#include <cms/Message.h>
+#include <cms/TextMessage.h>
+
+#include <memory>
+
+using namespace cms;
+using namespace std;
+using namespace decaf;
+using namespace decaf::lang;
+using namespace decaf::util;
+using namespace decaf::util::concurrent;
+using namespace activemq;
+using namespace activemq::core;
+using namespace activemq::commands;
+using namespace activemq::exceptions;
+using namespace activemq::test;
+using namespace activemq::test::openwire;
+
+////////////////////////////////////////////////////////////////////////////////
+OpenwireJmsRecoverTest::OpenwireJmsRecoverTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+OpenwireJmsRecoverTest::~OpenwireJmsRecoverTest() {
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void OpenwireJmsRecoverTest::setUp() {
+
+    factory = ConnectionFactory::createCMSConnectionFactory(getBrokerURL());
+    CPPUNIT_ASSERT(factory != NULL);
+    connection = factory->createConnection();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void OpenwireJmsRecoverTest::tearDown() {
+    delete factory;
+    delete connection;
+    delete destination;
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void OpenwireJmsRecoverTest::testQueueSynchRecover() {
+    destination = new ActiveMQQueue(string("Queue-") + Long::toString(System::currentTimeMillis()));
+    doTestSynchRecover();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void OpenwireJmsRecoverTest::testQueueAsynchRecover() {
+    destination = new ActiveMQQueue(string("Queue-") + Long::toString(System::currentTimeMillis()));
+    doTestAsynchRecover();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void OpenwireJmsRecoverTest::testTopicSynchRecover() {
+    destination = new ActiveMQTopic(string("Topic-") + Long::toString(System::currentTimeMillis()));
+    doTestSynchRecover();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void OpenwireJmsRecoverTest::testTopicAsynchRecover() {
+    destination = new ActiveMQTopic(string("Topic-") + Long::toString(System::currentTimeMillis()));
+    doTestAsynchRecover();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void OpenwireJmsRecoverTest::testQueueAsynchRecoverWithAutoAck() {
+    destination = new ActiveMQQueue(string("Queue-") + Long::toString(System::currentTimeMillis()));
+    doTestAsynchRecoverWithAutoAck();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void OpenwireJmsRecoverTest::testTopicAsynchRecoverWithAutoAck() {
+    destination = new ActiveMQTopic(string("Topic-") + Long::toString(System::currentTimeMillis()));
+    doTestAsynchRecoverWithAutoAck();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void OpenwireJmsRecoverTest::doTestSynchRecover() {
+
+    std::auto_ptr<Session> session(connection->createSession(cms::Session::CLIENT_ACKNOWLEDGE));
+    std::auto_ptr<MessageConsumer> consumer(session->createConsumer(destination));
+    connection->start();
+
+    std::auto_ptr<MessageProducer> producer(session->createProducer(destination));
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
+    producer->send(session->createTextMessage("First"));
+    producer->send(session->createTextMessage("Second"));
+
+    std::auto_ptr<TextMessage> message(dynamic_cast<TextMessage*>(consumer->receive(2000)));
+    CPPUNIT_ASSERT_EQUAL(string("First"), message->getText());
+    CPPUNIT_ASSERT(!message->getCMSRedelivered());
+    message->acknowledge();
+
+    message.reset(dynamic_cast<TextMessage*>(consumer->receive(2000)));
+    CPPUNIT_ASSERT_EQUAL(string("Second"), message->getText());
+    CPPUNIT_ASSERT(!message->getCMSRedelivered());
+
+    session->recover();
+
+    message.reset(dynamic_cast<TextMessage*>(consumer->receive(2000)));
+    CPPUNIT_ASSERT_EQUAL(string("Second"), message->getText());
+    CPPUNIT_ASSERT(message->getCMSRedelivered());
+
+    message->acknowledge();
+}
+
+////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    class ClientAckMessageListener : public cms::MessageListener {
+    private:
+
+        cms::Session* session;
+        std::vector<string>* errorMessages;
+        CountDownLatch* doneCountDownLatch;
+        int counter;
+
+    public:
+
+        ClientAckMessageListener(cms::Session* session, std::vector<string>* errorMessages,
CountDownLatch* doneCountDownLatch)
+            : session(session), errorMessages(errorMessages), doneCountDownLatch(doneCountDownLatch),
counter(0) {
+        }
+
+        virtual ~ClientAckMessageListener() throw() {
+        }
+
+        virtual void onMessage(const cms::Message* msg) throw() {
+            counter++;
+            try {
+                const TextMessage* message = dynamic_cast<const TextMessage*>(msg);
+                switch (counter) {
+                case 1:
+                    CPPUNIT_ASSERT_EQUAL(string("First"), message->getText());
+                    CPPUNIT_ASSERT(!message->getCMSRedelivered());
+                    message->acknowledge();
+                    break;
+                case 2:
+                    CPPUNIT_ASSERT_EQUAL(string("Second"), message->getText());
+                    CPPUNIT_ASSERT(!message->getCMSRedelivered());
+                    session->recover();
+                    break;
+                case 3:
+                    CPPUNIT_ASSERT_EQUAL(string("Second"), message->getText());
+                    CPPUNIT_ASSERT(message->getCMSRedelivered());
+                    message->acknowledge();
+                    doneCountDownLatch->countDown();
+                    break;
+                default:
+                    errorMessages->push_back(string("Got too many messages: ") + Long::toString(counter));
+                    doneCountDownLatch->countDown();
+                }
+            } catch (Exception& e) {
+                errorMessages->push_back(string("Got exception: ") + e.getMessage());
+                doneCountDownLatch->countDown();
+            }
+        }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void OpenwireJmsRecoverTest::doTestAsynchRecover() {
+
+    std::auto_ptr<Session> session(connection->createSession(cms::Session::CLIENT_ACKNOWLEDGE));
+    std::vector<string> errorMessages;
+    CountDownLatch doneCountDownLatch(1);
+
+    std::auto_ptr<MessageConsumer> consumer(session->createConsumer(destination));
+
+    std::auto_ptr<MessageProducer> producer(session->createProducer(destination));
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
+    producer->send(session->createTextMessage("First"));
+    producer->send(session->createTextMessage("Second"));
+
+    ClientAckMessageListener listener(session.get(), &errorMessages, &doneCountDownLatch);
+    consumer->setMessageListener(&listener);
+
+    connection->start();
+
+    if (doneCountDownLatch.await(5, TimeUnit::SECONDS)) {
+        if (!errorMessages.empty()) {
+            CPPUNIT_FAIL(errorMessages.front());
+        }
+    } else {
+        CPPUNIT_FAIL("Timeout waiting for async message delivery to complete.");
+    }
+}
+
+////////////////////////////////////////////////////////////////////////////////
+namespace {
+
+    class AutoAckMessageListener : public cms::MessageListener {
+    private:
+
+        cms::Session* session;
+        std::vector<string>* errorMessages;
+        CountDownLatch* doneCountDownLatch;
+        int counter;
+
+    public:
+
+        AutoAckMessageListener(cms::Session* session, std::vector<string>* errorMessages,
CountDownLatch* doneCountDownLatch)
+            : session(session), errorMessages(errorMessages), doneCountDownLatch(doneCountDownLatch),
counter(0) {
+        }
+
+        virtual ~AutoAckMessageListener() throw() {
+        }
+
+        virtual void onMessage(const cms::Message* msg) throw() {
+            counter++;
+            try {
+                const TextMessage* message = dynamic_cast<const TextMessage*>(msg);
+                switch (counter) {
+                case 1:
+                    CPPUNIT_ASSERT_EQUAL(string("First"), message->getText());
+                    CPPUNIT_ASSERT(!message->getCMSRedelivered());
+                    break;
+                case 2:
+                    CPPUNIT_ASSERT_EQUAL(string("Second"), message->getText());
+                    CPPUNIT_ASSERT(!message->getCMSRedelivered());
+                    session->recover();
+                    break;
+                case 3:
+                    CPPUNIT_ASSERT_EQUAL(string("Second"), message->getText());
+                    CPPUNIT_ASSERT(message->getCMSRedelivered());
+                    doneCountDownLatch->countDown();
+                    break;
+                default:
+                    errorMessages->push_back(string("Got too many messages: ") + Long::toString(counter));
+                    doneCountDownLatch->countDown();
+                }
+            } catch (Exception& e) {
+                errorMessages->push_back(string("Got exception: ") + e.getMessage());
+                doneCountDownLatch->countDown();
+            }
+        }
+    };
+}
+
+////////////////////////////////////////////////////////////////////////////////
+void OpenwireJmsRecoverTest::doTestAsynchRecoverWithAutoAck() {
+
+    std::auto_ptr<Session> session(connection->createSession(cms::Session::AUTO_ACKNOWLEDGE));
+    std::vector<string> errorMessages;
+    CountDownLatch doneCountDownLatch(1);
+
+    std::auto_ptr<MessageConsumer> consumer(session->createConsumer(destination));
+
+    std::auto_ptr<MessageProducer> producer(session->createProducer(destination));
+    producer->setDeliveryMode(DeliveryMode::NON_PERSISTENT);
+    producer->send(session->createTextMessage("First"));
+    producer->send(session->createTextMessage("Second"));
+
+    AutoAckMessageListener listener(session.get(), &errorMessages, &doneCountDownLatch);
+    consumer->setMessageListener(&listener);
+
+    connection->start();
+
+    if (doneCountDownLatch.await(5, TimeUnit::SECONDS)) {
+        if (!errorMessages.empty()) {
+            CPPUNIT_FAIL(errorMessages.front());
+        }
+    } else {
+        CPPUNIT_FAIL("Timeout waiting for async message delivery to complete.");
+    }
+}

Propchange: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Added: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.h?rev=1198962&view=auto
==============================================================================
--- activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.h
(added)
+++ activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.h
Mon Nov  7 21:55:01 2011
@@ -0,0 +1,79 @@
+/*
+ * 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 _ACTIVEMQ_TEST_OPENWIRE_OPENWIREJMSRECOVERTEST_H_
+#define _ACTIVEMQ_TEST_OPENWIRE_OPENWIREJMSRECOVERTEST_H_
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <cms/ConnectionFactory.h>
+#include <cms/Connection.h>
+#include <cms/Destination.h>
+
+#include <activemq/util/IntegrationCommon.h>
+
+namespace activemq {
+namespace test {
+namespace openwire {
+
+    class OpenwireJmsRecoverTest : public CppUnit::TestFixture {
+    private:
+
+        CPPUNIT_TEST_SUITE( OpenwireJmsRecoverTest );
+        CPPUNIT_TEST( testQueueSynchRecover );
+        CPPUNIT_TEST( testQueueAsynchRecover );
+        CPPUNIT_TEST( testTopicSynchRecover );
+        CPPUNIT_TEST( testTopicAsynchRecover );
+        CPPUNIT_TEST( testQueueAsynchRecoverWithAutoAck );
+        CPPUNIT_TEST( testTopicAsynchRecoverWithAutoAck );
+        CPPUNIT_TEST_SUITE_END();
+
+        cms::ConnectionFactory* factory;
+        cms::Connection* connection;
+        cms::Destination* destination;
+
+    public:
+
+        OpenwireJmsRecoverTest();
+        virtual ~OpenwireJmsRecoverTest();
+
+        virtual std::string getBrokerURL() const {
+            return activemq::util::IntegrationCommon::getInstance().getOpenwireURL();
+        }
+
+        virtual void setUp();
+        virtual void tearDown();
+
+        void testQueueSynchRecover();
+        void testQueueAsynchRecover();
+        void testTopicSynchRecover();
+        void testTopicAsynchRecover();
+        void testQueueAsynchRecoverWithAutoAck();
+        void testTopicAsynchRecoverWithAutoAck();
+
+    private:
+
+        void doTestSynchRecover();
+        void doTestAsynchRecover();
+        void doTestAsynchRecoverWithAutoAck();
+
+    };
+
+}}}
+
+#endif /* _ACTIVEMQ_TEST_OPENWIRE_OPENWIREJMSRECOVERTEST_H_ */

Propchange: activemq/activemq-cpp/branches/activemq-cpp-3.4.x/activemq-cpp/src/test-integration/activemq/test/openwire/OpenwireJmsRecoverTest.h
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message