geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r469761 - in /geronimo/server/trunk: assemblies/geronimo-boilerplate-minimal/src/main/resources/var/log/server-log4j.properties modules/geronimo-activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java
Date Wed, 01 Nov 2006 03:06:08 GMT
Author: dain
Date: Tue Oct 31 19:06:07 2006
New Revision: 469761

URL: http://svn.apache.org/viewvc?view=rev&rev=469761
Log:
Fix activemq logging configuration
Ignore some standard activemq shutdown exceptions

Modified:
    geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/var/log/server-log4j.properties
    geronimo/server/trunk/modules/geronimo-activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java

Modified: geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/var/log/server-log4j.properties
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/var/log/server-log4j.properties?view=diff&rev=469761&r1=469760&r2=469761
==============================================================================
--- geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/var/log/server-log4j.properties
(original)
+++ geronimo/server/trunk/assemblies/geronimo-boilerplate-minimal/src/main/resources/var/log/server-log4j.properties
Tue Oct 31 19:06:07 2006
@@ -25,7 +25,7 @@
 log4j.appender.CONSOLE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
 
 log4j.appender.FILE=org.apache.log4j.RollingFileAppender
-log4j.appender.FILE.threshold=DEBUG
+log4j.appender.FILE.threshold=INFO
 log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
 log4j.appender.FILE.layout.ConversionPattern=%d{ABSOLUTE} %-5p [%c{1}] %m%n
 
@@ -59,15 +59,8 @@
 log4j.logger.org.apache.jasper.compiler.SmapUtil=WARN
 
 # ActiveMQ
-log4j.logger.org.activemq.ActiveMQConnection=WARN
-log4j.logger.org.activemq.store.jdbc.adapter.DefaultJDBCAdapter=WARN
-log4j.logger.org.activemq.store.jdbc.JDBCPersistenceAdapter=WARN
-log4j.logger.org.activemq.store.journal.JournalPersistenceAdapter=WARN
-log4j.logger.org.activemq.broker.impl.BrokerContainerImpl=WARN
-log4j.logger.org.activemq.broker.impl.BrokerConnectorImpl=WARN
-log4j.logger.org.activemq.transport.tcp.TcpTransportChannel=ERROR
-log4j.logger.org.activemq.transport.tcp.TcpTransportServerChannel=WARN
-log4j.logger.org.activemq.transport.vm.VmTransportServerChannel=WARN
+log4j.logger.org.apache.activemq=WARN
+log4j.logger.org.apache.activemq.broker.jmx.ManagementContext=ERROR
 
 # Don't need so much info on every web page that's rendered
 log4j.logger.org.mortbay=INFO

Modified: geronimo/server/trunk/modules/geronimo-activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java?view=diff&rev=469761&r1=469760&r2=469761
==============================================================================
--- geronimo/server/trunk/modules/geronimo-activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java
(original)
+++ geronimo/server/trunk/modules/geronimo-activemq-gbean/src/main/java/org/apache/activemq/gbean/BrokerServiceGBeanImpl.java
Tue Oct 31 19:06:07 2006
@@ -20,10 +20,12 @@
 import java.net.URI;
 
 import javax.sql.DataSource;
+import javax.jms.JMSException;
 
 import org.apache.activemq.broker.BrokerFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.store.DefaultPersistenceAdapterFactory;
+import org.apache.activemq.transport.TransportDisposedIOException;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.apache.geronimo.connector.outbound.ConnectionFactorySource;
@@ -56,7 +58,7 @@
 
     public BrokerServiceGBeanImpl() {
     }
-    
+
     public synchronized BrokerService getBrokerContainer() {
         return brokerService;
     }
@@ -94,7 +96,14 @@
         if (brokerService != null) {
             BrokerService temp = brokerService;
             brokerService = null;
-            temp.stop();
+            try {
+                temp.stop();
+            } catch (JMSException ignored) {
+                // just a lame exception ActiveMQ likes to throw on shutdown
+                if (!(ignored.getCause() instanceof TransportDisposedIOException)) {
+                    throw ignored;
+                }
+            }
         }
     }
 
@@ -104,6 +113,11 @@
             brokerService = null;
             try {
                 temp.stop();
+            } catch (JMSException ignored) {
+                // just a lame exception ActiveMQ likes to throw on shutdown
+                if (!(ignored.getCause() instanceof TransportDisposedIOException)) {
+                    log.warn("Caught while closing due to failure: " + ignored, ignored);
+                }
             } catch (Exception e) {
                 log.warn("Caught while closing due to failure: " + e, e);
             }



Mime
View raw message