User: juhalindfors
  Date: 02/03/20 10:26:32

  Modified:    src/main/org/jboss/mx/server/registry
                        BasicMBeanRegistry.java
  Log:
  merge RelMX_1_0_0_8 to RelMX_1_0_0_10 to dev branch
  
  Revision  Changes    Path
  1.12      +19 -9     
jmx/src/main/org/jboss/mx/server/registry/BasicMBeanRegistry.java
  
  Index: BasicMBeanRegistry.java
  ===================================================================
  RCS file: 
/cvsroot/jboss/jmx/src/main/org/jboss/mx/server/registry/BasicMBeanRegistry.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- BasicMBeanRegistry.java   15 Mar 2002 20:26:40 -0000      1.11
  +++ BasicMBeanRegistry.java   20 Mar 2002 18:26:32 -0000      1.12
  @@ -218,19 +218,22 @@
                  // if the MBean throws MBeanRegistrationException, don't rewrap it
                  if (e instanceof MBeanRegistrationException)
                  {
  -                  e.fillInStackTrace();
                     throw e;
                  }
                  
  -               throw new MBeanRegistrationException(e, "preRegister() failed: " + 
e.toString());
  +               throw new MBeanRegistrationException(e, 
  +                     "preRegister() failed " +
  +                     "[ObjectName='" + name + 
  +                     "', Class=" + object.getClass().getName() +
  +                     " (" + object + ")]"
  +               );
               }
               catch (Throwable t)
               {
                  // we can't wrap errors with MBeanRegistrationException
                  
  -               log.debug("preRegister() failed: ", t);
  +               log.warn("preRegister() failed for " + name + ": ", t);
                  
  -               t.fillInStackTrace();
                  throw t;
               }
            }
  @@ -273,7 +276,6 @@
                     if (object instanceof ClassLoader)
                        loaderRepository.removeClassLoader((ClassLoader)object);
                        
  -                  t.fillInStackTrace();
                     throw t;
                  }
               }
  @@ -282,7 +284,6 @@
                  // Problem, remove the mbean from the registry
                  remove(regName);
                  
  -               t.fillInStackTrace();
                  throw t;
               }
            }
  @@ -296,7 +297,6 @@
               // Something is broken
               log.error("Unexpected Exception:", t);
               
  -            t.fillInStackTrace();
               throw t;
            }
         }
  @@ -310,8 +310,18 @@
         {
            // The MBean cancelled the registration
            registrationDone = false;
  +       
  +         // FIXME: the logs below should probably be of type WARN as an exception
  +         //        from within the bean's preRegister() is most likely unintentional
  +         //        and indicates a coding error or unsatisfied dependency, etc --
  +         //        debug for now since we're dumping everything on the console.... 
(jpl)
  +         log.debug("preRegister() failed " +
  +                  "[ObjectName='"  + name +
  +                  "', Class=" + object.getClass().getName() + 
  +                  " (" + object + ")]"
  +         );
  +         log.debug("Target Exception: ", e.getTargetException());
            
  -         e.fillInStackTrace();
            throw e;
         }
         catch (RuntimeOperationsException e)
  
  
  

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to