1 23 24 package com.sun.ejb.base.sfsb.store; 25 26 import java.util.logging.Logger ; 27 import java.util.logging.Level ; 28 import com.sun.logging.LogDomains; 29 30 import com.sun.ejb.spi.sfsb.store.SFSBTxStoreManager; 31 import com.sun.ejb.spi.sfsb.store.SFSBStoreManager; 32 import com.sun.ejb.spi.sfsb.store.SFSBBeanState; 33 import com.sun.ejb.spi.sfsb.store.SFSBStoreManagerException; 34 35 36 45 public class FileTxStoreManager 46 implements SFSBTxStoreManager 47 { 48 49 private static final Level TRACE_LEVEL = Level.FINE; 50 51 protected static Logger _logger = 52 LogDomains.getLogger(LogDomains.EJB_LOGGER); 53 54 public FileTxStoreManager() { 55 } 56 57 public void checkpointSave(SFSBBeanState[] beanStates) 58 throws SFSBStoreManagerException 59 { 60 int sz = beanStates.length; 61 for (int i=0; i<sz; i++) { 62 SFSBStoreManager manager = beanStates[i].getSFSBStoreManager(); 63 try { 64 if (manager == null) { 65 _logger.log(Level.WARNING, 66 "StoreManager is null. Cannot checkpoint"); 67 } else { 68 manager.checkpointSave(beanStates[i]); 69 if (_logger.isLoggable(TRACE_LEVEL)) { 70 _logger.log(TRACE_LEVEL, "Successfully txCheckpointed " 71 + beanStates.length + " beans..."); 72 } 73 } 74 } catch (SFSBStoreManagerException smEx) { 75 _logger.log(Level.WARNING, 76 "StoreManagerException during checkpointSave", smEx); 77 } catch (Throwable th) { 78 _logger.log(Level.WARNING, 79 "Exception during checkpointSave", th); 80 } 81 } 82 } 83 84 } 85 | Popular Tags |