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(); }
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(); }