- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.setTransactionTimeoutDate()
方法的一些代码示例,展示了XAResourceHolderState.setTransactionTimeoutDate()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XAResourceHolderState.setTransactionTimeoutDate()
方法的具体详情如下:
包路径:bitronix.tm.internal.XAResourceHolderState
类名称:XAResourceHolderState
方法名:setTransactionTimeoutDate
暂无
代码示例来源:origin: org.codehaus.btm/btm
public boolean enlistResource(XAResource xaResource) throws RollbackException, IllegalStateException, SystemException {
if (status == Status.STATUS_NO_TRANSACTION)
throw new IllegalStateException("transaction hasn't started yet");
if (status == Status.STATUS_MARKED_ROLLBACK)
throw new BitronixRollbackException("transaction has been marked as rollback only");
if (isDone())
throw new IllegalStateException("transaction started or finished 2PC, cannot enlist any more resource");
XAResourceHolder resourceHolder = ResourceRegistrar.findXAResourceHolder(xaResource);
if (resourceHolder == null)
throw new BitronixSystemException("unknown XAResource " + xaResource + ", it does not belong to a registered resource");
XAResourceHolderState resourceHolderState = new XAResourceHolderState(resourceHolder, resourceHolder.getResourceBean());
// resource timeout must be set here so manually enlisted resources can receive it
resourceHolderState.setTransactionTimeoutDate(timeoutDate);
try {
resourceManager.enlist(resourceHolderState);
} catch (XAException ex) {
String extraErrorDetails = TransactionManagerServices.getExceptionAnalyzer().extractExtraXAExceptionDetails(ex);
if (BitronixXAException.isUnilateralRollback(ex)) {
// if the resource unilaterally rolled back, the transaction will never be able to commit -> mark it as rollback only
setStatus(Status.STATUS_MARKED_ROLLBACK);
throw new BitronixRollbackException("resource " + resourceHolderState + " unilaterally rolled back, error=" +
Decoder.decodeXAExceptionErrorCode(ex) + (extraErrorDetails == null ? "" : ", extra error=" + extraErrorDetails), ex);
}
throw new BitronixSystemException("cannot enlist " + resourceHolderState + ", error=" +
Decoder.decodeXAExceptionErrorCode(ex) + (extraErrorDetails == null ? "" : ", extra error=" + extraErrorDetails), ex);
}
resourceHolder.putXAResourceHolderState(resourceHolderState.getXid(), resourceHolderState);
return true;
}
代码示例来源:origin: bitronix/btm
@Override
public boolean enlistResource(XAResource xaResource) throws RollbackException, IllegalStateException, SystemException {
if (status == Status.STATUS_NO_TRANSACTION)
throw new IllegalStateException("transaction hasn't started yet");
if (status == Status.STATUS_MARKED_ROLLBACK)
throw new BitronixRollbackException("transaction has been marked as rollback only");
if (isDone())
throw new IllegalStateException("transaction started or finished 2PC, cannot enlist any more resource");
XAResourceHolder resourceHolder = ResourceRegistrar.findXAResourceHolder(xaResource);
if (resourceHolder == null)
throw new BitronixSystemException("unknown XAResource " + xaResource + ", it does not belong to a registered resource");
XAResourceHolderState resourceHolderState = new XAResourceHolderState(resourceHolder, resourceHolder.getResourceBean());
// resource timeout must be set here so manually enlisted resources can receive it
resourceHolderState.setTransactionTimeoutDate(timeoutDate);
try {
resourceManager.enlist(resourceHolderState);
} catch (XAException ex) {
String extraErrorDetails = TransactionManagerServices.getExceptionAnalyzer().extractExtraXAExceptionDetails(ex);
if (BitronixXAException.isUnilateralRollback(ex)) {
// if the resource unilaterally rolled back, the transaction will never be able to commit -> mark it as rollback only
setStatus(Status.STATUS_MARKED_ROLLBACK);
throw new BitronixRollbackException("resource " + resourceHolderState + " unilaterally rolled back, error=" +
Decoder.decodeXAExceptionErrorCode(ex) + (extraErrorDetails == null ? "" : ", extra error=" + extraErrorDetails), ex);
}
throw new BitronixSystemException("cannot enlist " + resourceHolderState + ", error=" +
Decoder.decodeXAExceptionErrorCode(ex) + (extraErrorDetails == null ? "" : ", extra error=" + extraErrorDetails), ex);
}
resourceHolder.putXAResourceHolderState(resourceHolderState.getXid(), resourceHolderState);
return true;
}
代码示例来源:origin: org.mule.btm/mule-btm
public boolean enlistResource(XAResource xaResource) throws RollbackException, IllegalStateException, SystemException {
if (status == Status.STATUS_NO_TRANSACTION)
throw new IllegalStateException("transaction hasn't started yet");
if (status == Status.STATUS_MARKED_ROLLBACK)
throw new BitronixRollbackException("transaction has been marked as rollback only");
if (isDone())
throw new IllegalStateException("transaction started or finished 2PC, cannot enlist any more resource");
XAResourceHolder resourceHolder = ResourceRegistrar.findXAResourceHolder(xaResource);
if (resourceHolder == null)
throw new BitronixSystemException("unknown XAResource " + xaResource + ", it does not belong to a registered resource");
XAResourceHolderState resourceHolderState = new XAResourceHolderState(resourceHolder, resourceHolder.getResourceBean());
// resource timeout must be set here so manually enlisted resources can receive it
resourceHolderState.setTransactionTimeoutDate(timeoutDate);
try {
resourceManager.enlist(resourceHolderState);
} catch (XAException ex) {
String extraErrorDetails = TransactionManagerServices.getExceptionAnalyzer().extractExtraXAExceptionDetails(ex);
if (BitronixXAException.isUnilateralRollback(ex)) {
// if the resource unilaterally rolled back, the transaction will never be able to commit -> mark it as rollback only
setStatus(Status.STATUS_MARKED_ROLLBACK);
throw new BitronixRollbackException("resource " + resourceHolderState + " unilaterally rolled back, error=" +
Decoder.decodeXAExceptionErrorCode(ex) + (extraErrorDetails == null ? "" : ", extra error=" + extraErrorDetails), ex);
}
throw new BitronixSystemException("cannot enlist " + resourceHolderState + ", error=" +
Decoder.decodeXAExceptionErrorCode(ex) + (extraErrorDetails == null ? "" : ", extra error=" + extraErrorDetails), ex);
}
resourceHolder.putXAResourceHolderState(resourceHolderState.getXid(), resourceHolderState);
return true;
}
代码示例来源:origin: com.github.marcus-nl.btm/btm
@Override
public boolean enlistResource(XAResource xaResource) throws RollbackException, IllegalStateException, SystemException {
if (status == Status.STATUS_NO_TRANSACTION)
throw new IllegalStateException("transaction hasn't started yet");
if (status == Status.STATUS_MARKED_ROLLBACK)
throw new BitronixRollbackException("transaction has been marked as rollback only");
if (isDone())
throw new IllegalStateException("transaction started or finished 2PC, cannot enlist any more resource");
XAResourceHolder resourceHolder = ResourceRegistrar.findXAResourceHolder(xaResource);
if (resourceHolder == null)
throw new BitronixSystemException("unknown XAResource " + xaResource + ", it does not belong to a registered resource");
XAResourceHolderState resourceHolderState = new XAResourceHolderState(resourceHolder, resourceHolder.getResourceBean());
// resource timeout must be set here so manually enlisted resources can receive it
resourceHolderState.setTransactionTimeoutDate(timeoutDate);
try {
resourceManager.enlist(resourceHolderState);
} catch (XAException ex) {
String extraErrorDetails = TransactionManagerServices.getExceptionAnalyzer().extractExtraXAExceptionDetails(ex);
if (BitronixXAException.isUnilateralRollback(ex)) {
// if the resource unilaterally rolled back, the transaction will never be able to commit -> mark it as rollback only
setStatus(Status.STATUS_MARKED_ROLLBACK);
throw new BitronixRollbackException("resource " + resourceHolderState + " unilaterally rolled back, error=" +
Decoder.decodeXAExceptionErrorCode(ex) + (extraErrorDetails == null ? "" : ", extra error=" + extraErrorDetails), ex);
}
throw new BitronixSystemException("cannot enlist " + resourceHolderState + ", error=" +
Decoder.decodeXAExceptionErrorCode(ex) + (extraErrorDetails == null ? "" : ", extra error=" + extraErrorDetails), ex);
}
resourceHolder.putXAResourceHolderState(resourceHolderState.getXid(), resourceHolderState);
return true;
}
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.isFailed()方法的一些代码示例,展示了XAResourceHolderState.is
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.getTwoPcOrderingPosition()方法的一些代码示例,展示了XAResour
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.isSuspended()方法的一些代码示例,展示了XAResourceHolderState
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.start()方法的一些代码示例,展示了XAResourceHolderState.start
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.getXAResource()方法的一些代码示例,展示了XAResourceHolderSta
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.getUseTmJoin()方法的一些代码示例,展示了XAResourceHolderStat
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.setXid()方法的一些代码示例,展示了XAResourceHolderState.setX
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.end()方法的一些代码示例,展示了XAResourceHolderState.end()的具
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.setTransactionTimeoutDate()方法的一些代码示例,展示了XAResou
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.getIgnoreRecoveryFailures()方法的一些代码示例,展示了XAResou
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.isEnded()方法的一些代码示例,展示了XAResourceHolderState.isE
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.getUniqueName()方法的一些代码示例,展示了XAResourceHolderSta
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.getXid()方法的一些代码示例,展示了XAResourceHolderState.getX
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.equals()方法的一些代码示例,展示了XAResourceHolderState.equa
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.getXAResourceHolder()方法的一些代码示例,展示了XAResourceHol
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.()方法的一些代码示例,展示了XAResourceHolderState.()的具体用法。这些
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.isStarted()方法的一些代码示例,展示了XAResourceHolderState.i
我是一名优秀的程序员,十分优秀!