SessionContextImpl[] contexts = (SessionContextImpl[]) ctxList.toArray(
new SessionContextImpl[0]);
int size = contexts.length;
ArrayList states = new ArrayList(size);
for (int i=0; i<size; i++) {
SessionContextImpl ctx = contexts[i];
StatefulSessionContainer container =
(StatefulSessionContainer) ctx.getContainer();
SFSBBeanState beanState = container.getSFSBBeanState(ctx);
if (beanState != null) {
states.add(beanState);
}
}
if (states.size () > 0) {
SFSBBeanState[] beanStates = (SFSBBeanState[]) states.toArray(
new SFSBBeanState[0]);
try {
SFSBTxStoreManager txStoreManager = SFSBTxStoreManagerFactory.
createSFSBTxStoreManager(_haStoreType);
txStoreManager.checkpointSave(beanStates);
} catch (SFSBStoreManagerException sfsbEx) {
_logger.log(Level.WARNING, "Exception during checkpointSave",
sfsbEx);
} catch (Throwable th) {
_logger.log(Level.WARNING, "Exception during checkpointSave",
th);
}
}
for (int i=0; i<size; i++) {
SessionContextImpl ctx = contexts[i];
StatefulSessionContainer container =
(StatefulSessionContainer) ctx.getContainer();
container.txCheckpointCompleted(ctx);
}