public synchronized DunningConfig storeDunningConfig(
      DunningConfig dunningConfig,
      boolean get,
      String[] fetchGroups,
      int maxFetchDepth,
      ProgressMonitor monitor) {
    if (dunningConfig == null)
      throw new NullPointerException("DunningConfig to save must not be null");
    monitor.beginTask("Storing dunningConfig: " + dunningConfig.getDunningConfigID(), 3);
    try {
      DunningManagerRemote im =
          JFireEjb3Factory.getRemoteBean(
              DunningManagerRemote.class,
              GlobalSecurityReflector.sharedInstance().getInitialContextProperties());
      monitor.worked(1);

      DunningConfig result = im.storeDunningConfig(dunningConfig, get, fetchGroups, maxFetchDepth);
      if (result != null) getCache().put(null, result, fetchGroups, maxFetchDepth);

      monitor.worked(1);
      monitor.done();
      return result;
    } catch (Exception e) {
      monitor.done();
      throw new RuntimeException(e);
    }
  }
  @Override
  /** {@inheritDoc} */
  protected synchronized Collection<DunningConfig> retrieveJDOObjects(
      Set<DunningConfigID> dunningConfigIDs,
      String[] fetchGroups,
      int maxFetchDepth,
      ProgressMonitor monitor)
      throws Exception {

    monitor.beginTask("Loading DunningConfigs", 1);
    try {
      DunningManagerRemote im =
          JFireEjb3Factory.getRemoteBean(
              DunningManagerRemote.class,
              GlobalSecurityReflector.sharedInstance().getInitialContextProperties());
      return im.getDunningConfigs(dunningConfigIDs, fetchGroups, maxFetchDepth);
    } catch (Exception e) {
      monitor.setCanceled(true);
      throw e;

    } finally {
      monitor.worked(1);
      monitor.done();
    }
  }
 public synchronized Collection<DunningConfig> getDunningConfigs(
     String[] fetchGroups, int maxFetchDepth, ProgressMonitor monitor) {
   monitor.beginTask("Loading dunningConfigs", 1);
   try {
     DunningManagerRemote im =
         JFireEjb3Factory.getRemoteBean(
             DunningManagerRemote.class,
             GlobalSecurityReflector.sharedInstance().getInitialContextProperties());
     Set<DunningConfigID> is = im.getDunningConfigIDs();
     monitor.done();
     return getJDOObjects(null, is, fetchGroups, maxFetchDepth, monitor);
   } catch (Exception e) {
     throw new RuntimeException(e);
   }
 }