User: oberg   
  Date: 00/12/07 07:45:00

  Modified:    src/main/org/jboss/logging ConsoleLogging.java
                        ConsoleLoggingMBean.java FileLogging.java
                        FileLoggingMBean.java Log.java LogStream.java
                        LogWriter.java Logger.java LoggerMBean.java
                        ViewerLogging.java ViewerLoggingMBean.java
  Log:
  Changed configuration scheme (lots of changes to jboss.conf, jboss.jcml, 
org.jboss.Main)
  Added ServiceControl
  Changed jBoss -> JBoss
  Changed GPL -> LGPL
  Added jaxp/parser
  Updated services to have default constructors
  
  Revision  Changes    Path
  1.6       +25 -25    jboss/src/main/org/jboss/logging/ConsoleLogging.java
  
  Index: ConsoleLogging.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/logging/ConsoleLogging.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ConsoleLogging.java       2000/11/23 14:58:14     1.5
  +++ ConsoleLogging.java       2000/12/07 15:44:58     1.6
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.logging;
  @@ -21,11 +21,10 @@
    *      
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.5 $
  + *   @version $Revision: 1.6 $
    */
   public class ConsoleLogging
  -   extends ServiceMBeanSupport
  -   implements ConsoleLoggingMBean, NotificationListener
  +   implements ConsoleLoggingMBean, NotificationListener, MBeanRegistration
   {
      // Constants -----------------------------------------------------
       
  @@ -41,7 +40,6 @@
      String filter = "Information,Debug,Warning,Error";
      
      ObjectName name;
  -   MBeanServer server;
      
      // Static --------------------------------------------------------
   
  @@ -75,36 +73,38 @@
            out.println(msgFmt.format(args));
      }
      
  -   // Service implementation ------------------------------
  -   public ObjectName getObjectName(MBeanServer server, ObjectName name)
  -      throws javax.management.MalformedObjectNameException
  +   // MBeanRegistration implementation ------------------------------
  +   public ObjectName preRegister(MBeanServer server, ObjectName name)
  +      throws java.lang.Exception
      {
  -      this.server = server;
  -      return name == null ? new ObjectName(OBJECT_NAME) : name;
  -   }
  +      NotificationFilterSupport f = new NotificationFilterSupport();
  +      StringTokenizer types = new StringTokenizer(filter, ",");
  +      while (types.hasMoreTokens())
  +         f.enableType(types.nextToken());
      
  -   public String getName()
  -   {
  -      return "Console logging";
  +      server.addNotificationListener(new 
ObjectName(server.getDefaultDomain(),"service","Log"),this,f,null);
  +   
  +      return name == null ? new ObjectName(OBJECT_NAME) : name;
      }
      
  -   public void initService()
  -      throws Exception
  +   public void postRegister(java.lang.Boolean registrationDone) 
      {
         out = System.out;
         err = System.err;
  -      
  -      NotificationFilterSupport f = new NotificationFilterSupport();
  -      StringTokenizer types = new StringTokenizer(filter, ",");
  -      while (types.hasMoreTokens())
  -         f.enableType(types.nextToken());
  -      
  -      server.addNotificationListener(new 
ObjectName(server.getDefaultDomain(),"service","Log"),this,f,null);
  -      
  +   
         LogStream outLog = new LogStream("Information");
         LogStream errLog = new LogStream("Error");
         System.setOut(outLog);
         System.setErr(errLog);
  +   }
  +   
  +   public void preDeregister()
  +      throws java.lang.Exception 
  +   {
  +   }
  +   
  +   public void postDeregister() 
  +   {
      }
   }
   
  
  
  
  1.3       +3 -3      jboss/src/main/org/jboss/logging/ConsoleLoggingMBean.java
  
  Index: ConsoleLoggingMBean.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/logging/ConsoleLoggingMBean.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ConsoleLoggingMBean.java  2000/11/07 12:27:45     1.2
  +++ ConsoleLoggingMBean.java  2000/12/07 15:44:58     1.3
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.logging;
  @@ -10,7 +10,7 @@
    *      
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.2 $
  + *   @version $Revision: 1.3 $
    */
   public interface ConsoleLoggingMBean
   {
  
  
  
  1.11      +18 -23    jboss/src/main/org/jboss/logging/FileLogging.java
  
  Index: FileLogging.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/logging/FileLogging.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- FileLogging.java  2000/11/23 14:58:14     1.10
  +++ FileLogging.java  2000/12/07 15:44:58     1.11
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.logging;
  @@ -22,11 +22,10 @@
    *
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.10 $
  + *   @version $Revision: 1.11 $
    */
   public class FileLogging
  -   extends ServiceMBeanSupport
  -   implements FileLoggingMBean, NotificationListener
  +   implements FileLoggingMBean, NotificationListener, MBeanRegistration
   {
      // Constants -----------------------------------------------------
   
  @@ -42,9 +41,6 @@
      String sources;
      boolean append;
      
  -   ObjectName name;
  -   MBeanServer server;
  -
      // Static --------------------------------------------------------
   
      // Constructors --------------------------------------------------
  @@ -119,30 +115,29 @@
         }
      }
   
  -   // ServiceMBeanSupport implementation ----------------------------
  -   public ObjectName getObjectName(MBeanServer server, ObjectName name)
  -      throws javax.management.MalformedObjectNameException
  +   // MBeanRegistration implementation ------------------------------
  +   public ObjectName preRegister(MBeanServer server, ObjectName name)
  +      throws java.lang.Exception
      {
  -      this.server = server;
  -      this.name = name == null ? new ObjectName(OBJECT_NAME + (sources == null ? "" 
: ",sources=" + sources))
  +      openLogFile();
  +      server.addNotificationListener(new 
ObjectName(server.getDefaultDomain(),"service","Log"),this,null,null);
  +      return name == null ? new ObjectName(OBJECT_NAME + (sources == null ? "" : 
",sources=" + sources))
                                  : name;
  -      return this.name;
      }
      
  -   public String getName()
  +   public void postRegister(java.lang.Boolean registrationDone) 
      {
  -      return "File logging";
      }
      
  -   public void initService()
  -      throws java.lang.Exception
  +   public void preDeregister()
  +      throws java.lang.Exception 
      {
  -      String objectName;
  -
  -      openLogFile();
  -      server.addNotificationListener(new 
ObjectName(server.getDefaultDomain(),"service","Log"),this,null,null);
      }
  -
  +   
  +   public void postDeregister() 
  +   {
  +   }
  +   
      // Private -------------------------------------------------------
      private void openLogFile() 
         throws FileNotFoundException 
  
  
  
  1.4       +3 -3      jboss/src/main/org/jboss/logging/FileLoggingMBean.java
  
  Index: FileLoggingMBean.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/logging/FileLoggingMBean.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- FileLoggingMBean.java     2000/11/07 12:26:48     1.3
  +++ FileLoggingMBean.java     2000/12/07 15:44:58     1.4
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.logging;
  @@ -10,7 +10,7 @@
    *
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
    */
   public interface FileLoggingMBean
   {
  
  
  
  1.5       +3 -3      jboss/src/main/org/jboss/logging/Log.java
  
  Index: Log.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/logging/Log.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Log.java  2000/09/29 22:05:45     1.4
  +++ Log.java  2000/12/07 15:44:58     1.5
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.logging;
  @@ -17,7 +17,7 @@
    *      
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.4 $
  + *   @version $Revision: 1.5 $
    */
   public class Log
   {
  
  
  
  1.4       +3 -3      jboss/src/main/org/jboss/logging/LogStream.java
  
  Index: LogStream.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/logging/LogStream.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- LogStream.java    2000/10/19 14:26:52     1.3
  +++ LogStream.java    2000/12/07 15:44:58     1.4
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.logging;
  @@ -17,7 +17,7 @@
    *      
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
    */
   public class LogStream
      extends PrintStream
  
  
  
  1.2       +2 -2      jboss/src/main/org/jboss/logging/LogWriter.java
  
  Index: LogWriter.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/logging/LogWriter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LogWriter.java    2000/06/02 13:48:39     1.1
  +++ LogWriter.java    2000/12/07 15:44:58     1.2
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.logging;
  
  
  
  1.7       +4 -4      jboss/src/main/org/jboss/logging/Logger.java
  
  Index: Logger.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/logging/Logger.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- Logger.java       2000/11/23 13:22:28     1.6
  +++ Logger.java       2000/12/07 15:44:58     1.7
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.logging;
  @@ -17,7 +17,7 @@
    *      
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.6 $
  + *   @version $Revision: 1.7 $
    */
   public class Logger
      extends NotificationBroadcasterSupport
  @@ -111,7 +111,7 @@
      public ObjectName preRegister(MBeanServer server, ObjectName name)
         throws java.lang.Exception
      {
  -      return new ObjectName("DefaultDomain:service=Log");
  +      return name == null ? new ObjectName("DefaultDomain:service=Log") : name;
      }
      
      public void postRegister(java.lang.Boolean registrationDone) 
  
  
  
  1.2       +3 -3      jboss/src/main/org/jboss/logging/LoggerMBean.java
  
  Index: LoggerMBean.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/logging/LoggerMBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LoggerMBean.java  2000/04/22 14:30:13     1.1
  +++ LoggerMBean.java  2000/12/07 15:44:58     1.2
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.logging;
  @@ -17,7 +17,7 @@
    *      
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.1 $
  + *   @version $Revision: 1.2 $
    */
   public interface LoggerMBean
   {
  
  
  
  1.4       +3 -3      jboss/src/main/org/jboss/logging/ViewerLogging.java
  
  Index: ViewerLogging.java
  ===================================================================
  RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/logging/ViewerLogging.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ViewerLogging.java        2000/09/15 21:14:14     1.3
  +++ ViewerLogging.java        2000/12/07 15:44:58     1.4
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.logging;
  @@ -18,7 +18,7 @@
    *
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.3 $
  + *   @version $Revision: 1.4 $
    */
   public class ViewerLogging
      implements ViewerLoggingMBean, MBeanRegistration, NotificationListener
  
  
  
  1.2       +3 -3      jboss/src/main/org/jboss/logging/ViewerLoggingMBean.java
  
  Index: ViewerLoggingMBean.java
  ===================================================================
  RCS file: 
/products/cvs/ejboss/jboss/src/main/org/jboss/logging/ViewerLoggingMBean.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ViewerLoggingMBean.java   2000/04/22 14:30:13     1.1
  +++ ViewerLoggingMBean.java   2000/12/07 15:44:59     1.2
  @@ -1,7 +1,7 @@
   /*
  - * jBoss, the OpenSource EJB server
  + * JBoss, the OpenSource EJB server
    *
  - * Distributable under GPL license.
  + * Distributable under LGPL license.
    * See terms of license at gnu.org.
    */
   package org.jboss.logging;
  @@ -10,7 +10,7 @@
    *      
    *   @see <related>
    *   @author Rickard �berg ([EMAIL PROTECTED])
  - *   @version $Revision: 1.1 $
  + *   @version $Revision: 1.2 $
    */
   public interface ViewerLoggingMBean
   {
  
  
  

Reply via email to