You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by bh...@apache.org on 2011/12/22 18:48:40 UTC

svn commit: r1222371 - in /uima/uimacpp/trunk/src: deployCppService.vcproj utils/ActiveMQAnalysisEngineService.cpp utils/ActiveMQAnalysisEngineService.hpp

Author: bhavani
Date: Thu Dec 22 17:48:40 2011
New Revision: 1222371

URL: http://svn.apache.org/viewvc?rev=1222371&view=rev
Log:
UIMA-2312 Updated to ACTIVEMQ CPP library version 3.4.1

Modified:
    uima/uimacpp/trunk/src/deployCppService.vcproj
    uima/uimacpp/trunk/src/utils/ActiveMQAnalysisEngineService.cpp
    uima/uimacpp/trunk/src/utils/ActiveMQAnalysisEngineService.hpp

Modified: uima/uimacpp/trunk/src/deployCppService.vcproj
URL: http://svn.apache.org/viewvc/uima/uimacpp/trunk/src/deployCppService.vcproj?rev=1222371&r1=1222370&r2=1222371&view=diff
==============================================================================
--- uima/uimacpp/trunk/src/deployCppService.vcproj (original)
+++ uima/uimacpp/trunk/src/deployCppService.vcproj Thu Dec 22 17:48:40 2011
@@ -67,7 +67,7 @@
 				AdditionalDependencies="wsock32.lib rpcrt4.lib activemq-cppD.lib xerces-c_2.lib icuuc.lib libapr-1.lib uimaD.lib"
 				OutputFile="$(OutDir)/deployCppServiceD.exe"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(OutDir)\..\lib";"$(APR_HOME)\$(ConfigurationName)";"$(XERCES_HOME)\lib";"$(ICU_HOME)\lib";"$(UIMACPP_HOME)\lib";"$(ACTIVEMQ_HOME)\vs2005-build\DebugDLL""
+				AdditionalLibraryDirectories=""$(OutDir)\..\lib";"$(APR_HOME)\$(ConfigurationName)";"$(XERCES_HOME)\lib";"$(ICU_HOME)\lib";"$(UIMACPP_HOME)\lib";"$(ACTIVEMQ_HOME)\vs2008-build\win32\DebugDLL""
 				GenerateDebugInformation="true"
 				ProgramDatabaseFile="$(OutDir)/$(TargetName).pdb"
 				SubSystem="1"
@@ -148,7 +148,7 @@
 				AdditionalDependencies="wsock32.lib rpcrt4.lib activemq-cpp.lib xerces-c_2.lib icuuc.lib libapr-1.lib uima.lib"
 				OutputFile="$(OutDir)/deployCppService.exe"
 				LinkIncremental="1"
-				AdditionalLibraryDirectories=""$(OutDir)\..\lib";"$(APR_HOME)\$(ConfigurationName)";"$(XERCES_HOME)\lib";"$(ICU_HOME)\lib";"$(UIMACPP_HOME)\lib";"$(ACTIVEMQ_HOME)\vs2005-build\ReleaseDLL""
+				AdditionalLibraryDirectories=""$(OutDir)\..\lib";"$(APR_HOME)\$(ConfigurationName)";"$(XERCES_HOME)\lib";"$(ICU_HOME)\lib";"$(UIMACPP_HOME)\lib";"$(ACTIVEMQ_HOME)\vs2008-build\win32\ReleaseDLL""
 				GenerateDebugInformation="false"
 				ProgramDatabaseFile="$(OutDir)/$(TargetName).pdb"
 				SubSystem="1"

Modified: uima/uimacpp/trunk/src/utils/ActiveMQAnalysisEngineService.cpp
URL: http://svn.apache.org/viewvc/uima/uimacpp/trunk/src/utils/ActiveMQAnalysisEngineService.cpp?rev=1222371&r1=1222370&r2=1222371&view=diff
==============================================================================
--- uima/uimacpp/trunk/src/utils/ActiveMQAnalysisEngineService.cpp (original)
+++ uima/uimacpp/trunk/src/utils/ActiveMQAnalysisEngineService.cpp Thu Dec 22 17:48:40 2011
@@ -88,11 +88,12 @@ static void* APR_THREAD_FUNC handleMessa
  };
 
  AMQConnection::AMQConnection(  ConnectionFactory * connFact, 
-                                      Monitor * pMonitor, int id) :
+                                      string brokerURL, Monitor * pMonitor, int id) :
                                       iv_id(id),
                                       iv_pConnFact(connFact),
                                       //iv_pMonitor(0),
-                                      iv_brokerURL(((ActiveMQConnectionFactory*)connFact)->getBrokerURL()), 
+                                      //iv_brokerURL(((ActiveMQConnectionFactory*)connFact)->getBrokerURL()), 
+									  iv_brokerURL(brokerURL),
                                       iv_pConnection(0), 
                                       iv_pConsumerSession(0),
                                       iv_pConsumer(0),
@@ -615,7 +616,7 @@ static void* APR_THREAD_FUNC handleMessa
       if (ite == iv_connections.end()) {
         LOGINFO(FINE,"AMQConnectionsCache::getConnection() create new connection to " +
           brokerURL);
-        connection = new AMQConnection(iv_pConnFact, iv_pMonitor, iv_connections.size());
+        connection = new AMQConnection(iv_pConnFact, brokerURL, iv_pMonitor, iv_connections.size());
         if (connection == NULL) {
           LOGERROR("AMQConnectionCache::getConnection Could not create a endpoint connection to " +
             brokerURL);
@@ -633,7 +634,7 @@ static void* APR_THREAD_FUNC handleMessa
             LOGWARN("AMQConnectionCache::getEndPoint() Existing connection invalid. Reconnecting to " + brokerURL );
             delete connection;
             this->iv_connections.erase(brokerURL);
-            connection = new AMQConnection(iv_pConnFact, iv_pMonitor, iv_connections.size());
+            connection = new AMQConnection(iv_pConnFact, brokerURL, iv_pMonitor, iv_connections.size());
             if (connection == NULL) {
               LOGERROR("AMQConnectionCache::getConnection() could not connect to "
                 + brokerURL );
@@ -1285,7 +1286,7 @@ void AMQListener::receiveAndProcessMessa
       //create a AnalysisEngine and CAS for each instance
       for (int i=0; i < iv_numInstances; i++) {
         //create the connection
-        AMQConnection * newConnection = new AMQConnection(this->iv_pConnFact, this->iv_pMonitor, i);
+        AMQConnection * newConnection = new AMQConnection(this->iv_pConnFact, params.getBrokerURL(), this->iv_pMonitor, i);
         if (newConnection == NULL) {
           LOGERROR("AMQAnalysisEngineService::initialize() Could not create ActiveMQ endpoint connection.");
           ErrorMessage msg(UIMA_MSG_ID_LOG_ERROR);
@@ -1372,7 +1373,7 @@ void AMQListener::receiveAndProcessMessa
       //Fast GetMeta
       //create connection 
      LOGINFO(FINEST, "AMQAnalysisEngineService::initialize() Setup GETMETA instance.");
-     iv_pgetMetaConnection = new AMQConnection(this->iv_pConnFact, this->iv_pMonitor, iv_numInstances);
+     iv_pgetMetaConnection = new AMQConnection(this->iv_pConnFact, params.getBrokerURL(), this->iv_pMonitor, iv_numInstances);
 
      if (iv_pgetMetaConnection == NULL) {
           LOGERROR("AMQAnalysisEngineService::initialize() Could not create fast getmeta ActiveMQ endpoint connection.");

Modified: uima/uimacpp/trunk/src/utils/ActiveMQAnalysisEngineService.hpp
URL: http://svn.apache.org/viewvc/uima/uimacpp/trunk/src/utils/ActiveMQAnalysisEngineService.hpp?rev=1222371&r1=1222370&r2=1222371&view=diff
==============================================================================
--- uima/uimacpp/trunk/src/utils/ActiveMQAnalysisEngineService.hpp (original)
+++ uima/uimacpp/trunk/src/utils/ActiveMQAnalysisEngineService.hpp Thu Dec 22 17:48:40 2011
@@ -82,7 +82,7 @@ private:
 
   //consumer session
   Session* iv_pConsumerSession;
-	MessageConsumer * iv_pConsumer;
+  MessageConsumer * iv_pConsumer;
   string iv_inputQueueName;
   cms::Queue * iv_pInputQueue;      
   MessageListener * iv_pListener;
@@ -104,7 +104,7 @@ public:
   
 	/** Establish connection to the broker and create a Message Producer session. 
    */
-  AMQConnection ( ConnectionFactory * connFact, Monitor * pStatistics, int id);
+  AMQConnection ( ConnectionFactory * connFact, string brokerURL, Monitor * pStatistics, int id);
 
   /** Creates a MessageConsumer session and registers a listener. 
       Caller owns the listener. */