uima-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject svn commit: r707668 - in /incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima: aae/jms_adapter/ adapter/jms/activemq/ adapter/jms/client/ examples/as/
Date Fri, 24 Oct 2008 16:10:14 GMT
Author: eae
Date: Fri Oct 24 09:10:14 2008
New Revision: 707668

URL: http://svn.apache.org/viewvc?rev=707668&view=rev
Log:
UIMA-1211 commit Jerry's patches

Modified:
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/aae/jms_adapter/JmsAnalysisEngineServiceStub.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/BrokerDeployer.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsInputChannel.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/SpringContainerDeployer.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaDefaultMessageListenerContainer.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaEEAdminSpringContext.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaEeExceptionListener.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java
    incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/examples/as/RunRemoteAsyncAE.java

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/aae/jms_adapter/JmsAnalysisEngineServiceStub.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/aae/jms_adapter/JmsAnalysisEngineServiceStub.java?rev=707668&r1=707667&r2=707668&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/aae/jms_adapter/JmsAnalysisEngineServiceStub.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/aae/jms_adapter/JmsAnalysisEngineServiceStub.java Fri Oct 24 09:10:14 2008
@@ -146,7 +146,9 @@
 //      System.out.println("destroy methjdssdx");
       uimaEEEngine.stop();
     } catch (Exception e) {
-      UIMAFramework.getLogger().log(Level.WARNING, e.getMessage(), e);
+      if (UIMAFramework.getLogger().isLoggable(Level.WARNING)) {
+        UIMAFramework.getLogger().log(Level.WARNING, e.getMessage(), e);
+      }
     }
   }
 

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/BrokerDeployer.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/BrokerDeployer.java?rev=707668&r1=707667&r2=707668&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/BrokerDeployer.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/BrokerDeployer.java Fri Oct 24 09:10:14 2008
@@ -83,15 +83,12 @@
 		if (maxBrokerMemory > 0 )
 		{
 			System.out.println("Configuring Internal Broker With Max Memory Of:"+maxBrokerMemory);
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
                     "startInternalBroker", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_broker_memory__CONFIG",
                     new Object[] {maxBrokerMemory});
-//			service.getMemoryManager().setLimit(maxBrokerMemory);
+      }
 		}
-//		usageListener = new UimaEEBrokerMemoryUsageListener();
-
-//		service.getMemoryManager().addUsageListener( usageListener ); //new UimaEEBrokerMemoryUsageListener());
-		
 		String[] connectors = service.getNetworkConnectorURIs();
 		if ( connectors != null  )
 		{
@@ -137,9 +134,11 @@
 				System.setProperty("com.sun.management.jmxremote.port", String.valueOf(startPort)); 
 
 				System.out.println("JMX Console connect URI:  service:jmx:rmi:///jndi/rmi://localhost:"+startPort+"/jmxrmi");
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
 	                    "startInternalBroker", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_jmx_uri__CONFIG",
 	                    new Object[] {"service:jmx:rmi:///jndi/rmi://localhost:"+startPort+"/jmxrmi" });
+        }
 			}
 
 			brokerURI = generateInternalURI("tcp", 18810, true, false);
@@ -165,19 +164,22 @@
 				
 			}
 			System.out.println("Adding TCP Connector:"+tcpConnector.getConnectUri());
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
                     "startInternalBroker", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_adding_connector__CONFIG",
                     new Object[] {"Adding TCP Connector",tcpConnector.getConnectUri() });
-
+      }
 			connectorList = tcpConnector.getName();
 			if ( System.getProperty("StompSupport") != null )
 			{
 				String stompURI = generateInternalURI("stomp", 61613, false, false);
 				connector = service.addConnector(stompURI);
 				System.out.println("Adding STOMP Connector:"+connector.getConnectUri());
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
 	                    "startInternalBroker", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_adding_connector__CONFIG",
 	                    new Object[] {"Adding STOMP Connector",connector.getConnectUri() });
+        }
 				connectorList += ","+connector.getName();
 			}
 			if ( System.getProperty("HTTP") != null )
@@ -187,18 +189,21 @@
 				String httpURI = generateInternalURI("http", p, false, true);
 				httpConnector = service.addConnector(httpURI);
 				System.out.println("Adding HTTP Connector:"+httpConnector.getConnectUri());
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
 	                    "startInternalBroker", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_adding_connector__CONFIG",
 	                    new Object[] {"Adding HTTP Connector",httpConnector.getConnectUri() });
-
+        }
 				connectorList += ","+httpConnector.getName();
 			}
 			service.start();
 			System.setProperty("ActiveMQConnectors", connectorList);
 			System.out.println("Broker Service Started - URL:"+service.getVmConnectorURI());
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
                     "startInternalBroker", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_broker_started__CONFIG",
                     new Object[] {service.getVmConnectorURI() });
+      }
 		}
 			
 		// Allow the connectors some time to start
@@ -259,10 +264,11 @@
 			try
 			{
 				ssocket = new ServerSocket(openPort);
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
 	                    "generateInternalURI", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_port_available__CONFIG",
 	                    new Object[] {openPort });
-				
+        }
 				String uri = aProtocol+"://"+ssocket.getInetAddress().getLocalHost().getCanonicalHostName()+":"+openPort;
 				success = true;
 				if ( cacheURL )
@@ -274,9 +280,11 @@
 			}
 			catch( BindException e)
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(),
 	                    "generateInternalURI", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_port_not_available__CONFIG",
 	                    new Object[] {openPort });
+        }
 				if ( oneTry )
 				{
 					System.out.println("Given port:"+openPort+" is not available for "+aProtocol);
@@ -287,9 +295,11 @@
 			catch( Exception e)
 			{
 				e.printStackTrace();
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
 	                    "generateInternalURI", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_exception__WARNING",
 	                    new Object[] {JmsConstants.threadName(), e });
+        }
 				if ( oneTry )
 				{
 					throw e;
@@ -372,13 +382,17 @@
 	{
 		if ( anEvent instanceof ContextClosedEvent)
 		{
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
 	                "onApplicationEvent", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_container_terminated__INFO",
 	                new Object[] {(( ContextClosedEvent)anEvent).getApplicationContext().getDisplayName()});
+      }
 			stop();
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
 	                "onApplicationEvent", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_broker_stopped__INFO",
 	                new Object[] {brokerURI});
+      }
 		}
 	}
 

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java?rev=707668&r1=707667&r2=707668&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsEndpointConnection_impl.java Fri Oct 24 09:10:14 2008
@@ -166,19 +166,20 @@
 					brokerUri = iC.getServiceInfo().getBrokerURL();
 				}
 				
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(), "open", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_override_connection_to_endpoint__FINE", new Object[] { controller.getComponentName(), getEndpoint(), controller.getInputChannel().getServerUri() });
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(), "open", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_override_connection_to_endpoint__FINE", new Object[] { controller.getComponentName(), getEndpoint(), controller.getInputChannel().getServerUri() });
+        }
 			}
 
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 	                "openChannel", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_activemq_open__FINE",
 	                new Object[] { endpoint, serverUri });
-//			PooledConnectionFactory factory = new PooledConnectionFactory(brokerUri);
-//			factory.setMaximumActive(20);
+      }
 			ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(brokerUri);
 
 			factory.setDispatchAsync(true);
       factory.setUseAsyncSend(true);
-  
       factory.setCopyMessageOnSend(false);
 /*
 			factory.setDispatchAsync(true);
@@ -195,9 +196,11 @@
 				producer = producerSession.createProducer(null); 
 				if ( controller != null )
 				{
-					UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+	        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+	          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 			                "openChannel", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_temp_conn_starting__FINE",
 			                new Object[] { controller.getComponentName(), endpoint, serverUri });
+	        }
 				}
 			}
 			else
@@ -206,9 +209,11 @@
 				producer = producerSession.createProducer(destination);
 				if ( controller != null )
 				{
-					UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+	        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+	          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 		                "openChannel", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_conn_starting__FINE",
 		                new Object[] { controller.getComponentName(), endpoint, serverUri });
+	        }
 				}
 			}
 			producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
@@ -216,12 +221,15 @@
 			if ( controller != null )
 			{
 
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 	                "openChannel", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_conn_started__FINE",
 	                new Object[] { endpoint, serverUri });
+          if ( controller.getInputChannel() != null ) {
+            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(), "openChannel", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_connection_open_to_endpoint__FINE", new Object[] { controller.getComponentName(), getEndpoint(), serverUri });
+          }
+        }
 			}
-			if ( controller != null && controller.getInputChannel() != null)
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(), "openChannel", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_connection_open_to_endpoint__FINE", new Object[] { controller.getComponentName(), getEndpoint(), serverUri });
 		}
 		catch ( Exception e)
 		{
@@ -234,9 +242,11 @@
 	}
 	public synchronized void open() throws AsynchAEException, ServiceShutdownException
 	{
-		UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                 "open", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_open__FINE",
                 new Object[] { endpoint, serverUri });
+    }
 		if ( !connectionAborted )
 		{
 		    openChannel();
@@ -441,8 +451,10 @@
 
 			public void run()
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "startTimer", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_inactivity_timer_expired_INFO", new Object[] { Thread.currentThread().getName(), inactivityTimeout, endpoint });
-					if (connectionCreationTimestamp <= cachedConnectionCreationTimestamp)
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "startTimer", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_inactivity_timer_expired_INFO", new Object[] { Thread.currentThread().getName(), inactivityTimeout, endpoint });
+        }
+				if (connectionCreationTimestamp <= cachedConnectionCreationTimestamp)
 					{
 						try
 						{
@@ -487,7 +499,9 @@
 
 				if ( failed || conn == null || producerSession == null || !((ActiveMQSession) producerSession).isRunning())
 				{
-					UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(), "send", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_open_connection_to_endpoint__FINE", new Object[] { getEndpoint() });
+	        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+	          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(), "send", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_open_connection_to_endpoint__FINE", new Object[] { getEndpoint() });
+	        }
 					openChannel();
 					// The connection has been successful. Now check if we need to create a new listener
 					// and a temp queue to receive replies. A new listener will be created only if the
@@ -562,7 +576,9 @@
 			  }
 			    
 			  e.printStackTrace();
-	       UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "send", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_exception__WARNING", new Object[] { controller.getComponentName(), e});
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "send", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_exception__WARNING", new Object[] { controller.getComponentName(), e});
+        }
 			}
 		}
 		stopTimer();

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsInputChannel.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsInputChannel.java?rev=707668&r1=707667&r2=707668&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsInputChannel.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsInputChannel.java Fri Oct 24 09:10:14 2008
@@ -127,10 +127,12 @@
 	public void setEndpointName( String anEndpointName )
 	{
 		endpointName = anEndpointName;
-		UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                 "setEndpointName", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_service_listening__INFO",
                 new Object[] { anEndpointName });
-		
+      
+    }		
 	}
 	
 	/**
@@ -149,18 +151,22 @@
 			int msgType = aMessage.getIntProperty(AsynchAEMessage.MessageType);
 			if ( msgType != AsynchAEMessage.Response && msgType != AsynchAEMessage.Request )
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+		    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
 	                    "validMessageType", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_invalid_msgtype_in_message__INFO",
 	                    new Object[] { msgType, endpointName });
+		    }
 				return false;
 				
 			}
 		}
 		else
 		{
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+	    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "validMessageType", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_msgtype_notin_message__INFO",
                     new Object[] { endpointName });
+	    }
 			return false;
 		}
 
@@ -242,17 +248,21 @@
          command != AsynchAEMessage.Ping && 
 				 command != AsynchAEMessage.CollectionProcessComplete )
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+		    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
 	                    "validCommand", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_invalid_command_in_message__INFO",
 	                    new Object[] { command, endpointName });
+		    }
 				return false;
 			}
 		}
 		else
 		{
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+	    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "validCommand", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_command_notin_message__INFO",
                     new Object[] { endpointName });
+	    }
 			return false;
 		}
 
@@ -292,19 +302,22 @@
 				 payload != AsynchAEMessage.Metadata 
 				)
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+		    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
 	                    "validPayload", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_invalid_payload_in_message__INFO",
 	                    new Object[] { payload, endpointName });
-				
+		    }
 				
 				return false;
 			}
 		}
 		else
 		{
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+	    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "validPayload", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_payload_notin_message__INFO",
                     new Object[] { endpointName });
+	    }
 			return false;
 		}
 
@@ -325,9 +338,11 @@
 			String casReferenceId = aMessage.getStringProperty(AsynchAEMessage.CasReference);
 			if (!getController().getInProcessCache().entryExists(casReferenceId))
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+		    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 	                    "isStaleMessage", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_stale_message__FINE",
 	                    new Object[] { endpointName, casReferenceId, aMessage.getStringProperty(AsynchAEMessage.MessageFrom) });
+		    }
 				return true;
 			}
 		}
@@ -530,9 +545,11 @@
 		}
 		
 
-		UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                 "onMessage", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_recvd_msg__FINE",
                 new Object[] { eN });
+    }
 		JmsMessageContext messageContext = null;
 
 		int requestType = 0;
@@ -574,16 +591,19 @@
 				{
 					if ( msgSentFromIP != null )
 					{
-						UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+				    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+				      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 			                    "onMessage", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_recvd_new_message_with_ip__FINE",
 			                    new Object[] { controller.getComponentName(), msgFrom, msgSentFromIP, messageType, command, casRefId });
-						
+				    }						
 					}
 					else
 					{
-						UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+            if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+              UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 			                    "onMessage", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_recvd_new_message__FINE",
 			                    new Object[] { controller.getComponentName(), msgFrom, messageType, command, casRefId });
+            }
 					}
 				}
 				else
@@ -614,9 +634,11 @@
 					getController().beginProcess(requestType);
 				}
 
-	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
                 "onMessage", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_new_msg_in__FINEST",
                 new Object[] { getController().getComponentName(), msgFrom, command, messageType, casRefId });
+        }
 				if ( handler != null )
 				{
 					handler.handle( messageContext );
@@ -634,9 +656,10 @@
 		catch( Throwable t)
 		{
 			t.printStackTrace();
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
                     "onMessage", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_exception__WARNING", t);
-
+      }
 			controller.getErrorHandlerChain().handle(t, HandlerBase.populateErrorContext( messageContext ), controller);			
 		}
 		finally
@@ -646,9 +669,11 @@
 			{
 				getController().endProcess(requestType);
 			}
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "onMessage", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_msg_processed__FINE",
                     new Object[] { getController().getComponentName(), casRefId });
+      }
 		}
 	}
 	
@@ -697,10 +722,11 @@
 			}
 			catch( Exception e)
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
 	                    "ackMessage", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_exception__WARNING",
 	                    new Object[] { Thread.currentThread().getName(), e });
-
+        }
 			}
 		}
 	}
@@ -758,9 +784,11 @@
 				String eName = mL.getEndpointName();
 				if ( eName != null )
 				{
-					UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+          if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
 		                    "stop", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_stopping_jms_transport__INFO",
 		                    new Object[] { eName /* mL.getEndpointName()*/ /*endpointName */});
+          }
 				}
 				mL.closeConnection();
 				mL.stop();
@@ -769,9 +797,11 @@
 			{
 				if ( getController() != null )
 				{
-					UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+          if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
 		                    "stop", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_transport_not_stopped__INFO",
 		                    new Object[] { getController().getComponentName() });
+          }
 				}
 			}
 		}

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java?rev=707668&r1=707667&r2=707668&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/JmsOutputChannel.java Fri Oct 24 09:10:14 2008
@@ -155,9 +155,11 @@
 	{
 		if ( getAnalysisEngineController() instanceof AggregateAnalysisEngineController )
 		{
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "initialize", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_connector_list__FINE",
                     new Object[] { System.getProperty("ActiveMQConnectors") });
+      }
 			//	Aggregate controller set this System property at startup in
 			//  org.apache.uima.adapter.jms.service.UIMA_Service.startInternalBroker()
 			serviceProtocolList = System.getProperty("ActiveMQConnectors");
@@ -171,9 +173,11 @@
 		catch( Exception e) 
 		{
 			e.printStackTrace();
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
                     "initialize", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_exception__WARNING",
                     new Object[] { JmsConstants.threadName(), e });
+      }
 		}
 		
 	}
@@ -199,9 +203,11 @@
 				getAnalysisEngineController().getInProcessCache().getCacheEntryForCAS(aCasReferenceId);
 				 
 			XmiSerializationSharedData serSharedData;
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "serializeCAS", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_serialize_cas__FINE",
                     new Object[] {aCasReferenceId});
+      }
 			if ( isReply )
 			{
 				serSharedData = cacheEntry.getDeserSharedData();
@@ -324,65 +330,78 @@
 			destination = ((ActiveMQDestination)anEndpoint.getDestination()).getPhysicalName();
 		    key = destination;
 		}
-		UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                 "getEndpointConnection", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_acquiring_connection_to_endpoint__FINE",
                 new Object[] { getAnalysisEngineController().getComponentName(), destination, anEndpoint.getServerURI() });
-//        new Object[] { getAnalysisEngineController().getComponentName(), anEndpoint.getEndpoint(), anEndpoint.getServerURI() });
+    }
 		
 		//	check the cache first
 		if ( !connectionMap.containsKey(key) )
 		{
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+	    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "getEndpointConnection", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_create_new_connection__FINE",
                     new Object[] { getAnalysisEngineController().getComponentName(), destination, anEndpoint.getServerURI() });
-		
+	    }
 			endpointConnection = new JmsEndpointConnection_impl(connectionMap, anEndpoint); //.getServerURI(), anEndpoint.getEndpoint(),anEndpoint.remove());
 			if ( System.getProperty(JmsConstants.SessionTimeoutOverride) != null)
 			{
 				try
 				{
 					int overrideTimeoutValue = 
-						Integer.parseInt(System.getProperty(JmsConstants.SessionTimeoutOverride));
+					Integer.parseInt(System.getProperty(JmsConstants.SessionTimeoutOverride));
 					endpointConnection.setInactivityTimeout(overrideTimeoutValue);  // If the connection is not used within this interval it will be removed
-					UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+			    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+			      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 		                    "getEndpointConnection", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_override_connection_timeout__FINE",
 		                    new Object[] { analysisEngineController, overrideTimeoutValue, destination, anEndpoint.getServerURI() });
+			    }
 				}
 				catch( NumberFormatException e) { /* ignore. use the default */ }
 			}
 			else
 			{
 				endpointConnection.setInactivityTimeout(INACTIVITY_TIMEOUT);  // If the connection is not used within this interval it will be removed
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+		    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 	                    "getEndpointConnection", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_connection_timeout__FINE",
 	                    new Object[] { analysisEngineController, INACTIVITY_TIMEOUT, destination, anEndpoint.getServerURI() });
+		    }
 			}
 			endpointConnection.setAnalysisEngineController(getAnalysisEngineController());
 			//	Connection is not in the cache, create a new connection, initialize it and cache it
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+	    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "getEndpointConnection", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_open_new_connection_to_endpoint__FINE",
                     new Object[] { destination, anEndpoint.getServerURI() });
+	    }
 			endpointConnection.open();
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+	    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "getEndpointConnection", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_connection_opened_to_endpoint__FINE",
                     new Object[] { getAnalysisEngineController().getComponentName(),destination, anEndpoint.getServerURI() });
-
+	    }
 			//	Cache the connection for future use. If not used, connections expire after 50000 millis 
 			connectionMap.put( key, endpointConnection);
 		}
 		else
 		{
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+	    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "getEndpointConnection", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_reusing_existing_connection__FINE",
                     new Object[] { getAnalysisEngineController().getComponentName(), destination, anEndpoint.getServerURI() });
+	    }
 			//	Retrieve connection from the connection cache
 			endpointConnection = (JmsEndpointConnection_impl)connectionMap.get(key);
 			// check the state of the connection and re-open it if necessary
 			if ( endpointConnection != null && !endpointConnection.isOpen() )
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+		    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 	                    "getEndpointConnection", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_connection_closed_reopening_endpoint__FINE",
 	                    new Object[] { destination });
+		    }
 				endpointConnection.open();
 			}
 		}
@@ -414,24 +433,30 @@
 			endpointConnection.send(tm, true);
 			if ( aCommand == AsynchAEMessage.ReleaseCAS )
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(), "sendRequest", 
+		    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(), "sendRequest", 
 						JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_release_cas_req__FINE", new Object[] { getAnalysisEngineController().getName(), anEndpoint.getEndpoint(),aCasReferenceId });
+		    }
 			}
 				
 		}
 		catch( JMSException e)
 		{
 			//	Unable to establish connection to the endpoint. Logit and continue
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+	    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "sendRequest", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_unable_to_connect__INFO",
                     new Object[] { getAnalysisEngineController().getName(), anEndpoint.getEndpoint()});
+	    }
 		}
 		catch( ServiceShutdownException e)
 		{
 			e.printStackTrace();
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+	    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "sendRequest", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_jms_shutdown__INFO",
                     new Object[] { getAnalysisEngineController().getName(), anEndpoint.getEndpoint()});
+	    }
 		}
 		catch ( Exception e)
 		{
@@ -484,14 +509,18 @@
 			
 			if ( aCommand == AsynchAEMessage.CollectionProcessComplete )
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(), "sendRequest", 
+		    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(), "sendRequest", 
 						UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_send_cpc_req__FINE", new Object[] { anEndpoint.getEndpoint() });
+		    }
 			}
 			else if ( aCommand == AsynchAEMessage.ReleaseCAS )
 			{
-	            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
+		    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST)) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
 	                    "sendRequest", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_releasecas_request__endpoint__FINEST",
 	                    new Object[] {getAnalysisEngineController().getName(), endpointConnection.getEndpoint()});
+		    }
 			}
 			else if ( aCommand == AsynchAEMessage.GetMeta )
 			{
@@ -521,9 +550,11 @@
 			}
 			else 
 			{
-	            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
+		    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST)) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
 	                    "sendRequest", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_metadata_request__endpoint__FINEST",
 	                    new Object[] { endpointConnection.getEndpoint(), endpointConnection.getServerUri() });
+		    }
 			}
 		}
 		catch ( Exception e)
@@ -543,10 +574,11 @@
 	public void sendRequest( String aCasReferenceId, Endpoint anEndpoint) throws AsynchAEException
 	{
 		
-		UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                 "sendRequest", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_sending_msg_to_endpoint__FINE",
                 new Object[] { anEndpoint.getEndpoint() });
-
+    }
 		try
 		{
 			if (anEndpoint.isRemote())
@@ -669,9 +701,11 @@
 			}
 			else
 			{
-	            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+		    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 	                    "sendReply", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_sending_reply_with_sequence__FINE",
 	                    new Object[] { anEndpoint.getEndpoint(), aNewCasReferenceId, sequence });
+		    }
 				sendCasToCollocatedDelegate(false, anInputCasReferenceId, aNewCasReferenceId, anEndpoint, false, sequence);
 			}
 		}
@@ -710,25 +744,26 @@
 			}
 			else
 			{
-	            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+		    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 	                    "sendReply", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_sending_reply_with_sequence__FINE",
 	                    new Object[] { anEndpoint.getEndpoint(), entry.getCasReferenceId(), entry.getCasSequence() });
-
-	            if ( getAnalysisEngineController() instanceof AggregateAnalysisEngineController && getAnalysisEngineController().isCasMultiplier() )
-	            {
-	              if ( ((AggregateAnalysisEngineController)getAnalysisEngineController()).getMessageOrigin(entry.getInputCasReferenceId()) != null)
-	              {
-	                sendCasToCollocatedDelegate(false, entry.getInputCasReferenceId(), entry.getCasReferenceId(), anEndpoint, false, entry.getCasSequence());
-	              }
-	              else
-	              {
-	                sendCasToCollocatedDelegate(false, entry.getCasReferenceId(), null, anEndpoint, false, 0);
-	              }
-	            }
-	            else
-	            {
-                sendCasToCollocatedDelegate(false, entry.getInputCasReferenceId(), entry.getCasReferenceId(), anEndpoint, false, entry.getCasSequence());
-	            }
+		    }
+	      if ( getAnalysisEngineController() instanceof AggregateAnalysisEngineController && getAnalysisEngineController().isCasMultiplier() )
+	      {
+	         if ( ((AggregateAnalysisEngineController)getAnalysisEngineController()).getMessageOrigin(entry.getInputCasReferenceId()) != null)
+	         {
+	           sendCasToCollocatedDelegate(false, entry.getInputCasReferenceId(), entry.getCasReferenceId(), anEndpoint, false, entry.getCasSequence());
+	         }
+	         else
+	         {
+	           sendCasToCollocatedDelegate(false, entry.getCasReferenceId(), null, anEndpoint, false, 0);
+	         }
+	      }
+	      else
+	      {
+           sendCasToCollocatedDelegate(false, entry.getInputCasReferenceId(), entry.getCasReferenceId(), anEndpoint, false, entry.getCasSequence());
+	      }
 			}
 		}
 		catch( ServiceShutdownException e)
@@ -766,17 +801,20 @@
 			
 			endpointConnection.send(tm, false); 
 			addIdleTime(tm);
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+	    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "sendReply", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_cpc_reply_sent__FINE",
                     new Object[] { getAnalysisEngineController().getComponentName(), anEndpoint.getEndpoint()});
+	    }
 		}
 		catch( JMSException e)
 		{
 			//	Unable to establish connection to the endpoint. Logit and continue
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
+	    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING)) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(),
                     "sendReply", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_exception__WARNING",
                     new Object[] { e});
-			
+	    }
 		}
 
 		catch( ServiceShutdownException e)
@@ -810,14 +848,13 @@
 		anEndpoint.setReplyEndpoint(true);
 		try
 		{
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+	    if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "sendReply", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_sending_replyto_endpoint__FINE",
                     new Object[] { anEndpoint.getEndpoint(), aCasReferenceId });
+	    }
 			if ( anEndpoint.isRemote() )
 			{
-//				String serializedCAS = getSerializedCas(true, aCasReferenceId, anEndpoint, false);
-//				sendCasToRemoteEndpoint(false, serializedCAS, null, aCasReferenceId, anEndpoint, false, 0);
-
         if ( anEndpoint.getSerializer().equals("xmi")) {
           //  Serializes CAS and releases it back to CAS Pool
           String serializedCAS = getSerializedCas(true, aCasReferenceId, anEndpoint, false);
@@ -903,10 +940,11 @@
 				om.setStringProperty(AsynchAEMessage.CasReference, aCasReferenceId);
 			}
 			
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "sendReply", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_sending_exception__FINE",
                     new Object[] { getAnalysisEngineController().getName(), anEndpoint.getEndpoint() });
-
+      }
 			//	Dispatch Message to destination
 			endpointConnection.send(om, false);
 			addIdleTime(om);
@@ -914,9 +952,11 @@
 		catch( JMSException e)
 		{
 			//	Unable to establish connection to the endpoint. Logit and continue
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "sendReply", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_unable_to_connect__INFO",
                     new Object[] { getAnalysisEngineController().getName(), anEndpoint.getEndpoint()});
+      }
 		}
 		catch( ServiceShutdownException e)
 		{
@@ -924,9 +964,11 @@
 		}
 		catch (AsynchAEException e)
 		{
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "sendReply", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_unable_to_connect__INFO",
                     new Object[] { getAnalysisEngineController().getName(), anEndpoint.getEndpoint()});
+      }
 		}
 		catch (Exception e)
 		{
@@ -955,10 +997,11 @@
 			JmsEndpointConnection_impl endpointConnection = 
 				getEndpointConnection(anEndpoint);
 			
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
                     "sendReply", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_produce_txt_msg__FINE",
                     new Object[] { });
-			
+      }
 			TextMessage tm = endpointConnection.produceTextMessage("");
 
 			
@@ -967,9 +1010,11 @@
 			// CasManager with its parent
 			if ( serialize )
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
+	      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST)) {
+	        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
 	                    "sendReply", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_serializing_meta__FINE",
 	                    new Object[] { });
+	      }
 				//	Serialize metadata
 				aProcessingResourceMetadata.toXML(bos);
 				tm.setText(bos.toString());
@@ -979,19 +1024,22 @@
 
 			populateHeaderWithResponseContext(tm, anEndpoint, AsynchAEMessage.GetMeta);
 			
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
                     "sendReply", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_metadata_reply__endpoint__FINEST",
                     new Object[] { serviceInputEndpoint, anEndpoint.getEndpoint() });
+      }
 			endpointConnection.send(tm, false);
 		}
 		catch( JMSException e)
 		{
 			e.printStackTrace();
 			//	Unable to establish connection to the endpoint. Log it and continue
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "sendReply", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_unable_to_connect__INFO",
                     new Object[] { getAnalysisEngineController().getName(), anEndpoint.getEndpoint()});
-			
+      }
 		}
 
 		catch( ServiceShutdownException e)
@@ -1031,9 +1079,11 @@
         if ( serializer.equals("binary")) {
           serializedCAS = uimaSerializer.serializeCasToBinary(cas);
         } else {
-          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+          if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO)) {
+            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                   "getBinaryCas", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_invalid_serializer__WARNING",
                   new Object[] { getAnalysisEngineController().getName(),serializer, anEndpoint.getEndpoint()});
+          }
           throw new UimaEEServiceException("Invalid Serializer:"+serializer+" For Endpoint:"+anEndpoint.getEndpoint());
         }
         long timeToSerializeCas = getAnalysisEngineController().getCpuTime()-t1;
@@ -1197,19 +1247,17 @@
 				
 				aTextMessage.setLongProperty(AsynchAEMessage.TimeToSerializeCAS, casStats.getRawCasSerializationTime());
 				aTextMessage.setLongProperty(AsynchAEMessage.TimeToDeserializeCAS, casStats.getRawCasDeserializationTime());
-
-//				long t = getAnalysisEngineController().getServicePerformance().getRawAnalysisTime();
-//				aTextMessage.setLongProperty(AsynchAEMessage.TimeInProcessCAS, t);
         aTextMessage.setLongProperty(AsynchAEMessage.TimeInProcessCAS, casStats.getRawAnalysisTime());
-				
 				long iT =getAnalysisEngineController().getIdleTimeBetweenProcessCalls(AsynchAEMessage.Process); 
 				aTextMessage.setLongProperty(AsynchAEMessage.IdleTime, iT );
 				String lookupKey = getAnalysisEngineController().getName();
 				long arrivalTime = getAnalysisEngineController().getTime( aCasReferenceId, lookupKey); //serviceInputEndpoint);
 				long timeInService = getAnalysisEngineController().getCpuTime()-arrivalTime;
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
+	      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST)) {
+	        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(),
 	                    "populateStats", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_timein_service__FINEST",
 	                    new Object[] { serviceInputEndpoint, (double)timeInService/(double)1000000 });
+	      }
 			}
 		}	
 	}
@@ -1278,9 +1326,11 @@
 					aMessage.setStringProperty(UIMAMessage.ServerURI, protocol);
 				}
 
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 	                    "populateHeaderWithRequestContext", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_sending_new_msg_to_remote_FINE",
 	                    new Object[] {getAnalysisEngineController().getComponentName(), anEndpoint.getServerURI(), anEndpoint.getEndpoint()});
+        }
 			}
 			else // collocated
 			{
@@ -1339,10 +1389,11 @@
 				{
 					protocol = extractURLWithProtocol(serviceProtocolList, "http");
 				}
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+        if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 	                    "populateHeaderWithContext", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_sending_msg_to_remote_FINE",
 	                    new Object[] {protocol, anEndpoint.getEndpoint()});
-
+        }
 				aMessage.setStringProperty(UIMAMessage.ServerURI, protocol);
 			}
 			else
@@ -1404,10 +1455,11 @@
 						getMessageAccessorByReference(aCasReferenceId).
 							getRawMessage()).acknowledge();
 
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+      if (UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE)) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
 	                "ackMessage", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_ack_msg__FINE",
 	                new Object[] { aCasReferenceId  });
-			
+      }
 		}
 
 	}
@@ -1470,11 +1522,6 @@
 				tm.setLongProperty(AsynchAEMessage.CasSequence, sequence);
 				isRequest = true;
 				//	Add the name of the FreeCas Queue
-//				if ( secondaryInputEndpoint != null )
-//				{
-//					tm.setStringProperty(AsynchAEMessage.MessageFrom, secondaryInputEndpoint);
-//				}
-				
 				if ( freeCASTempQueue != null )
 				{
 					//	Attach a temp queue to the outgoing message. This a queue where
@@ -1501,10 +1548,11 @@
 				//	for response is provided in configuration for the endpoint
 				anEndpoint.startProcessRequestTimer(aCasReferenceId);
 			}
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "sendCasToRemoteEndpoint", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_sending_new_msg_to_remote_FINE",
                     new Object[] {getAnalysisEngineController().getName(),endpointConnection.getServerUri(), endpointConnection.getEndpoint() });
-
+      }
 			//	By default start a timer associated with a connection to the endpoint. Once a connection is established with an
 			//	endpoint it is cached and reused for subsequent messaging. If the connection is not used within a given interval
 			//	the timer silently expires and closes the connection. This mechanism is similar to what Web Server does when
@@ -1520,10 +1568,6 @@
 			//	Send Request Messsage to the Endpoint
 			// ----------------------------------------------------
 			endpointConnection.send(tm, startConnectionTimer);
-//			if ( getAnalysisEngineController().isTopLevelComponent() )
-//			{
-//				getAnalysisEngineController().getInProcessCache().dumpContents(getAnalysisEngineController().getComponentName());
-//			}
 			if ( !isRequest )
 			{
 				addIdleTime(tm);
@@ -1532,10 +1576,11 @@
 		catch( JMSException e)
 		{
 			//	Unable to establish connection to the endpoint. Logit and continue
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "sendCasToRemoteDelegate", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_unable_to_connect__INFO",
                     new Object[] { getAnalysisEngineController().getName(), anEndpoint.getEndpoint()});
-			
+      }			
 		}
 
 		catch( ServiceShutdownException e)
@@ -1621,10 +1666,11 @@
         //  for response is provided in configuration for the endpoint
         anEndpoint.startProcessRequestTimer(aCasReferenceId);
       }
-      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "sendCasToRemoteEndpoint", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_sending_new_msg_to_remote_FINE",
                     new Object[] {getAnalysisEngineController().getName(),endpointConnection.getServerUri(), endpointConnection.getEndpoint() });
-
+      }
       //  By default start a timer associated with a connection to the endpoint. Once a connection is established with an
       //  endpoint it is cached and reused for subsequent messaging. If the connection is not used within a given interval
       //  the timer silently expires and closes the connection. This mechanism is similar to what Web Server does when
@@ -1640,10 +1686,6 @@
       //  Send Request Messsage to the Endpoint
       // ----------------------------------------------------
       endpointConnection.send(tm, startConnectionTimer);
-//      if ( getAnalysisEngineController().isTopLevelComponent() )
-//      {
-//        getAnalysisEngineController().getInProcessCache().dumpContents(getAnalysisEngineController().getComponentName());
-//      }
       if ( !isRequest )
       {
         addIdleTime(tm);
@@ -1652,10 +1694,11 @@
     catch( JMSException e)
     {
       //  Unable to establish connection to the endpoint. Logit and continue
-      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "sendCasToRemoteDelegate", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_unable_to_connect__INFO",
                     new Object[] { getAnalysisEngineController().getName(), anEndpoint.getEndpoint()});
-      
+      }
     }
 
     catch( ServiceShutdownException e)
@@ -1748,10 +1791,11 @@
 				//	for response is provided in configuration for the endpoint
 				anEndpoint.startProcessRequestTimer(entry.getCasReferenceId());
 			}
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "sendCasToRemoteEndpoint", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_sending_new_msg_to_remote_FINE",
                     new Object[] {getAnalysisEngineController().getName(),endpointConnection.getServerUri(), endpointConnection.getEndpoint() });
-
+      }
 			//	By default start a timer associated with a connection to the endpoint. Once a connection is established with an
 			//	endpoint it is cached and reused for subsequent messaging. If the connection is not used within a given interval
 			//	the timer silently expires and closes the connection. This mechanism is similar to what Web Server does when
@@ -1781,10 +1825,11 @@
 		catch( JMSException e)
 		{
 			//	Unable to establish connection to the endpoint. Logit and continue
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "sendCasToRemoteDelegate", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_unable_to_connect__INFO",
                     new Object[] { getAnalysisEngineController().getName(), anEndpoint.getEndpoint()});
-			
+      }
 		}
 
 		catch( ServiceShutdownException e)
@@ -1869,10 +1914,11 @@
         //  for response is provided in configuration for the endpoint
         anEndpoint.startProcessRequestTimer(entry.getCasReferenceId());
       }
-      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "sendCasToRemoteEndpoint", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_sending_new_msg_to_remote_FINE",
                     new Object[] {getAnalysisEngineController().getName(),endpointConnection.getServerUri(), endpointConnection.getEndpoint() });
-
+      }
       //  By default start a timer associated with a connection to the endpoint. Once a connection is established with an
       //  endpoint it is cached and reused for subsequent messaging. If the connection is not used within a given interval
       //  the timer silently expires and closes the connection. This mechanism is similar to what Web Server does when
@@ -1898,10 +1944,11 @@
     catch( JMSException e)
     {
       //  Unable to establish connection to the endpoint. Logit and continue
-      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "sendCasToRemoteDelegate", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_unable_to_connect__INFO",
                     new Object[] { getAnalysisEngineController().getName(), anEndpoint.getEndpoint()});
-      
+      }
     }
 
     catch( ServiceShutdownException e)
@@ -1976,9 +2023,11 @@
 			{
 				id2Log = aNewCasReferenceId;
 			}
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINE) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINE, CLASS_NAME.getName(),
                     "sendCasToCollocatedDelegate", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_send_cas_to_collocated_service__FINE",
                     new Object[] {anEndpoint.getEndpoint(), id2Log});
+      }
 			//	Get the connection object for a given endpoint
 			JmsEndpointConnection_impl endpointConnection = getEndpointConnection(anEndpoint);
 			//	Create empty JMS Text Message
@@ -2061,10 +2110,11 @@
 		catch( JMSException e)
 		{
 			//	Unable to establish connection to the endpoint. Logit and continue
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
                     "sendCasToCollocatedDelegate", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_unable_to_connect__INFO",
                     new Object[] { getAnalysisEngineController().getName(), anEndpoint.getEndpoint()});
-			
+      }
 		}
 		catch( ServiceShutdownException e)
 		{
@@ -2119,14 +2169,18 @@
 				{
 					endpointConnection = (JmsEndpointConnection_impl)value;
 					endpointConnection.abort();
-					UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+		      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+		        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
 		                    "stop", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_forced_endpoint_close__INFO",
 		                    new Object[] {getAnalysisEngineController().getName(),endpointConnection.getEndpoint(), endpointConnection.getServerUri() });
+		      }
 				}
 			}
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(),
 	                "stop", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_output_channel_aborted__INFO",
 	                new Object[] {getAnalysisEngineController().getName()});
+      }
 		}
 		catch( Exception e)
 		{

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/SpringContainerDeployer.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/SpringContainerDeployer.java?rev=707668&r1=707667&r2=707668&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/SpringContainerDeployer.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/SpringContainerDeployer.java Fri Oct 24 09:10:14 2008
@@ -160,7 +160,9 @@
 			//	add this queue to every outgoing message containing a CAS generated by the
 			//	Cas Multiplier.
 			((JmsOutputChannel)cntlr.getOutputChannel()).setFreeCasQueue(connector.getListenerEndpoint());
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(), "initializeTopLevelController", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_activated_fcq__CONFIG", new Object[] { cntlr.getComponentName(), connector.getEndpointName() });
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(), "initializeTopLevelController", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_activated_fcq__CONFIG", new Object[] { cntlr.getComponentName(), connector.getEndpointName() });
+      }
 		}
 
 		if (cntlr instanceof AggregateAnalysisEngineController) {
@@ -296,7 +298,9 @@
 		{
 			throw new ResourceInitializationException(new Exception("Spring Context File Not Specified"));		
 		}
-		UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(), "deploy", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_deploy_container__CONFIG", new Object[] { springContextFile });
+    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG) ) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(), "deploy", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_deploy_container__CONFIG", new Object[] { springContextFile });
+    }
 		try {
 			// Deploy beans in the Spring container. Although the deployment is
 			// synchronous ( one bean at a time), some beans run in a separate
@@ -327,7 +331,9 @@
           if (!springContextFiles[i].startsWith("file:")) {
             springContextFiles[i] = "file:" + springContextFiles[i];
           }
-		  UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(), "deploySpringContainer", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_deploy_container__CONFIG", new Object[] { springContextFiles[i] });
+          if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG) ) {
+            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(), "deploySpringContainer", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_deploy_container__CONFIG", new Object[] { springContextFiles[i] });
+          }
 		}
 		try {
 			// Deploy beans in the Spring container. Although the deployment is
@@ -352,8 +358,9 @@
 					if (serviceInitializationException) {
 						throw new ResourceInitializationException();
 					}
-					UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "waitForServiceNotification", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_awaiting_container_init__INFO", new Object[] {});
-
+		      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+		        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "waitForServiceNotification", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_awaiting_container_init__INFO", new Object[] {});
+		      }
 				serviceMonitor.wait();
 				if (serviceInitializationException) {
 					throw new ResourceInitializationException();
@@ -366,7 +373,9 @@
 		// Initialization exception. Notify blocking thread and indicate a
 		// problem
 		serviceInitializationException = true;
-		UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "notifyOnInitializationFailure", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_container_init_exception__WARNING", new Object[] {e});
+    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "notifyOnInitializationFailure", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_container_init_exception__WARNING", new Object[] {e});
+    }
 		synchronized (serviceMonitor) {
 			serviceMonitor.notifyAll();
 		}

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaDefaultMessageListenerContainer.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaDefaultMessageListenerContainer.java?rev=707668&r1=707667&r2=707668&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaDefaultMessageListenerContainer.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaDefaultMessageListenerContainer.java Fri Oct 24 09:10:14 2008
@@ -112,9 +112,11 @@
 	 * @param t
 	 */
   private void handleTempQueueFailure(Throwable t) {
-    UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
+    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
             "handleTempQueueFailure", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_jms_listener_failed_WARNING",
             new Object[] {  endpoint.getDestination(), getBrokerUrl(), t });
+    }
     // Check if the failure is due to the failed connection. Spring (and ActiveMQ) dont seem to provide 
     // the cause. Just the top level IllegalStateException with a text message. This is what we need to
     //  check for.
@@ -122,15 +124,19 @@
       if ( controller != null && controller instanceof AggregateAnalysisEngineController ) {
         String delegateKey = ((AggregateAnalysisEngineController)controller).lookUpDelegateKey(endpoint.getEndpoint());
         try {
-          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, this.getClass().getName(),
+          if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, this.getClass().getName(),
                   "handleTempQueueFailure", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_stopping_listener_INFO",
                   new Object[] {  controller.getComponentName(), endpoint.getDestination(),delegateKey });
+          }
           // Stop current listener 
           handleListenerFailure();
-          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, this.getClass().getName(),
+          if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, this.getClass().getName(),
                   "handleTempQueueFailure", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_stopped_listener_INFO",
                   new Object[] {  controller.getComponentName(), endpoint.getDestination() });
-        } catch ( Exception e ) {
+          }
+         } catch ( Exception e ) {
           e.printStackTrace();
         }
       }
@@ -162,9 +168,11 @@
   private void handleQueueFailure(Throwable t) {
     final String endpointName = 
       (getDestination() == null) ? "" : ((ActiveMQDestination)getDestination()).getPhysicalName(); 
-    UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
+    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
             "handleQueueFailure", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_jms_listener_failed_WARNING",
             new Object[] {  endpointName, getBrokerUrl(), t });
+    }
     boolean terminate = true;
     //  Check if the failure is severe enough to disable this listener. Whether or not this listener is actully
     //  disabled depends on the action associated with GetMeta Error Handler. If GetMeta Error Handler is
@@ -195,9 +203,11 @@
             list.add(delegateKey);
             try {
               System.out.println(">>>> Controller:"+controller.getComponentName()+" Disabling Listener On Queue:"+endpoint.getEndpoint()+". Component's "+delegateKey+" Broker:"+getBrokerUrl()+" is Invalid");
-              UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, this.getClass().getName(),
+              if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+                UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, this.getClass().getName(),
                           "handleQueueFailure", UIMAEE_Constants.JMS_LOG_RESOURCE_BUNDLE, "UIMAEE_disabled_delegate_bad_broker__INFO",
                           new Object[] {  controller.getComponentName(), delegateKey, getBrokerUrl() });
+              }
               //  Remove the delegate from the routing table. 
               ((AggregateAnalysisEngineController) controller).disableDelegates(list);
               terminate = false; //just disable the delegate and continue
@@ -219,10 +229,11 @@
       {
         try
         {
-          UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
+          if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+            UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
                       "handleQueueFailure", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_disable_listener__WARNING",
                       new Object[] {  endpointName, getBrokerUrl() });
-          
+          }
           shutdown();
         }
         catch( Exception e) { e.printStackTrace();}
@@ -275,9 +286,11 @@
     //  terminate the service
     // ****************************************
     System.out.println(">>>> Terminating Controller:"+controller.getComponentName()+" Unable To Initialize Listener Due to Invalid Broker URL:"+getBrokerUrl());
-    UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
+    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
                 "terminate", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_terminate_service_dueto_bad_broker__WARNING",
                 new Object[] {  controller.getComponentName(), getBrokerUrl() });
+    }
     controller.notifyListenersWithInitializationStatus(new ResourceInitializationException(t));
     controller.stop();
 	}
@@ -287,9 +300,11 @@
       String endpointName = 
         (getDestination() == null) ? "" : ((ActiveMQDestination)getDestination()).getPhysicalName(); 
       
-      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
+      if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+        UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
                 "handleListenerException", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_jms_listener_failed_WARNING",
                 new Object[] {  endpointName, getBrokerUrl(), t });
+      }
 			super.handleListenerException(t);
 		
 	}
@@ -318,9 +333,11 @@
 		catch( Exception e)
 		{
 			e.printStackTrace();
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
+	    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
 	                "afterPropertiesSet", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_exception__WARNING",
 	                new Object[] {Thread.currentThread().getId(), e});
+	    }
 		}
 	}
 	
@@ -357,10 +374,11 @@
 		}
 		catch( Exception e)
 		{
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
+	    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
 	                "closeConnection", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_exception__WARNING",
 	                new Object[] {Thread.currentThread().getId(), e});
-			
+	    }
 		}
 	}
 	public void setDestination( Destination aDestination )
@@ -390,9 +408,11 @@
     String endpointName = 
       (getDestination() == null) ? "" : ((ActiveMQDestination)getDestination()).getPhysicalName(); 
     
-    UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
+    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, this.getClass().getName(),
               "onException", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_jms_listener_failed_WARNING",
               new Object[] {  endpointName, getBrokerUrl(), arg0});
+    }
 	}
 
 	public void setTargetEndpoint( Endpoint anEndpoint )

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaEEAdminSpringContext.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaEEAdminSpringContext.java?rev=707668&r1=707667&r2=707668&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaEEAdminSpringContext.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaEEAdminSpringContext.java Fri Oct 24 09:10:14 2008
@@ -58,7 +58,9 @@
 			}
 			catch( Exception e) 
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "UimaEEAdminSpringContext", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_exception__WARNING", new Object[] {  e });
+		    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "UimaEEAdminSpringContext", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_exception__WARNING", new Object[] {  e });
+		    }
 			}
 		}
 	}
@@ -140,9 +142,11 @@
 					String eName = listenerContainer.getEndpointName();
 					if ( eName != null )
 					{
-						UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, this.getClass().getName(),
+				    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+				      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, this.getClass().getName(),
 				                "spinThreadForListenerShutdown.run()", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_stop_listener__INFO",
 				                new Object[] { eName  });
+				    }
 					}
 				}
 				catch( Exception e) { e.printStackTrace();}

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaEeExceptionListener.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaEeExceptionListener.java?rev=707668&r1=707667&r2=707668&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaEeExceptionListener.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/activemq/UimaEeExceptionListener.java Fri Oct 24 09:10:14 2008
@@ -45,26 +45,7 @@
 	{
 		if ( anEvent instanceof UimaEEShutdownTriggerEvent)
 		{
-System.out.println("Reaper Received Shutdown Request");
-/*
-	AnalysisEngineController targetController =
-				((UimaEEShutdownTriggerEvent)anEvent).getTargetController();
-			
-			if ( targetController != null && targetController.isTopLevelComponent() )
-			{
-				targetController.terminate();
-				InProcessCache inProcessCache = targetController.getInProcessCache();
-				if ( !inProcessCache.isEmpty() )
-				{
-					inProcessCache.registerCallbackWhenCacheEmpty(targetController.getEventListener());
-				}
-				else
-				{
-					//	Callback to notify that the cache is empty
-					targetController.getEventListener().onCacheEmpty();
-				}
-			}
-*/			
+		  System.out.println("Reaper Received Shutdown Request");
 		}
 		else
 		{

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java?rev=707668&r1=707667&r2=707668&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/adapter/jms/client/BaseUIMAAsynchronousEngine_impl.java Fri Oct 24 09:10:14 2008
@@ -203,8 +203,9 @@
     }
 	public void stop()
 	{
-		UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(), "stop", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_stopping_as_client_INFO", new Object[] {});
-
+	  if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST) ) {
+	    UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(), "stop", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_stopping_as_client_INFO", new Object[] {});
+	  }
 		if (!running)
 		{
 			return;
@@ -316,8 +317,9 @@
 	}
 	public void initializeProducer(String aBrokerURI, String aQueueName) throws Exception
 	{
-		UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(), "initializeProducer", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_init_jms_producer_INFO", new Object[] { aBrokerURI, aQueueName });
-
+    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST) ) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(), "initializeProducer", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_init_jms_producer_INFO", new Object[] { aBrokerURI, aQueueName });
+    }
 		brokerURI = aBrokerURI;
 		//	Create a worker thread for sending messages. Jms sessions are single threaded
 		//	and it is illegal (per JMS spec) to use the same sesssion from multiple threads.
@@ -355,7 +357,9 @@
 		if ( sender.failed())
 		{
 			//	Worker thread failed to initialize. Log the reason and stop the uima ee client
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "initializeProducer", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_worker_thread_failed_to_initialize__WARNING", new Object[] { sender.getReasonForFailure() });
+	    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "initializeProducer", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_worker_thread_failed_to_initialize__WARNING", new Object[] { sender.getReasonForFailure() });
+	    }
 			stop();
 			return;
 		}
@@ -371,7 +375,9 @@
 	{
 		consumerSession = getSession(aBrokerURI);
 		consumerDestination = consumerSession.createTemporaryQueue();
-		UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(), "initializeConsumer", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_init_jms_consumer_INFO", new Object[] { aBrokerURI, consumerDestination.getQueueName() });
+    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.FINEST) ) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.FINEST, CLASS_NAME.getName(), "initializeConsumer", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_init_jms_consumer_INFO", new Object[] { aBrokerURI, consumerDestination.getQueueName() });
+    }
 		consumer = consumerSession.createConsumer(consumerDestination);
 		consumer.setMessageListener(this);
 		System.out.println(">>>> Client Activated Temp Reply Queue:"+consumerDestination.getQueueName());
@@ -456,8 +462,9 @@
       super.serializationStrategy = (String) anApplicationContext.get(UimaAsynchronousEngine.SerializationStrategy);
     }
 
-		UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(), "initialize", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_init_uimaee_client__CONFIG", new Object[] { brokerURI, 0, casPoolSize, processTimeout, metadataTimeout, cpcTimeout });
-
+    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.CONFIG) ) {
+      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.CONFIG, CLASS_NAME.getName(), "initialize", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_init_uimaee_client__CONFIG", new Object[] { brokerURI, 0, casPoolSize, processTimeout, metadataTimeout, cpcTimeout });
+    }
 		try
 		{
 			jmxManager = new JmxManager("org.apache.uima");
@@ -472,7 +479,9 @@
 			waitForMetadataReply();
 			if (abort || !running)
 			{
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "initialize", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_aborting_as_WARNING", new Object[] { "Metadata Timeout" });
+		    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "initialize", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_aborting_as_WARNING", new Object[] { "Metadata Timeout" });
+		    }
 				throw new ResourceInitializationException(new UimaASMetaRequestTimeout());
 			}
 			else
@@ -721,8 +730,9 @@
 		    {
 		      throw new ResourceInitializationException();
 		    }
-				UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "waitForServiceNotification", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_awaiting_container_init__INFO", new Object[] {});
-
+		    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.INFO) ) {
+		      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.INFO, CLASS_NAME.getName(), "waitForServiceNotification", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_awaiting_container_init__INFO", new Object[] {});
+		    }
 
 	      serviceMonitor.wait();
 	      if ( serviceInitializationException )
@@ -781,7 +791,9 @@
 
 	    //  Initialization exception. Notify blocking thread and indicate a problem
 	    serviceInitializationException = true;
-			UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "notifyOnInitializationFailure", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_container_init_exception__WARNING", new Object[] {e});
+	    if ( UIMAFramework.getLogger(CLASS_NAME).isLoggable(Level.WARNING) ) {
+	      UIMAFramework.getLogger(CLASS_NAME).logrb(Level.WARNING, CLASS_NAME.getName(), "notifyOnInitializationFailure", JmsConstants.JMS_LOG_RESOURCE_BUNDLE, "UIMAJMS_container_init_exception__WARNING", new Object[] {e});
+	    }
 	    synchronized(serviceMonitor)
 	    {
 	      serviceMonitor.notifyAll();

Modified: incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/examples/as/RunRemoteAsyncAE.java
URL: http://svn.apache.org/viewvc/incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/examples/as/RunRemoteAsyncAE.java?rev=707668&r1=707667&r2=707668&view=diff
==============================================================================
--- incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/examples/as/RunRemoteAsyncAE.java (original)
+++ incubator/uima/sandbox/trunk/uima-as/uimaj-as-activemq/src/main/java/org/apache/uima/examples/as/RunRemoteAsyncAE.java Fri Oct 24 09:10:14 2008
@@ -237,6 +237,7 @@
     appCtx.put(UimaAsynchronousEngine.CasPoolSize, casPoolSize);
     appCtx.put(UIMAFramework.CAS_INITIAL_HEAP_SIZE, new Integer(fsHeapSize/4).toString());
 
+    appCtx.put(UimaAsynchronousEngine.SerializationStrategy, "binary");
     //initialize
     uimaEEEngine.initialize(appCtx);
 



Mime
View raw message