public static XidFactory createXidFactory() { XidFactory xidFactory; xidFactory = new XidFactoryImpl(); return xidFactory; }
public void afterPropertiesSet() throws Exception { if (transactionLog == null) { transactionLog = GeronimoDefaults.createTransactionLog(xidFactory, transactionLogDir); createdTransactionLog = true; } if (xidFactory == null) { xidFactory = new XidFactoryImpl(); } }
public TransactionManagerImpl(int defaultTransactionTimeoutSeconds, XidFactory xidFactory, TransactionLog transactionLog) throws XAException { if (defaultTransactionTimeoutSeconds <= 0) { throw new IllegalArgumentException("defaultTransactionTimeoutSeconds must be positive: attempted value: " + defaultTransactionTimeoutSeconds); } this.defaultTransactionTimeoutMilliseconds = defaultTransactionTimeoutSeconds * 1000; if (transactionLog == null) { this.transactionLog = new UnrecoverableLog(); } else { this.transactionLog = transactionLog; } if (xidFactory != null) { this.xidFactory = xidFactory; } else { this.xidFactory = new XidFactoryImpl(DEFAULT_TM_ID); } recovery = new RecoveryImpl(this.transactionLog, this.xidFactory); recovery.recoverLog(); }
public TransactionManagerImpl(int defaultTransactionTimeoutSeconds, XidFactory xidFactory, TransactionLog transactionLog) throws XAException { if (defaultTransactionTimeoutSeconds <= 0) { throw new IllegalArgumentException("defaultTransactionTimeoutSeconds must be positive: attempted value: " + defaultTransactionTimeoutSeconds); } this.defaultTransactionTimeoutMilliseconds = defaultTransactionTimeoutSeconds * 1000; if (transactionLog == null) { this.transactionLog = new UnrecoverableLog(); } else { this.transactionLog = transactionLog; } if (xidFactory != null) { this.xidFactory = xidFactory; } else { this.xidFactory = new XidFactoryImpl(DEFAULT_TM_ID); } recovery = new RecoveryImpl(this.transactionLog, this.xidFactory); recovery.recoverLog(); }
public TransactionManagerImpl(int defaultTransactionTimeoutSeconds, XidFactory xidFactory, TransactionLog transactionLog) throws XAException { if (defaultTransactionTimeoutSeconds <= 0) { throw new IllegalArgumentException("defaultTransactionTimeoutSeconds must be positive: attempted value: " + defaultTransactionTimeoutSeconds); } this.defaultTransactionTimeoutMilliseconds = defaultTransactionTimeoutSeconds * 1000; if (transactionLog == null) { this.transactionLog = new UnrecoverableLog(); } else { this.transactionLog = transactionLog; } if (xidFactory != null) { this.xidFactory = xidFactory; } else { this.xidFactory = new XidFactoryImpl(DEFAULT_TM_ID); } recovery = new RecoveryImpl(this.transactionLog, this.xidFactory); recovery.recoverLog(); }
public TransactionManagerImpl(int defaultTransactionTimeoutSeconds, XidFactory xidFactory, TransactionLog transactionLog) throws XAException { if (defaultTransactionTimeoutSeconds <= 0) { throw new IllegalArgumentException("defaultTransactionTimeoutSeconds must be positive: attempted value: " + defaultTransactionTimeoutSeconds); } this.defaultTransactionTimeoutMilliseconds = defaultTransactionTimeoutSeconds * 1000; if (transactionLog == null) { this.transactionLog = new UnrecoverableLog(); } else { this.transactionLog = transactionLog; } if (xidFactory != null) { this.xidFactory = xidFactory; } else { this.xidFactory = new XidFactoryImpl(DEFAULT_TM_ID); } recovery = new RecoveryImpl(this); recovery.recoverLog(); }
@Inject public void init(GlobalConfiguration globalCfg) { final String bufferClassName = "org.objectweb.howl.log.BlockLogBuffer"; final int bufferSizeKBytes = 1; final boolean checksumEnabled = true; final boolean adler32Checksum = true; final int flushSleepTimeMilliseconds = 50; final String logFileExt = "log"; final String logFileName = "transaction"; final int maxBlocksPerFile = -1; final int maxLogFiles = 2; final int minBuffers = 4; final int maxBuffers = 0; final int threadsWaitingForceThreshold = -1; final String logFileDir = System.getProperty("java.io.tmpdir"); try { transactionLog = new HOWLLog(bufferClassName, bufferSizeKBytes, checksumEnabled, adler32Checksum, flushSleepTimeMilliseconds, logFileDir, logFileExt, logFileName, maxBlocksPerFile, maxBuffers, maxLogFiles, minBuffers, threadsWaitingForceThreshold, new XidFactoryImpl(), null); ((HOWLLog) transactionLog).doStart(); } catch (Exception e) { throw new RuntimeException(e); } }
this.config = config; this.localResourceSupport = getLocalResourceSupport(); xidFactory = new XidFactoryImpl(); log = getLog(ctx);
SystemInstance.get().setComponent(XAResourceWrapper.class, new GeronimoXAResourceWrapper()); xidFactory = new XidFactoryImpl(tmId == null ? DEFAULT_TM_ID: tmId); txLog = new HOWLLog(bufferClassName == null ? "org.apache.howl.log.BlockLogBuffer" : bufferClassName, bufferSizeKb == 0 ? DEFAULT_BUFFER_SIZE : bufferSizeKb,
SystemInstance.get().setComponent(XAResourceWrapper.class, new GeronimoTransactionManagerFactory.GeronimoXAResourceWrapper()); xidFactory = new XidFactoryImpl(tmId == null ? new byte[]{71, 84, 77, 73, 68} : tmId); txLog = new HOWLLog(bufferClassName == null ? "org.objectweb.howl.log.BlockLogBuffer" : bufferClassName, bufferSizeKb == 0 ? 32 : bufferSizeKb, checksumEnabled, adler32Checksum, flushSleepTimeMilliseconds, logFileDir, logFileExt, logFileName, maxBlocksPerFile,
XidFactory xidFactory = new XidFactoryImpl(pid.getBytes());
XidFactory xidFactory = new XidFactoryImpl(pid.getBytes());
SystemInstance.get().setComponent(XAResourceWrapper.class, new GeronimoXAResourceWrapper()); xidFactory = new XidFactoryImpl(tmId == null ? DEFAULT_TM_ID : tmId); txLog = new HOWLLog(bufferClassName == null ? "org.objectweb.howl.log.BlockLogBuffer" : bufferClassName, bufferSizeKb == 0 ? DEFAULT_BUFFER_SIZE : bufferSizeKb,
SystemInstance.get().setComponent(XAResourceWrapper.class, new GeronimoXAResourceWrapper()); xidFactory = new XidFactoryImpl(tmId == null ? DEFAULT_TM_ID : tmId); txLog = new HOWLLog(bufferClassName == null ? "org.objectweb.howl.log.BlockLogBuffer" : bufferClassName, bufferSizeKb == 0 ? DEFAULT_BUFFER_SIZE : bufferSizeKb,