Ejemplo n.º 1
0
 @Override
 public void preDestroy() {
   try {
     if (mom != null) {
       mom.close();
     }
   } catch (IOException ioe) {
     // ignored nothing much can be done
   }
 }
 private void unregisterGmbal(StatsProviderRegistryElement spre) {
   // unregister the statsProvider from Gmbal
   ManagedObjectManager mom = spre.getManagedObjectManager();
   if (mom != null) {
     mom.unregister(spre.getStatsProvider());
     try {
       mom.close();
     } catch (IOException ioe) {
       logger.log(Level.SEVERE, gmbalUnRegistrationFailed, ioe);
     }
     spre.setManagedObjectManager(null);
   }
 }