- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中bitronix.tm.internal.XAResourceHolderState.<init>()
方法的一些代码示例,展示了XAResourceHolderState.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XAResourceHolderState.<init>()
方法的具体详情如下:
包路径:bitronix.tm.internal.XAResourceHolderState
类名称:XAResourceHolderState
方法名:<init>
暂无
代码示例来源:origin: ehcache/ehcache3
public XAResourceHolderState startRecovery() throws RecoveryException {
if (recoveryXAResourceHolder != null) {
throw new RecoveryException("recovery already in progress on " + this);
}
if (xaResourceHolders.isEmpty()) {
throw new RecoveryException("no XAResource registered, recovery cannot be done on " + this);
}
recoveryXAResourceHolder = new RecoveryXAResourceHolder(xaResourceHolders.values().iterator().next());
return new XAResourceHolderState(recoveryXAResourceHolder, this);
}
代码示例来源:origin: org.ehcache/ehcache-transactions
public XAResourceHolderState startRecovery() throws RecoveryException {
if (recoveryXAResourceHolder != null) {
throw new RecoveryException("recovery already in progress on " + this);
}
if (xaResourceHolders.isEmpty()) {
throw new RecoveryException("no XAResource registered, recovery cannot be done on " + this);
}
recoveryXAResourceHolder = new RecoveryXAResourceHolder(xaResourceHolders.values().iterator().next());
return new XAResourceHolderState(recoveryXAResourceHolder, this);
}
代码示例来源:origin: org.mule.btm/mule-btm
/**
* {@inheritDoc}
*/
public XAResourceHolderState startRecovery() throws RecoveryException {
if (recoveryXAResourceHolder != null) {
throw new RecoveryException("recovery already in progress on " + this);
}
if (xaResourceHolders.isEmpty()) {
throw new RecoveryException("no XAResource registered, recovery cannot be done on " + this);
}
recoveryXAResourceHolder = new RecoveryXAResourceHolder(xaResourceHolders.values().iterator().next());
return new XAResourceHolderState(recoveryXAResourceHolder, this);
}
代码示例来源:origin: com.github.marcus-nl.btm/btm
/**
* {@inheritDoc}
*/
@Override
public XAResourceHolderState startRecovery() throws RecoveryException {
if (recoveryXAResourceHolder != null) {
throw new RecoveryException("recovery already in progress on " + this);
}
if (xaResourceHolders.isEmpty()) {
throw new RecoveryException("no XAResource registered, recovery cannot be done on " + this);
}
recoveryXAResourceHolder = new RecoveryXAResourceHolder(xaResourceHolders.values().iterator().next());
return new XAResourceHolderState(recoveryXAResourceHolder, this);
}
代码示例来源:origin: org.codehaus.btm/btm
/**
* {@inheritDoc}
*/
public XAResourceHolderState startRecovery() throws RecoveryException {
if (recoveryXAResourceHolder != null) {
throw new RecoveryException("recovery already in progress on " + this);
}
if (xaResourceHolders.isEmpty()) {
throw new RecoveryException("no XAResource registered, recovery cannot be done on " + this);
}
recoveryXAResourceHolder = new RecoveryXAResourceHolder(xaResourceHolders.values().iterator().next());
return new XAResourceHolderState(recoveryXAResourceHolder, this);
}
代码示例来源:origin: bitronix/btm
/**
* {@inheritDoc}
*/
@Override
public XAResourceHolderState startRecovery() throws RecoveryException {
if (recoveryXAResourceHolder != null) {
throw new RecoveryException("recovery already in progress on " + this);
}
if (xaResourceHolders.isEmpty()) {
throw new RecoveryException("no XAResource registered, recovery cannot be done on " + this);
}
recoveryXAResourceHolder = new RecoveryXAResourceHolder(xaResourceHolders.values().iterator().next());
return new XAResourceHolderState(recoveryXAResourceHolder, this);
}
代码示例来源:origin: bitronix/btm
private XAResourceProducer createMockProducer(String uniqueName) throws RecoveryException {
XAResourceProducer producer;
producer = mock(XAResourceProducer.class);
when(producer.getUniqueName()).thenReturn(uniqueName);
ResourceBean resourceBean = mock(ResourceBean.class);
when(resourceBean.getUniqueName()).thenReturn(uniqueName);
XAResourceHolder resourceHolder = mock(XAResourceHolder.class);
when(resourceHolder.getResourceBean()).thenReturn(resourceBean);
XAResource xaResource = mock(XAResource.class);
when(resourceHolder.getXAResource()).thenReturn(xaResource);
when(producer.startRecovery()).thenReturn(new XAResourceHolderState(resourceHolder, resourceBean));
return producer;
}
代码示例来源:origin: com.github.marcus-nl.btm/btm
private XAResourceProducer createMockProducer(String uniqueName) throws RecoveryException {
XAResourceProducer producer;
producer = mock(XAResourceProducer.class);
when(producer.getUniqueName()).thenReturn(uniqueName);
ResourceBean resourceBean = mock(ResourceBean.class);
when(resourceBean.getUniqueName()).thenReturn(uniqueName);
XAResourceHolder resourceHolder = mock(XAResourceHolder.class);
when(resourceHolder.getResourceBean()).thenReturn(resourceBean);
XAResource xaResource = mock(XAResource.class);
when(resourceHolder.getXAResource()).thenReturn(xaResource);
when(producer.startRecovery()).thenReturn(new XAResourceHolderState(resourceHolder, resourceBean));
return producer;
}
代码示例来源:origin: org.mule.btm/mule-btm
public XAResourceHolderState startRecovery() throws RecoveryException {
init();
if (recoveryConnectionHandle != null)
throw new RecoveryException("recovery already in progress on " + this);
try {
recoveryConnectionHandle = (JdbcConnectionHandle) pool.getConnectionHandle(false);
recoveryXAResourceHolder = recoveryConnectionHandle.getPooledConnection().createRecoveryXAResourceHolder();
return new XAResourceHolderState(recoveryConnectionHandle.getPooledConnection(), this);
} catch (Exception ex) {
throw new RecoveryException("cannot start recovery on " + this, ex);
}
}
代码示例来源:origin: org.codehaus.btm/btm
public XAResourceHolderState startRecovery() throws RecoveryException {
init();
if (recoveryConnectionHandle != null)
throw new RecoveryException("recovery already in progress on " + this);
try {
recoveryConnectionHandle = (JdbcConnectionHandle) pool.getConnectionHandle(false);
recoveryXAResourceHolder = recoveryConnectionHandle.getPooledConnection().createRecoveryXAResourceHolder();
return new XAResourceHolderState(recoveryConnectionHandle.getPooledConnection(), this);
} catch (Exception ex) {
throw new RecoveryException("cannot start recovery on " + this, ex);
}
}
代码示例来源:origin: com.github.marcus-nl.btm/btm
@Override
public XAResourceHolderState startRecovery() throws RecoveryException {
init();
if (recoveryConnectionHandle != null)
throw new RecoveryException("recovery already in progress on " + this);
try {
recoveryConnectionHandle = (Connection) pool.getConnectionHandle(false);
PooledConnectionProxy pooledConnection = (PooledConnectionProxy) recoveryConnectionHandle;
recoveryXAResourceHolder = pooledConnection.getPooledConnection().createRecoveryXAResourceHolder();
return new XAResourceHolderState(pooledConnection.getPooledConnection(), this);
} catch (Exception ex) {
throw new RecoveryException("cannot start recovery on " + this, ex);
}
}
代码示例来源:origin: bitronix/btm
@Override
public XAResourceHolderState startRecovery() throws RecoveryException {
init();
if (recoveryConnectionHandle != null)
throw new RecoveryException("recovery already in progress on " + this);
try {
recoveryConnectionHandle = (Connection) pool.getConnectionHandle(false);
PooledConnectionProxy pooledConnection = (PooledConnectionProxy) recoveryConnectionHandle;
recoveryXAResourceHolder = pooledConnection.getPooledConnection().createRecoveryXAResourceHolder();
return new XAResourceHolderState(pooledConnection.getPooledConnection(), this);
} catch (Exception ex) {
throw new RecoveryException("cannot start recovery on " + this, ex);
}
}
代码示例来源:origin: org.codehaus.btm/btm
public XAResourceHolderState startRecovery() throws RecoveryException {
init();
if (recoveryPooledConnection != null)
throw new RecoveryException("recovery already in progress on " + this);
try {
recoveryConnectionHandle = (JmsConnectionHandle) pool.getConnectionHandle(false);
recoveryPooledConnection = recoveryConnectionHandle.getPooledConnection();
recoveryXAResourceHolder = recoveryPooledConnection.createRecoveryXAResourceHolder();
return new XAResourceHolderState(recoveryXAResourceHolder, recoveryPooledConnection.getPoolingConnectionFactory());
} catch (Exception ex) {
throw new RecoveryException("error starting recovery", ex);
}
}
代码示例来源:origin: bitronix/btm
@Override
public XAResourceHolderState startRecovery() throws RecoveryException {
init();
if (recoveryPooledConnection != null)
throw new RecoveryException("recovery already in progress on " + this);
try {
recoveryConnectionHandle = (JmsConnectionHandle) pool.getConnectionHandle(false);
recoveryPooledConnection = recoveryConnectionHandle.getPooledConnection();
recoveryXAResourceHolder = recoveryPooledConnection.createRecoveryXAResourceHolder();
return new XAResourceHolderState(recoveryXAResourceHolder, recoveryPooledConnection.getPoolingConnectionFactory());
} catch (Exception ex) {
throw new RecoveryException("error starting recovery", ex);
}
}
代码示例来源:origin: org.mule.btm/mule-btm
public XAResourceHolderState startRecovery() throws RecoveryException {
init();
if (recoveryPooledConnection != null)
throw new RecoveryException("recovery already in progress on " + this);
try {
recoveryConnectionHandle = (JmsConnectionHandle) pool.getConnectionHandle(false);
recoveryPooledConnection = recoveryConnectionHandle.getPooledConnection();
recoveryXAResourceHolder = recoveryPooledConnection.createRecoveryXAResourceHolder();
return new XAResourceHolderState(recoveryXAResourceHolder, recoveryPooledConnection.getPoolingConnectionFactory());
} catch (Exception ex) {
throw new RecoveryException("error starting recovery", ex);
}
}
代码示例来源:origin: com.github.marcus-nl.btm/btm
@Override
public XAResourceHolderState startRecovery() throws RecoveryException {
init();
if (recoveryPooledConnection != null)
throw new RecoveryException("recovery already in progress on " + this);
try {
recoveryConnectionHandle = (JmsConnectionHandle) pool.getConnectionHandle(false);
recoveryPooledConnection = recoveryConnectionHandle.getPooledConnection();
recoveryXAResourceHolder = recoveryPooledConnection.createRecoveryXAResourceHolder();
return new XAResourceHolderState(recoveryXAResourceHolder, recoveryPooledConnection.getPoolingConnectionFactory());
} catch (Exception ex) {
throw new RecoveryException("error starting recovery", ex);
}
}
代码示例来源:origin: com.github.marcus-nl.btm/btm
public void testRemove() {
Scheduler<XAResourceHolderState> resourceScheduler = new Scheduler<XAResourceHolderState>();
XAResourceHolderState xarhs0 = new XAResourceHolderState(null, new MockResourceBean(0));
XAResourceHolderState xarhs1 = new XAResourceHolderState(null, new MockResourceBean(1));
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
resourceScheduler.remove(xarhs0);
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
Iterator<XAResourceHolderState> it = resourceScheduler.iterator();
assertTrue(it.hasNext());
assertTrue(xarhs0 == it.next());
it.remove();
assertTrue(xarhs1 == it.next());
it.remove();
}
代码示例来源:origin: com.github.marcus-nl.btm/btm
public void testReverseRemove() {
Scheduler<XAResourceHolderState> resourceScheduler = new Scheduler<XAResourceHolderState>();
XAResourceHolderState xarhs0 = new XAResourceHolderState(null, new MockResourceBean(0));
XAResourceHolderState xarhs1 = new XAResourceHolderState(null, new MockResourceBean(1));
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
resourceScheduler.remove(xarhs0);
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
Iterator<XAResourceHolderState> it = resourceScheduler.reverseIterator();
assertTrue(it.hasNext());
assertTrue(xarhs1 == it.next());
it.remove();
assertTrue(xarhs0 == it.next());
it.remove();
}
代码示例来源:origin: bitronix/btm
public void testRemove() {
Scheduler<XAResourceHolderState> resourceScheduler = new Scheduler<XAResourceHolderState>();
XAResourceHolderState xarhs0 = new XAResourceHolderState(null, new MockResourceBean(0));
XAResourceHolderState xarhs1 = new XAResourceHolderState(null, new MockResourceBean(1));
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
resourceScheduler.remove(xarhs0);
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
Iterator<XAResourceHolderState> it = resourceScheduler.iterator();
assertTrue(it.hasNext());
assertTrue(xarhs0 == it.next());
it.remove();
assertTrue(xarhs1 == it.next());
it.remove();
}
代码示例来源:origin: bitronix/btm
public void testReverseRemove() {
Scheduler<XAResourceHolderState> resourceScheduler = new Scheduler<XAResourceHolderState>();
XAResourceHolderState xarhs0 = new XAResourceHolderState(null, new MockResourceBean(0));
XAResourceHolderState xarhs1 = new XAResourceHolderState(null, new MockResourceBean(1));
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
resourceScheduler.add(xarhs1, xarhs1.getTwoPcOrderingPosition());
resourceScheduler.remove(xarhs0);
resourceScheduler.add(xarhs0, xarhs0.getTwoPcOrderingPosition());
Iterator<XAResourceHolderState> it = resourceScheduler.reverseIterator();
assertTrue(it.hasNext());
assertTrue(xarhs1 == it.next());
it.remove();
assertTrue(xarhs0 == it.next());
it.remove();
}
本文整理了Java中bitronix.tm.internal.XAResourceHolderState类的一些代码示例,展示了XAResourceHolderState类的具体用法。这些代码示例主要
我的一个应用程序有问题。该应用程序是一个自行编写的 Java 应用程序,它通过 JMS 连接到 50 多个不同的消息队列并使用来自这些队列的消息。 从功能的角度来看,来自不同队列的所有消息的处理工作正
我正在尝试创建事务管理器并将其与 Hibernate for Oracle 一起使用。 我的 persistence.xml 文件是: org.hibernate.ejb.Hiber
我的目标是使用 Bitronix 交易,我应该使用两种资源: 数据库 JMS 我有以下java代码: package com.mycompany.app; import java.net.URI; i
您好,我有一个使用 spring 和 hibernate 的 Java web 应用程序。 我有一个名为Role 的模型类。对于所有模型类,都有通用的 GenericDao.java public i
本文整理了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
我是一名优秀的程序员,十分优秀!