public String[] getStatisticNames() {
   Stats stats = delegate.getStats();
   if (stats != null) {
     return stats.getStatisticNames();
   } else {
     return null;
   }
 }
  public Statistic[] getStatistics() {
    Stats stats = delegate.getStats();
    if (stats == null) {
      return null;
    }

    Statistic[] statArray = stats.getStatistics();
    boolean isSerializable = checkSerializability(statArray);
    if (isSerializable) {
      final Statistic[] hackedArray = StatisticWorkaround.populateDescriptions(statArray);
      return hackedArray;
    } else return null;
  }
  private MBeanOperationInfo[] getOperationInfos() {

    final ArrayList opInfo = new ArrayList();

    opInfo.add(getChildrenInfo());
    opInfo.add(getNameInfo());
    opInfo.add(getTypeInfo());
    // Add the additional ops only for StatsHolders that have an actual Stats object
    // associated with them
    if (delegate.getStats() != null) {
      opInfo.add(getStatisticNameInfo());
      opInfo.add(getStatsInfo());
    }

    MBeanOperationInfo[] mos = new MBeanOperationInfo[opInfo.size()];
    mos = (MBeanOperationInfo[]) opInfo.toArray(mos);

    // if we are dealing with JTAStats, we need to add the additional
    // operations freeze, unfreeze & rollback to the MBeanOerationInfo
    if (isJta()) return (getJTAOperationInfo(mos));

    return (mos);
  }
 StatsHolderMBeanImpl(StatsHolder delegate) {
   assert (delegate != null);
   this.delegate = delegate;
   this.mediator = new StatsMediatorImpl(delegate.getStats(), delegate.getStatsClass());
   changeState(INITIALIZED);
 }