You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by cw...@apache.org on 2009/08/20 19:40:56 UTC
svn commit: r806270 -
/incubator/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java
Author: cwiklik
Date: Thu Aug 20 17:40:56 2009
New Revision: 806270
URL: http://svn.apache.org/viewvc?rev=806270&view=rev
Log:
UIMA-1480 Added check for version compatibility between UIMA-AS and UIMA Core
Modified:
incubator/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java
Modified: incubator/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java?rev=806270&r1=806269&r2=806270&view=diff
==============================================================================
--- incubator/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java (original)
+++ incubator/uima/uima-as/trunk/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java Thu Aug 20 17:40:56 2009
@@ -49,6 +49,8 @@
import org.apache.uima.UIMA_IllegalArgumentException;
import org.apache.uima.UIMA_IllegalStateException;
import org.apache.uima.aae.AsynchAECasManager_impl;
+import org.apache.uima.aae.UIMAEE_Constants;
+import org.apache.uima.aae.UimaAsVersion;
import org.apache.uima.aae.client.UimaASStatusCallbackListener;
import org.apache.uima.aae.client.UimaAsynchronousEngine;
import org.apache.uima.aae.controller.AnalysisEngineController;
@@ -58,6 +60,7 @@
import org.apache.uima.aae.controller.UimacppServiceController;
import org.apache.uima.aae.delegate.Delegate;
import org.apache.uima.aae.delegate.Delegate.DelegateEntry;
+import org.apache.uima.aae.error.AsynchAEException;
import org.apache.uima.aae.error.UimaASMetaRequestTimeout;
import org.apache.uima.aae.jmx.JmxManager;
import org.apache.uima.aae.message.AsynchAEMessage;
@@ -100,6 +103,8 @@
private String applicationName = "UimaASClient";
private static SharedConnection sharedConnection = null;
private Object stopMux = new Object();
+ private static final UimaAsVersion uimaAsVersion =
+ new UimaAsVersion();
public BaseUIMAAsynchronousEngine_impl() {
UIMAFramework.getLogger(CLASS_NAME).log(Level.INFO, "UIMA-AS version " + UIMAFramework.getVersionString());
@@ -419,6 +424,14 @@
*/
public synchronized void initialize(Map anApplicationContext) throws ResourceInitializationException
{
+ // Check UIMA AS version againg the UIMA Core version. If not the same throw Exception
+ if ( !uimaAsVersion.getVersionString().equals(UIMAFramework.getVersionString())) {
+ UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+ "BaseAnalysisEngineController", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_incompatible_version_WARNING",
+ new Object[] { "UIM AS Client", uimaAsVersion.getVersionString(), UIMAFramework.getVersionString() });
+ throw new ResourceInitializationException(new AsynchAEException("Version of UIMA-AS is Incompatible with a Version of UIMA Core. UIMA-AS Version:"+uimaAsVersion.getVersionString()+" Core UIMA Version:"+UIMAFramework.getVersionString()));
+ }
+
if ( running )
{
throw new ResourceInitializationException(new UIMA_IllegalStateException());