FileDocCategorySizeDatePackage
FileTxStoreManager.javaAPI DocGlassfish v2 API3683Fri May 04 22:32:56 BST 2007com.sun.ejb.base.sfsb.store

FileTxStoreManager

public class FileTxStoreManager extends Object implements com.sun.ejb.spi.sfsb.store.SFSBTxStoreManager
A SFSBTxStoreManager that CANNOT save multiple SFSBBeanStates as a single transactional unit (Example file system). This implementation simply stores each BeanState separately by calling the appropriate StoreManager's checkpointSave method
author
Mahesh Kannan

Fields Summary
private static final Level
TRACE_LEVEL
protected static final Logger
_logger
Constructors Summary
public FileTxStoreManager()


      
    
Methods Summary
public voidcheckpointSave(com.sun.ejb.spi.sfsb.store.SFSBBeanState[] beanStates)

	int sz = beanStates.length;
	for (int i=0; i<sz; i++) {
	    SFSBStoreManager manager = beanStates[i].getSFSBStoreManager();
	    try {
		if (manager == null) {
		    _logger.log(Level.WARNING,
			"StoreManager is null. Cannot checkpoint");
		} else {
		    manager.checkpointSave(beanStates[i]);
		    if (_logger.isLoggable(TRACE_LEVEL)) {
			_logger.log(TRACE_LEVEL, "Successfully txCheckpointed "
			    + beanStates.length + " beans...");
		    }
		}
	    } catch (SFSBStoreManagerException smEx) {
		_logger.log(Level.WARNING,
			"StoreManagerException during checkpointSave", smEx);
	    } catch (Throwable th) {
		_logger.log(Level.WARNING,
			"Exception during checkpointSave", th);
	    }
	}