Package javax.management

Examples of javax.management.RuntimeMBeanException


   }

   private void rethrowAsMBeanException(Throwable t) throws MBeanException
   {
      if (t instanceof RuntimeException)
         throw new RuntimeMBeanException((RuntimeException) t);
      else if (t instanceof Error)
         throw new RuntimeErrorException((Error) t);
      else
         throw new MBeanException((Exception) t);
   }
View Full Code Here


   }

   private void rethrowAsRuntimeMBeanException(Throwable t)
   {
      if (t instanceof RuntimeException)
         throw new RuntimeMBeanException((RuntimeException) t);
      else if (t instanceof Error)
         throw new RuntimeErrorException((Error) t);
      else
         throw new RuntimeMBeanException(new RuntimeException("Unhandled exception", t));
   }
View Full Code Here

/*     */               catch (Exception e)
/*     */               {
/* 343 */                 if (invokedPreRegister == true)
/*     */                 {
/* 345 */                   if ((e instanceof RuntimeException)) {
/* 346 */                     throw new RuntimeMBeanException((RuntimeException)e);
/*     */                   }
/* 348 */                   throw new MBeanRegistrationException(e);
/*     */                 }
/*     */               }
/*     */             }
/* 352 */             AbstractMBeanInvoker.setMBeanEntry(null); return localServerObjectInstance1;
/*     */           }
/*     */           catch (Throwable t)
/*     */           {
/* 262 */             if ((object instanceof ClassLoader)) {
/* 263 */               this.loaderRepository.removeClassLoader((ClassLoader)object);
/*     */             }
/* 265 */             throw t;
/*     */           }
/*     */
/*     */         }
/*     */         catch (Throwable t)
/*     */         {
/* 271 */           remove(regName);
/* 272 */           throw t;
/*     */         }
/*     */
/*     */       }
/*     */       catch (NotCompliantMBeanException e)
/*     */       {
/* 278 */         throw e;
/*     */       }
/*     */       catch (InstanceAlreadyExistsException e)
/*     */       {
/* 283 */         throw e;
/*     */       }
/*     */       catch (Throwable t)
/*     */       {
/* 288 */         log.error("Unexpected Exception:", t);
/* 289 */         throw t;
/*     */       }
/*     */     }
/*     */     catch (NotCompliantMBeanException e)
/*     */     {
/* 294 */       registrationDone = false;
/* 295 */       throw e;
/*     */     }
/*     */     catch (InstanceAlreadyExistsException e)
/*     */     {
/* 300 */       registrationDone = false;
/* 301 */       throw e;
/*     */     }
/*     */     catch (MBeanRegistrationException e)
/*     */     {
/* 306 */       registrationDone = false;
/* 307 */       log.warn(e.toString());
/* 308 */       throw e;
/*     */     }
/*     */     catch (RuntimeOperationsException e)
/*     */     {
/* 313 */       registrationDone = false;
/* 314 */       throw e;
/*     */     }
/*     */     catch (Exception ex)
/*     */     {
/* 319 */       registrationDone = false;
/* 320 */       ncex = new NotCompliantMBeanException("Cannot register MBean: " + name);
/* 321 */       ncex.initCause(ex);
/* 322 */       throw ncex;
/*     */     }
/*     */     catch (Throwable t)
/*     */     {
/* 327 */       log.error("Cannot register MBean", t);
/* 328 */       registrationDone = false;
/* 329 */       NotCompliantMBeanException ncex = null;
/*     */       return ncex;
/*     */     }
/*     */     finally
/*     */     {
/* 334 */       if (invoker != null)
/*     */       {
/*     */         try
/*     */         {
/* 338 */           invoker.postRegister(new Boolean(registrationDone));
/*     */         }
/*     */         catch (Exception e)
/*     */         {
/* 343 */           if (invokedPreRegister == true)
/*     */           {
/* 345 */             if ((e instanceof RuntimeException)) {
/* 346 */               throw new RuntimeMBeanException((RuntimeException)e);
/*     */             }
/* 348 */             throw new MBeanRegistrationException(e);
/*     */           }
/*     */         }
/*     */       }
View Full Code Here

/* 111 */     if ((e instanceof Error)) {
/* 112 */       throw new RuntimeErrorException((Error)e);
/*     */     }
/*     */
/* 115 */     if ((e instanceof RuntimeException))
/* 116 */       throw new RuntimeMBeanException((RuntimeException)e);
/*     */   }
View Full Code Here

/*      */     {
/*  712 */       ((NotificationBroadcaster)this.resource).addNotificationListener(listener, filter, handback);
/*      */     }
/*      */     else
/*      */     {
/*  716 */       throw new RuntimeMBeanException(new IllegalArgumentException("Target XXX is not a notification broadcaster"));
/*      */     }
/*      */   }
View Full Code Here

/*      */     {
/*  734 */       ((NotificationBroadcaster)this.resource).removeNotificationListener(listener);
/*      */     }
/*      */     else
/*      */     {
/*  738 */       throw new RuntimeMBeanException(new IllegalArgumentException("Target XXX is not a notification broadcaster"));
/*      */     }
/*      */   }
View Full Code Here

/*      */     {
/*  768 */       removeNotificationListener(listener);
/*      */     }
/*      */     else
/*      */     {
/*  772 */       throw new RuntimeMBeanException(new IllegalArgumentException("Target XXX is not a notification emitter"));
/*      */     }
/*      */   }
View Full Code Here

/*      */
/*      */   private void rethrowAsMBeanException(Throwable t)
/*      */     throws MBeanException
/*      */   {
/* 1280 */     if ((t instanceof RuntimeException))
/* 1281 */       throw new RuntimeMBeanException((RuntimeException)t);
/* 1282 */     if ((t instanceof Error)) {
/* 1283 */       throw new RuntimeErrorException((Error)t);
/*      */     }
/* 1285 */     throw new MBeanException((Exception)t);
/*      */   }
View Full Code Here

/*      */   }
/*      */
/*      */   private void rethrowAsRuntimeMBeanException(Throwable t)
/*      */   {
/* 1290 */     if ((t instanceof RuntimeException))
/* 1291 */       throw new RuntimeMBeanException((RuntimeException)t);
/* 1292 */     if ((t instanceof Error)) {
/* 1293 */       throw new RuntimeErrorException((Error)t);
/*      */     }
/* 1295 */     throw new RuntimeMBeanException(new RuntimeException("Unhandled exception", t));
/*      */   }
View Full Code Here

/*     */     catch (InvocationTargetException e)
/*     */     {
/* 158 */       Throwable t = e.getTargetException();
/* 159 */       if ((t instanceof RuntimeException))
/*     */       {
/* 161 */         throw new RuntimeMBeanException((RuntimeException)t, "RuntimeException in MBean when getting attribute '" + attribute + "'");
/*     */       }
/* 163 */       if ((t instanceof Exception))
/*     */       {
/* 165 */         throw new MBeanException((Exception)t, "Exception in MBean when getting attribute '" + attribute + "'");
/*     */       }
View Full Code Here

TOP

Related Classes of javax.management.RuntimeMBeanException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.