- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中com.arjuna.ats.internal.jta.resources.arjunacore.XAOnePhaseResource
类的一些代码示例,展示了XAOnePhaseResource
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XAOnePhaseResource
类的具体详情如下:
包路径:com.arjuna.ats.internal.jta.resources.arjunacore.XAOnePhaseResource
类名称:XAOnePhaseResource
[英]One Phase resource wrapper for XAResources.
[中]XAResources的单阶段资源包装器。
代码示例来源:origin: org.jboss.jbossts/jbossjta
/**
* Attempt to create an AbstractRecord wrapping the given XAResource. Return null if this fails, or
* is diallowed by the current configuration of multiple last resource behaviour.
*
* @param xaRes
* @param params
* @param xid
* @return
*/
private AbstractRecord createRecord(XAResource xaRes, Object[] params, Xid xid)
{
final AbstractRecord record;
if ((xaRes instanceof LastResourceCommitOptimisation)
|| ((LAST_RESOURCE_OPTIMISATION_INTERFACE != null) && LAST_RESOURCE_OPTIMISATION_INTERFACE
.isInstance(xaRes)))
{
record = new LastResourceRecord(new XAOnePhaseResource(xaRes, xid, params));
}
else
{
record = new XAResourceRecord(this, xaRes, xid, params);
}
return record;
}
代码示例来源:origin: jbosstm/narayana
throw generateUnpackError(new ClassNotFoundException());
throw generateUnpackError(sqle) ;
throw generateUnpackError(cnfe) ;
throw generateUnpackError(ioe) ;
throw generateUnpackError(cce) ;
代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj
/**
* Commit the one phase resource.
* @return TwoPhaseOutcome.FINISH_OK or TwoPhaseOutcome.FINISH_ERROR
*/
public int rollback()
{
try
{
xaResource.rollback(xid) ;
return TwoPhaseOutcome.FINISH_OK ;
}
catch (final XAException xae)
{
addDeferredThrowable(xae);
jtaLogger.i18NLogger.warn_resources_arjunacore_XAOnePhaseResource_rollbackexception(XAHelper.xidToString(xid), xae);
}
catch (final Throwable ex)
{
if (jtaLogger.logger.isTraceEnabled()) {
jtaLogger.logger.trace("XAOnePhaseResource.rollback(" + xid + ") " + ex.getMessage());
}
}
return TwoPhaseOutcome.FINISH_ERROR ;
}
代码示例来源:origin: jbosstm/narayana
@Test
public void testInvalid ()
{
XAOnePhaseResource xares = new XAOnePhaseResource();
assertEquals(xares.commit(), TwoPhaseOutcome.ONE_PHASE_ERROR);
assertEquals(xares.rollback(), TwoPhaseOutcome.FINISH_ERROR);
}
代码示例来源:origin: jbosstm/narayana
@Test
public void testCommit ()
{
SampleOnePhaseResource res = new SampleOnePhaseResource();
XidImple xid = new XidImple(new Uid());
XAOnePhaseResource xares = new XAOnePhaseResource(res, xid, null);
assertEquals(xares.commit(), TwoPhaseOutcome.FINISH_OK);
assertTrue(res.onePhaseCalled());
}
代码示例来源:origin: jbosstm/narayana
@Test
public void testPackUnpack () throws Exception
{
DummyXA res = new DummyXA(false);
XidImple xid = new XidImple(new Uid());
XAOnePhaseResource xares = new XAOnePhaseResource(res, xid, null);
OutputObjectState os = new OutputObjectState();
xares.pack(os);
InputObjectState is = new InputObjectState(os);
xares.unpack(is);
}
}
代码示例来源:origin: jbosstm/narayana
@Test
public void testPackUnpackError () throws Exception
{
SampleOnePhaseResource res = new SampleOnePhaseResource();
XidImple xid = new XidImple(new Uid());
XAOnePhaseResource xares = new XAOnePhaseResource(res, xid, null);
OutputObjectState os = new OutputObjectState();
try
{
xares.pack(os);
fail();
}
catch (final IOException ex)
{
}
}
代码示例来源:origin: jbosstm/narayana
@Test
public void testCommitHeuristic ()
{
SampleOnePhaseResource res = new SampleOnePhaseResource(SampleOnePhaseResource.ErrorType.heurcom);
XidImple xid = new XidImple(new Uid());
XAOnePhaseResource xares = new XAOnePhaseResource(res, xid, null);
assertEquals(xares.commit(), TwoPhaseOutcome.FINISH_OK);
assertTrue(res.forgetCalled());
}
代码示例来源:origin: jbosstm/narayana
@Test
public void test () throws Exception
{
DummyRecoverableXAConnection rc = new DummyRecoverableXAConnection();
Object[] obj = new Object[1];
SampleOnePhaseResource res = new SampleOnePhaseResource();
obj[XAResourceRecord.XACONNECTION] = rc;
XAOnePhaseResource xares = new XAOnePhaseResource(res, new XidImple(new Uid()), obj);
OutputObjectState os = new OutputObjectState();
xares.pack(os);
InputObjectState is = new InputObjectState(os);
xares.unpack(is);
}
代码示例来源:origin: jbosstm/narayana
@Test
public void testCommitHeuristic ()
{
SampleOnePhaseResource res = new SampleOnePhaseResource(ErrorType.heurcom);
XidImple xid = new XidImple(new Uid());
XAOnePhaseResource xares = new XAOnePhaseResource(res, xid, null);
assertEquals(xares.commit(), TwoPhaseOutcome.FINISH_OK);
assertTrue(res.forgetCalled());
}
代码示例来源:origin: jboss.jbossts/jbossjts
/**
* Attempt to create an AbstractRecord wrapping the given XAResource. Return null if this fails, or
* is diallowed by the current configuration of multiple last resource behaviour.
*
* @param xaRes
* @param params
* @param xid
* @return
*/
private AbstractRecord createRecord(XAResource xaRes, Object[] params, Xid xid)
{
final AbstractRecord record;
if ((xaRes instanceof LastResourceCommitOptimisation)
|| ((LAST_RESOURCE_OPTIMISATION_INTERFACE != null) && LAST_RESOURCE_OPTIMISATION_INTERFACE
.isInstance(xaRes)))
{
record = new LastResourceRecord(new XAOnePhaseResource(xaRes, xid, params));
}
else
{
record = new XAResourceRecord(this, xaRes, xid, params);
}
return record;
}
代码示例来源:origin: org.jboss.jbossts/jbossjta
throw generateUnpackError(new ClassNotFoundException());
throw generateUnpackError(sqle) ;
throw generateUnpackError(cnfe) ;
throw generateUnpackError(ioe) ;
throw generateUnpackError(cce) ;
代码示例来源:origin: org.jboss.narayana.jta/jta
/**
* Commit the one phase resource.
* @return TwoPhaseOutcome.FINISH_OK or TwoPhaseOutcome.FINISH_ERROR
*/
public int rollback()
{
try
{
xaResource.rollback(xid) ;
return TwoPhaseOutcome.FINISH_OK ;
}
catch (final XAException xae)
{
addDeferredThrowable(xae);
jtaLogger.i18NLogger.warn_resources_arjunacore_XAOnePhaseResource_rollbackexception(XAHelper.xidToString(xid), xae);
}
catch (final Throwable ex)
{
if (jtaLogger.logger.isTraceEnabled()) {
jtaLogger.logger.trace("XAOnePhaseResource.rollback(" + xid + ") " + ex.getMessage());
}
}
return TwoPhaseOutcome.FINISH_ERROR ;
}
代码示例来源:origin: jbosstm/narayana
@Test
public void testRollbackHeuristic ()
{
SampleOnePhaseResource res = new SampleOnePhaseResource(SampleOnePhaseResource.ErrorType.heurrb);
XidImple xid = new XidImple(new Uid());
XAOnePhaseResource xares = new XAOnePhaseResource(res, xid, null);
assertEquals(xares.commit(), TwoPhaseOutcome.ONE_PHASE_ERROR);
assertTrue(res.forgetCalled());
}
}
代码示例来源:origin: jbosstm/narayana
return new LastResourceRecord(new XAOnePhaseResource(xaRes, xid, params));
代码示例来源:origin: org.jboss.narayana.jts/narayana-jts-idlj
throw generateUnpackError(new ClassNotFoundException());
throw generateUnpackError(sqle) ;
throw generateUnpackError(cnfe) ;
throw generateUnpackError(ioe) ;
throw generateUnpackError(cce) ;
代码示例来源:origin: org.jboss.jbossts.jta/narayana-jta
/**
* Commit the one phase resource.
* @return TwoPhaseOutcome.FINISH_OK or TwoPhaseOutcome.FINISH_ERROR
*/
public int rollback()
{
try
{
xaResource.rollback(xid) ;
return TwoPhaseOutcome.FINISH_OK ;
}
catch (final XAException xae)
{
addDeferredThrowable(xae);
jtaLogger.i18NLogger.warn_resources_arjunacore_XAOnePhaseResource_rollbackexception(XAHelper.xidToString(xid), xae);
}
catch (final Throwable ex)
{
if (jtaLogger.logger.isTraceEnabled()) {
jtaLogger.logger.trace("XAOnePhaseResource.rollback(" + xid + ") " + ex.getMessage());
}
}
return TwoPhaseOutcome.FINISH_ERROR ;
}
代码示例来源:origin: jbosstm/narayana
@Test
public void testRollbackHeuristic ()
{
SampleOnePhaseResource res = new SampleOnePhaseResource(ErrorType.heurrb);
XidImple xid = new XidImple(new Uid());
XAOnePhaseResource xares = new XAOnePhaseResource(res, xid, null);
assertEquals(xares.commit(), TwoPhaseOutcome.ONE_PHASE_ERROR);
assertTrue(res.forgetCalled());
}
代码示例来源:origin: org.jboss.narayana.jta/jta
return new LastResourceRecord(new XAOnePhaseResource(xaRes, xid, params));
代码示例来源:origin: org.jboss.jbossts.jta/narayana-jta
throw generateUnpackError(new ClassNotFoundException());
throw generateUnpackError(sqle) ;
throw generateUnpackError(cnfe) ;
throw generateUnpackError(ioe) ;
throw generateUnpackError(cce) ;
本文整理了Java中com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryResourceImple类的一些代码示例,展示了XARecov
本文整理了Java中com.arjuna.ats.internal.jta.resources.arjunacore.XAOnePhaseResource类的一些代码示例,展示了XAOnePhaseR
本文整理了Java中com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryResourceManagerImple类的一些代码示例,展示了
本文整理了Java中com.arjuna.ats.internal.jta.transaction.arjunacore.jca.XATerminatorImple类的一些代码示例,展示了XATerm
本文整理了Java中com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryResourceImple.typeName()方法的一些代码示
本文整理了Java中com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryResourceImple.()方法的一些代码示例,展示了XAR
本文整理了Java中com.arjuna.ats.internal.jta.resources.arjunacore.XAOnePhaseResource.addDeferredThrowable()
本文整理了Java中com.arjuna.ats.internal.jta.resources.arjunacore.XAOnePhaseResource.generateUnpackError()方
本文整理了Java中com.arjuna.ats.internal.jta.resources.arjunacore.XAOnePhaseResource.()方法的一些代码示例,展示了XAOnePh
本文整理了Java中com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryResourceManagerImple.()方法的一些代码示例
本文整理了Java中com.arjuna.ats.internal.jta.transaction.arjunacore.jca.XATerminatorImple.()方法的一些代码示例,展示了XA
本文整理了Java中com.arjuna.ats.internal.jta.transaction.arjunacore.jca.XATerminatorImple.doRecover()方法的一些代
本文整理了Java中com.arjuna.ats.internal.jta.transaction.arjunacore.jca.XATerminatorImple.commit()方法的一些代码示例
我是一名优秀的程序员,十分优秀!