- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.isEnded()
方法的一些代码示例,展示了XAResourceHolderState.isEnded()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XAResourceHolderState.isEnded()
方法的具体详情如下:
包路径:bitronix.tm.internal.XAResourceHolderState
类名称:XAResourceHolderState
方法名:isEnded
暂无
代码示例来源:origin: bitronix/btm
/**
* Suspend all enlisted resources from the current transaction context.
* @throws XAException if the resource threw an exception during suspend.
*/
public void suspend() throws XAException {
for (XAResourceHolderState xaResourceHolderState : resources) {
if (!xaResourceHolderState.isEnded()) {
if (log.isDebugEnabled()) { log.debug("suspending " + xaResourceHolderState); }
xaResourceHolderState.end(XAResource.TMSUCCESS);
}
} // while
}
代码示例来源:origin: com.github.marcus-nl.btm/btm
/**
* Suspend all enlisted resources from the current transaction context.
* @throws XAException if the resource threw an exception during suspend.
*/
public void suspend() throws XAException {
for (XAResourceHolderState xaResourceHolderState : resources) {
if (!xaResourceHolderState.isEnded()) {
if (log.isDebugEnabled()) { log.debug("suspending " + xaResourceHolderState); }
xaResourceHolderState.end(XAResource.TMSUCCESS);
}
} // while
}
代码示例来源:origin: org.codehaus.btm/btm
/**
* Suspend all enlisted resources from the current transaction context.
* @throws XAException if the resource threw an exception during suspend.
*/
public void suspend() throws XAException {
for (XAResourceHolderState xaResourceHolderState : resources) {
if (!xaResourceHolderState.isEnded()) {
if (log.isDebugEnabled()) log.debug("suspending " + xaResourceHolderState);
xaResourceHolderState.end(XAResource.TMSUCCESS);
}
} // while
}
代码示例来源:origin: org.mule.btm/mule-btm
/**
* Suspend all enlisted resources from the current transaction context.
* @throws XAException if the resource threw an exception during suspend.
*/
public void suspend() throws XAException {
for (XAResourceHolderState xaResourceHolderState : resources) {
if (!xaResourceHolderState.isEnded()) {
if (log.isDebugEnabled()) log.debug("suspending " + xaResourceHolderState);
xaResourceHolderState.end(XAResource.TMSUCCESS);
}
} // while
}
代码示例来源:origin: com.github.marcus-nl.btm/btm
/**
* Search for an eventually already enlisted {@link XAResourceHolderState} that could be joined with the
* {@link XAResourceHolderState} passed as parameter.<br/>
* If datasource configuration property <code>bitronix.useTmJoin=false</code> is set this method always returns null.
* @param xaResourceHolderState a {@link XAResourceHolderState} looking to be joined.
* @return another enlisted {@link XAResourceHolderState} that can be joined with the one passed in or null if none is found.
* @throws XAException if call to XAResource.isSameRM() fails.
*/
private XAResourceHolderState getManagedResourceWithSameRM(XAResourceHolderState xaResourceHolderState) throws XAException {
if (!xaResourceHolderState.getUseTmJoin()) {
if (log.isDebugEnabled()) { log.debug("join disabled on resource " + xaResourceHolderState); }
return null;
}
for (XAResourceHolderState alreadyEnlistedHolderState : resources) {
if (log.isDebugEnabled())
log.debug("checking joinability of " + xaResourceHolderState + " with " + alreadyEnlistedHolderState);
if (alreadyEnlistedHolderState.isEnded() &&
!alreadyEnlistedHolderState.isSuspended() &&
xaResourceHolderState.getXAResource().isSameRM(alreadyEnlistedHolderState.getXAResource())) {
if (log.isDebugEnabled()) { log.debug("resources are joinable"); }
return alreadyEnlistedHolderState;
}
if (log.isDebugEnabled()) { log.debug("resources are not joinable"); }
}
if (log.isDebugEnabled()) { log.debug("no joinable resource found for " + xaResourceHolderState); }
return null;
}
代码示例来源:origin: bitronix/btm
/**
* Search for an eventually already enlisted {@link XAResourceHolderState} that could be joined with the
* {@link XAResourceHolderState} passed as parameter.<br/>
* If datasource configuration property <code>bitronix.useTmJoin=false</code> is set this method always returns null.
* @param xaResourceHolderState a {@link XAResourceHolderState} looking to be joined.
* @return another enlisted {@link XAResourceHolderState} that can be joined with the one passed in or null if none is found.
* @throws XAException if call to XAResource.isSameRM() fails.
*/
private XAResourceHolderState getManagedResourceWithSameRM(XAResourceHolderState xaResourceHolderState) throws XAException {
if (!xaResourceHolderState.getUseTmJoin()) {
if (log.isDebugEnabled()) { log.debug("join disabled on resource " + xaResourceHolderState); }
return null;
}
for (XAResourceHolderState alreadyEnlistedHolderState : resources) {
if (log.isDebugEnabled())
log.debug("checking joinability of " + xaResourceHolderState + " with " + alreadyEnlistedHolderState);
if (alreadyEnlistedHolderState.isEnded() &&
!alreadyEnlistedHolderState.isSuspended() &&
xaResourceHolderState.getXAResource().isSameRM(alreadyEnlistedHolderState.getXAResource())) {
if (log.isDebugEnabled()) { log.debug("resources are joinable"); }
return alreadyEnlistedHolderState;
}
if (log.isDebugEnabled()) { log.debug("resources are not joinable"); }
}
if (log.isDebugEnabled()) { log.debug("no joinable resource found for " + xaResourceHolderState); }
return null;
}
代码示例来源:origin: org.mule.btm/mule-btm
if (!resource.isEnded()) {
if (log.isDebugEnabled()) log.debug("found unclosed resource to delist: " + resource);
try {
代码示例来源:origin: bitronix/btm
if (!resource.isEnded()) {
if (log.isDebugEnabled()) { log.debug("found unclosed resource to delist: " + resource); }
try {
代码示例来源:origin: org.codehaus.btm/btm
/**
* Search for an eventually already enlisted {@link XAResourceHolderState} that could be joined with the
* {@link XAResourceHolderState} passed as parameter.<br/>
* If datasource configuration property <code>bitronix.useTmJoin=false</code> is set this method always returns null.
* @param xaResourceHolderState a {@link XAResourceHolderState} looking to be joined.
* @return another enlisted {@link XAResourceHolderState} that can be joined with the one passed in or null if none is found.
* @throws XAException if call to XAResource.isSameRM() fails.
*/
private XAResourceHolderState getManagedResourceWithSameRM(XAResourceHolderState xaResourceHolderState) throws XAException {
if (!xaResourceHolderState.getUseTmJoin()) {
if (log.isDebugEnabled()) log.debug("join disabled on resource " + xaResourceHolderState);
return null;
}
for (XAResourceHolderState alreadyEnlistedHolderState : resources) {
if (log.isDebugEnabled())
log.debug("checking joinability of " + xaResourceHolderState + " with " + alreadyEnlistedHolderState);
if (alreadyEnlistedHolderState.isEnded() &&
!alreadyEnlistedHolderState.isSuspended() &&
xaResourceHolderState.getXAResource().isSameRM(alreadyEnlistedHolderState.getXAResource())) {
if (log.isDebugEnabled()) log.debug("resources are joinable");
return alreadyEnlistedHolderState;
}
if (log.isDebugEnabled()) log.debug("resources are not joinable");
}
if (log.isDebugEnabled()) log.debug("no joinable resource found for " + xaResourceHolderState);
return null;
}
代码示例来源:origin: org.mule.btm/mule-btm
/**
* Search for an eventually already enlisted {@link XAResourceHolderState} that could be joined with the
* {@link XAResourceHolderState} passed as parameter.<br/>
* If datasource configuration property <code>bitronix.useTmJoin=false</code> is set this method always returns null.
* @param xaResourceHolderState a {@link XAResourceHolderState} looking to be joined.
* @return another enlisted {@link XAResourceHolderState} that can be joined with the one passed in or null if none is found.
* @throws XAException if call to XAResource.isSameRM() fails.
*/
private XAResourceHolderState getManagedResourceWithSameRM(XAResourceHolderState xaResourceHolderState) throws XAException {
if (!xaResourceHolderState.getUseTmJoin()) {
if (log.isDebugEnabled()) log.debug("join disabled on resource " + xaResourceHolderState);
return null;
}
for (XAResourceHolderState alreadyEnlistedHolderState : resources) {
if (log.isDebugEnabled())
log.debug("checking joinability of " + xaResourceHolderState + " with " + alreadyEnlistedHolderState);
if (alreadyEnlistedHolderState.isEnded() &&
!alreadyEnlistedHolderState.isSuspended() &&
xaResourceHolderState.getXAResource().isSameRM(alreadyEnlistedHolderState.getXAResource())) {
if (log.isDebugEnabled()) log.debug("resources are joinable");
return alreadyEnlistedHolderState;
}
if (log.isDebugEnabled()) log.debug("resources are not joinable");
}
if (log.isDebugEnabled()) log.debug("no joinable resource found for " + xaResourceHolderState);
return null;
}
代码示例来源:origin: com.github.marcus-nl.btm/btm
/**
* If this method returns false, then local transaction calls like Connection.commit() can be made.
* @return true if start() has been successfully called but not end() yet <i>and</i> the transaction is not suspended.
*/
public boolean isParticipatingInActiveGlobalTransaction() {
rwLock.readLock().lock();
try {
BitronixTransaction currentTransaction = TransactionContextHelper.currentTransaction();
Uid gtrid = currentTransaction == null ? null : currentTransaction.getResourceManager().getGtrid();
if (gtrid == null)
return false;
Map<Uid, XAResourceHolderState> statesForGtrid = xaResourceHolderStates.get(gtrid);
if (statesForGtrid == null)
return false;
for (XAResourceHolderState xaResourceHolderState : statesForGtrid.values()) {
if (xaResourceHolderState != null &&
xaResourceHolderState.isStarted() &&
!xaResourceHolderState.isSuspended() &&
!xaResourceHolderState.isEnded())
return true;
}
return false;
}
finally {
rwLock.readLock().unlock();
}
}
代码示例来源:origin: bitronix/btm
/**
* If this method returns false, then local transaction calls like Connection.commit() can be made.
* @return true if start() has been successfully called but not end() yet <i>and</i> the transaction is not suspended.
*/
public boolean isParticipatingInActiveGlobalTransaction() {
rwLock.readLock().lock();
try {
BitronixTransaction currentTransaction = TransactionContextHelper.currentTransaction();
Uid gtrid = currentTransaction == null ? null : currentTransaction.getResourceManager().getGtrid();
if (gtrid == null)
return false;
Map<Uid, XAResourceHolderState> statesForGtrid = xaResourceHolderStates.get(gtrid);
if (statesForGtrid == null)
return false;
for (XAResourceHolderState xaResourceHolderState : statesForGtrid.values()) {
if (xaResourceHolderState != null &&
xaResourceHolderState.isStarted() &&
!xaResourceHolderState.isSuspended() &&
!xaResourceHolderState.isEnded())
return true;
}
return false;
}
finally {
rwLock.readLock().unlock();
}
}
代码示例来源:origin: org.codehaus.btm/btm
/**
* Delist the {@link XAResourceHolder} from the current transaction or do nothing if there is no global transaction
* context for this thread.
* @param xaResourceHolder the {@link XAResourceHolder} to delist.
* @throws SystemException if an internal error happens.
*/
public static void delistFromCurrentTransaction(XAResourceHolder xaResourceHolder) throws SystemException {
BitronixTransaction currentTransaction = currentTransaction();
ResourceBean bean = xaResourceHolder.getResourceBean();
if (log.isDebugEnabled()) log.debug("delisting " + xaResourceHolder + " from " + currentTransaction);
// End resource as eagerly as possible. This allows to release connections to the pool much earlier
// with resources fully supporting transaction interleaving.
if (isInEnlistingGlobalTransactionContext(xaResourceHolder, currentTransaction) && !bean.getDeferConnectionRelease()) {
Map<Uid, XAResourceHolderState> statesForGtrid = xaResourceHolder.getXAResourceHolderStatesForGtrid(currentTransaction.getResourceManager().getGtrid());
for (XAResourceHolderState xaResourceHolderState : statesForGtrid.values()) {
if (!xaResourceHolderState.isEnded()) {
if (log.isDebugEnabled())
log.debug("delisting resource " + xaResourceHolderState + " from " + currentTransaction);
// Watch out: the delistResource() call might throw a BitronixRollbackSystemException to indicate a unilateral rollback.
currentTransaction.delistResource(xaResourceHolderState.getXAResource(), XAResource.TMSUCCESS);
} else if (log.isDebugEnabled()) log.debug("avoiding delistment of not enlisted resource " + xaResourceHolderState);
}
} // isInEnlistingGlobalTransactionContext
}
代码示例来源:origin: org.mule.btm/mule-btm
/**
* Delist the {@link XAResourceHolder} from the current transaction or do nothing if there is no global transaction
* context for this thread.
* @param xaResourceHolder the {@link XAResourceHolder} to delist.
* @throws SystemException if an internal error happens.
*/
public static void delistFromCurrentTransaction(XAResourceHolder xaResourceHolder) throws SystemException {
BitronixTransaction currentTransaction = currentTransaction();
ResourceBean bean = xaResourceHolder.getResourceBean();
if (log.isDebugEnabled()) log.debug("delisting " + xaResourceHolder + " from " + currentTransaction);
// End resource as eagerly as possible. This allows to release connections to the pool much earlier
// with resources fully supporting transaction interleaving.
if (isInEnlistingGlobalTransactionContext(xaResourceHolder, currentTransaction) && !bean.getDeferConnectionRelease()) {
Map<Uid, XAResourceHolderState> statesForGtrid = xaResourceHolder.getXAResourceHolderStatesForGtrid(currentTransaction.getResourceManager().getGtrid());
for (XAResourceHolderState xaResourceHolderState : statesForGtrid.values()) {
if (!xaResourceHolderState.isEnded()) {
if (log.isDebugEnabled())
log.debug("delisting resource " + xaResourceHolderState + " from " + currentTransaction);
// Watch out: the delistResource() call might throw a BitronixRollbackSystemException to indicate a unilateral rollback.
currentTransaction.delistResource(xaResourceHolderState.getXAResource(), XAResource.TMSUCCESS);
} else if (log.isDebugEnabled()) log.debug("avoiding delistment of not enlisted resource " + xaResourceHolderState);
}
} // isInEnlistingGlobalTransactionContext
}
代码示例来源:origin: org.codehaus.btm/btm
/**
* If this method returns false, then local transaction calls like Connection.commit() can be made.
* @return true if start() has been successfully called but not end() yet <i>and</i> the transaction is not suspended.
*/
public boolean isParticipatingInActiveGlobalTransaction() {
synchronized (xaResourceHolderStates) {
BitronixTransaction currentTransaction = TransactionContextHelper.currentTransaction();
Uid gtrid = currentTransaction == null ? null : currentTransaction.getResourceManager().getGtrid();
if (gtrid == null)
return false;
Map<Uid, XAResourceHolderState> statesForGtrid = xaResourceHolderStates.get(gtrid);
if (statesForGtrid == null)
return false;
for (XAResourceHolderState xaResourceHolderState : statesForGtrid.values()) {
if (xaResourceHolderState != null &&
xaResourceHolderState.isStarted() &&
!xaResourceHolderState.isSuspended() &&
!xaResourceHolderState.isEnded())
return true;
}
return false;
}
}
代码示例来源:origin: org.mule.btm/mule-btm
/**
* If this method returns false, then local transaction calls like Connection.commit() can be made.
* @return true if start() has been successfully called but not end() yet <i>and</i> the transaction is not suspended.
*/
public boolean isParticipatingInActiveGlobalTransaction() {
synchronized (xaResourceHolderStates) {
BitronixTransaction currentTransaction = TransactionContextHelper.currentTransaction();
Uid gtrid = currentTransaction == null ? null : currentTransaction.getResourceManager().getGtrid();
if (gtrid == null)
return false;
Map<Uid, XAResourceHolderState> statesForGtrid = xaResourceHolderStates.get(gtrid);
if (statesForGtrid == null)
return false;
for (XAResourceHolderState xaResourceHolderState : statesForGtrid.values()) {
if (xaResourceHolderState != null &&
xaResourceHolderState.isStarted() &&
!xaResourceHolderState.isSuspended() &&
!xaResourceHolderState.isEnded())
return true;
}
return false;
}
}
代码示例来源:origin: com.github.marcus-nl.btm/btm
if (alreadyEnlistedXAResourceHolderState == null || alreadyEnlistedXAResourceHolderState.isEnded()) {
currentTransaction.enlistResource(xaResourceHolder.getXAResource());
代码示例来源:origin: bitronix/btm
if (alreadyEnlistedXAResourceHolderState == null || alreadyEnlistedXAResourceHolderState.isEnded()) {
currentTransaction.enlistResource(xaResourceHolder.getXAResource());
代码示例来源:origin: org.mule.btm/mule-btm
if (alreadyEnlistedXAResourceHolderState == null || alreadyEnlistedXAResourceHolderState.isEnded()) {
currentTransaction.enlistResource(xaResourceHolder.getXAResource());
代码示例来源:origin: org.codehaus.btm/btm
if (alreadyEnlistedXAResourceHolderState == null || alreadyEnlistedXAResourceHolderState.isEnded()) {
currentTransaction.enlistResource(xaResourceHolder.getXAResource());
下面是一个简单的代码,它使用 Isend 将处理器 i 的数据发送到 i+1 并探测所有发送是否完成。 代码: std::vector sendbuffer; int myrank, nprocs;
本文整理了Java中cyclops.data.Zipper.isEnd()方法的一些代码示例,展示了Zipper.isEnd()的具体用法。这些代码示例主要来源于Github/Stackoverflo
需要澄清我对 Send Types 中给出的 isend 和 issend 的理解 我的理解是,一旦发送缓冲区空闲,即当所有数据都被释放时,isend 将返回。另一方面,Issend 仅在它从获取/未
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.isEnded()方法的一些代码示例,展示了XAResourceHolderState.isE
我在使用 Isend 和 Ireceive 时遇到问题。我试图向所有其他处理器发送消息,然后从其他处理器接收相同类型的消息,这些处理器执行相同的 Isend 方法。 void msgs(int my_
在 related question 中我了解到执行 request = Isend(...);接收(...); request.Wait(); 不保证工作,因为 Isend 可能不会做任何事情,直到
我的 MPI_Isend 和 MPI_Irecv 代码块有问题。我需要将一个数字 Cin 发送到生产线上的下一个流程,然后当前流程才能处理它的业务。 接收进程需要接收才能继续计算,但是当我没有 MPI
一个看似愚蠢的问题,但我似乎无法以任何方式找到明确的答案。 基本问题是我是否需要为 MPI::Isend 提供相应的 MPI::Irecv? 也就是说,即使消息发送是非阻塞的,只要我在重用发送缓冲区之
当我使用 Send/Recv 时,我的代码可以工作,但是当我用 Isend/Irecv 替换 Send/Recv 时,它会产生段错误。但在去其他地方之前,我想验证一下以下代码片段是否看起来很重要。 其
当使用序列化数据对同一标签执行多个 isend/irecv 传输时,我发现 boost::mpi 出现了 MPI_ERR_TRUNCATE 错误。这些不是并发传输,即不涉及线程。同时只有不止一项未完成
我正在尝试并行生成导数矩阵。我有两个线程的整个热方程求解器,但现在我试图找出如何将底行发送到下一个级别的 rec2,并将顶行发送到上一个级别的 rec1。我试着弄乱请求矩阵中的数字,但没有任何效果。出
在我的矩阵加法代码中,我使用 ISend 和 Tag 1 将下限传输到其他进程,但是当我编译代码时,所有其他从属进程都声称具有相同的下限。我不明白为什么? 输出: I am process 1 and
我正在创建一个程序来使用 MPI 计算两个导体之间的电势。我正在使用非阻塞发送和接收,因此可以在处理器之间发送信息时进行计算。 但是,isend 和 irecv 之间的 if 语句以及包含计算的 wa
我是一名优秀的程序员,十分优秀!