[jboss-cvs] JBossAS SVN: r91804 - in trunk: connector/src/main/org/jboss/resource/connectionmanager and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Jul 29 22:44:32 EDT 2009


Author: david.lloyd at jboss.com
Date: 2009-07-29 22:44:31 -0400 (Wed, 29 Jul 2009)
New Revision: 91804

Modified:
   trunk/component-matrix/pom.xml
   trunk/connector/src/main/org/jboss/resource/connectionmanager/BaseConnectionManager2.java
   trunk/varia/src/main/org/jboss/monitor/services/ActiveAlarmTable.java
   trunk/varia/src/main/org/jboss/monitor/services/NotificationListener.java
Log:
JBAS-7136, JBAS-7135, JBAS-7133 - two logging fixes plus complete i18n support

Modified: trunk/component-matrix/pom.xml
===================================================================
--- trunk/component-matrix/pom.xml	2009-07-30 02:43:51 UTC (rev 91803)
+++ trunk/component-matrix/pom.xml	2009-07-30 02:44:31 UTC (rev 91804)
@@ -81,8 +81,8 @@
     <version.org.jboss.integration>5.1.0.SP1</version.org.jboss.integration>
     <version.org.jboss.jbossxb>2.0.1.GA</version.org.jboss.jbossxb>
     <version.org.jboss.jpa>1.0.0</version.org.jboss.jpa>
-    <version.org.jboss.logging>2.1.0.GA</version.org.jboss.logging>
-    <version.org.jboss.logmanager>1.1.0.CR5</version.org.jboss.logmanager>
+    <version.org.jboss.logging>2.2.0.CR1</version.org.jboss.logging>
+    <version.org.jboss.logmanager>1.1.0.CR6</version.org.jboss.logmanager>
     <version.org.jboss.man>2.1.1.CR1</version.org.jboss.man>
     <version.org.jboss.mdr>2.0.2.GA</version.org.jboss.mdr>
     <version.org.jboss.metadata>1.0.1.GA</version.org.jboss.metadata>
@@ -551,13 +551,13 @@
       <dependency>
         <groupId>org.jboss.logging</groupId>
         <artifactId>jboss-logging-logmanager</artifactId>
-        <version>1.0.0.CR2</version>
+        <version>${version.org.jboss.logging}</version>
       </dependency>
 
       <dependency>
         <groupId>org.jboss.logging</groupId>
         <artifactId>logging-service-metadata</artifactId>
-        <version>1.0.0.CR2</version>
+        <version>1.0.0.CR3</version>
       </dependency>
 
       <dependency>

Modified: trunk/connector/src/main/org/jboss/resource/connectionmanager/BaseConnectionManager2.java
===================================================================
--- trunk/connector/src/main/org/jboss/resource/connectionmanager/BaseConnectionManager2.java	2009-07-30 02:43:51 UTC (rev 91803)
+++ trunk/connector/src/main/org/jboss/resource/connectionmanager/BaseConnectionManager2.java	2009-07-30 02:44:31 UTC (rev 91804)
@@ -328,7 +328,7 @@
       // Give it somewhere to tell people things
       String categoryName = poolingStrategy.getManagedConnectionFactory().getClass().getName() + "." + jndiName;
       Logger log = Logger.getLogger(categoryName);
-      PrintWriter logWriter = new LoggerPluginWriter(log.getLoggerPlugin());
+      PrintWriter logWriter = new LoggerPluginWriter(log.getLoggerPluginInstance());
       try
       {
          poolingStrategy.getManagedConnectionFactory().setLogWriter(logWriter);

Modified: trunk/varia/src/main/org/jboss/monitor/services/ActiveAlarmTable.java
===================================================================
--- trunk/varia/src/main/org/jboss/monitor/services/ActiveAlarmTable.java	2009-07-30 02:43:51 UTC (rev 91803)
+++ trunk/varia/src/main/org/jboss/monitor/services/ActiveAlarmTable.java	2009-07-30 02:44:31 UTC (rev 91804)
@@ -23,7 +23,7 @@
 
 import javax.management.Notification;
 
-import org.jboss.logging.DynamicLogger;
+import org.jboss.logging.Logger;
 import org.jboss.monitor.alarm.Alarm;
 import org.jboss.monitor.alarm.AlarmHelper;
 import org.jboss.monitor.alarm.AlarmNotification;
@@ -46,14 +46,13 @@
 public class ActiveAlarmTable extends ListenerServiceMBeanSupport
    implements ActiveAlarmTableMBean
 {
-   /** DynamicLogger */
-   protected static final DynamicLogger log  = DynamicLogger.getDynamicLogger(ActiveAlarmTable.class);
-   
    // Private Data --------------------------------------------------
     
    /** Number of processed JMX notifications */
    private SynchronizedLong notificationCount;
    
+   private volatile Logger.Level level = Logger.Level.INFO;
+
    /** alarm table */
    AlarmTable almtab = new AlarmTable(this);
       
@@ -128,7 +127,7 @@
     */
    public void setLogLevel(String logLevel)
    {
-      log.setLogLevelAsString(logLevel);
+      level = Logger.Level.valueOf(logLevel);
    }
    
    /**
@@ -136,7 +135,7 @@
     */
    public String getLogLevel()
    {
-      return log.getLogLevelAsString();
+      return level.name();
    }
    
    // Operations ----------------------------------------------------
@@ -299,7 +298,7 @@
     */
    public void handleNotification2(Notification notification, Object handback)
    {
-      log.log("Got notification (#" + Long.toString(this.notificationCount.increment())
+      log.log(level, "Got notification (#" + Long.toString(this.notificationCount.increment())
              + "): " + notification + ", handback: " + handback);
       
       almtab.update(notification);

Modified: trunk/varia/src/main/org/jboss/monitor/services/NotificationListener.java
===================================================================
--- trunk/varia/src/main/org/jboss/monitor/services/NotificationListener.java	2009-07-30 02:43:51 UTC (rev 91803)
+++ trunk/varia/src/main/org/jboss/monitor/services/NotificationListener.java	2009-07-30 02:44:31 UTC (rev 91804)
@@ -24,7 +24,7 @@
 import javax.management.Notification;
 import javax.management.ObjectName;
 
-import org.jboss.logging.DynamicLogger;
+import org.jboss.logging.Logger;
 import org.jboss.system.ListenerServiceMBeanSupport;
 
 import EDU.oswego.cs.dl.util.concurrent.SynchronizedLong;
@@ -54,11 +54,10 @@
    /** Listener MBean */
    private ObjectName notificationListener;
    
+   private volatile Logger.Level level = Logger.Level.INFO;
+
    // Protected Data ------------------------------------------------
    
-   /** The dynamic logger */
-   protected DynamicLogger log = DynamicLogger.getDynamicLogger(super.log.getName());
-   
    // Constructors --------------------------------------------------
    
    /**
@@ -69,7 +68,6 @@
       notificationCount = new SynchronizedLong(0);
       dynamicSubscriptions = true;
       notificationListener = null;
-      log.setLogLevel(DynamicLogger.LOG_LEVEL_INFO);
    }
    
    // NotificationListenerMBean Implementation -----------------------
@@ -131,7 +129,7 @@
     */
    public void setLogLevel(String logLevel)
    {
-      log.setLogLevelAsString(logLevel);
+      level = Logger.Level.valueOf(logLevel);
    }
    
    /**
@@ -141,7 +139,7 @@
     */
    public String getLogLevel()
    {
-      return log.getLogLevelAsString();
+      return level.name();
    }
    
    // Lifecycle control (ServiceMBeanSupport) -----------------------
@@ -175,7 +173,7 @@
     */
    public void handleNotification2(Notification notification, Object handback)
    {
-      log.log("Got notification (#" + Long.toString(this.notificationCount.increment())
+      log.log(level, "Got notification (#" + Long.toString(this.notificationCount.increment())
              + "): " + notification + ", handback: " + handback);
    }
 }




More information about the jboss-cvs-commits mailing list