garbageCollectionTime += time;
}
}
int freeMemoryAfter = (int) (Runtime.getRuntime().freeMemory());
int totalMemoryAfter = (int) (Runtime.getRuntime().totalMemory());
InvocationAuditReport finished = this.waitingReports.get(event.getInvocationNumber());
if (finished != null) {
finished.setFreeMemoryAfter(freeMemoryAfter);
finished.setTotalMemoryAfter(totalMemoryAfter);
if (finished.getBusinessMethod().equals(ON_MESSAGE_METHOD)) {
finished.setMethodReturn(event.getResult());
} else {
try {
finished.setMethodReturn(((EJBResponse) event.getResult()).getValue());
} catch (Exception e) {
finished.setMethodReturn(null);
}
}
finished.setRequestStop(stop);
finished.setSweepMarkTime(totalGarbageCollections);
finished.setScavengeTime(garbageCollectionTime);
this.waitingReports.remove(event.getInvocationNumber());
return finished;
}
return null;
}