use of com.sun.enterprise.transaction.jts.recovery.OracleXAResource in project Payara by payara.
the class JavaEETransactionManagerJTSDelegate method initTransactionProperties.
public void initTransactionProperties() {
if (serviceLocator != null) {
txnService = serviceLocator.getService(TransactionService.class, ServerEnvironment.DEFAULT_INSTANCE_NAME);
if (txnService != null) {
String value = txnService.getPropertyValue("use-last-agent-optimization");
if (value != null && "false".equals(value)) {
setUseLAO(false);
if (_logger.isLoggable(Level.FINE))
_logger.log(Level.FINE, "TM: LAO is disabled");
}
value = txnService.getPropertyValue("oracle-xa-recovery-workaround");
if (value == null || "true".equals(value)) {
xaresourcewrappers.put("oracle.jdbc.xa.client.OracleXADataSource", new OracleXAResource());
}
if (Boolean.parseBoolean(txnService.getPropertyValue("sybase-xa-recovery-workaround"))) {
xaresourcewrappers.put("com.sybase.jdbc2.jdbc.SybXADataSource", new SybaseXAResource());
}
if (Boolean.parseBoolean(txnService.getAutomaticRecovery())) {
// If recovery on server startup is set, initialize other properties as well
Properties props = TransactionServiceProperties.getJTSProperties(serviceLocator, false);
DefaultTransactionService.setServerName(props);
if (Boolean.parseBoolean(txnService.getPropertyValue("delegated-recovery"))) {
_logger.warning("delegated-recovery is no longer supported!!");
}
}
}
}
}
Aggregations