当前位置: 首页>>代码示例>>Java>>正文


Java TransactionRolledBackRuntimeException类代码示例

本文整理汇总了Java中javax.jms.TransactionRolledBackRuntimeException的典型用法代码示例。如果您正苦于以下问题:Java TransactionRolledBackRuntimeException类的具体用法?Java TransactionRolledBackRuntimeException怎么用?Java TransactionRolledBackRuntimeException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TransactionRolledBackRuntimeException类属于javax.jms包,在下文中一共展示了TransactionRolledBackRuntimeException类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: convertToRuntimeException

import javax.jms.TransactionRolledBackRuntimeException; //导入依赖的package包/类
public static JMSRuntimeException convertToRuntimeException(JMSException e) {
    if (e instanceof javax.jms.IllegalStateException) {
        return new IllegalStateRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof InvalidClientIDException) {
        return new InvalidClientIDRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof InvalidDestinationException) {
        return new InvalidDestinationRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof InvalidSelectorException) {
        return new InvalidSelectorRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof JMSSecurityException) {
        return new JMSSecurityRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof MessageFormatException) {
        return new MessageFormatRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof MessageNotWriteableException) {
        return new MessageNotWriteableRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof ResourceAllocationException) {
        return new ResourceAllocationRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof TransactionInProgressException) {
        return new TransactionInProgressRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof TransactionRolledBackException) {
        return new TransactionRolledBackRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    return new JMSRuntimeException(e.getMessage(), e.getErrorCode(), e);
}
 
开发者ID:ops4j,项目名称:org.ops4j.pax.transx,代码行数:34,代码来源:Utils.java

示例2: convertToRuntimeException

import javax.jms.TransactionRolledBackRuntimeException; //导入依赖的package包/类
/**
 * Converts instances of sub-classes of {@link JMSException} into the corresponding sub-class of
 * {@link JMSRuntimeException}.
 *
 * @param e
 * @return
 */
public static JMSRuntimeException convertToRuntimeException(JMSException e) {
   if (e instanceof javax.jms.IllegalStateException) {
      return new IllegalStateRuntimeException(e.getMessage(), e.getErrorCode(), e);
   }
   if (e instanceof InvalidClientIDException) {
      return new InvalidClientIDRuntimeException(e.getMessage(), e.getErrorCode(), e);
   }
   if (e instanceof InvalidDestinationException) {
      return new InvalidDestinationRuntimeException(e.getMessage(), e.getErrorCode(), e);
   }
   if (e instanceof InvalidSelectorException) {
      return new InvalidSelectorRuntimeException(e.getMessage(), e.getErrorCode(), e);
   }
   if (e instanceof JMSSecurityException) {
      return new JMSSecurityRuntimeException(e.getMessage(), e.getErrorCode(), e);
   }
   if (e instanceof MessageFormatException) {
      return new MessageFormatRuntimeException(e.getMessage(), e.getErrorCode(), e);
   }
   if (e instanceof MessageNotWriteableException) {
      return new MessageNotWriteableRuntimeException(e.getMessage(), e.getErrorCode(), e);
   }
   if (e instanceof ResourceAllocationException) {
      return new ResourceAllocationRuntimeException(e.getMessage(), e.getErrorCode(), e);
   }
   if (e instanceof TransactionInProgressException) {
      return new TransactionInProgressRuntimeException(e.getMessage(), e.getErrorCode(), e);
   }
   if (e instanceof TransactionRolledBackException) {
      return new TransactionRolledBackRuntimeException(e.getMessage(), e.getErrorCode(), e);
   }
   return new JMSRuntimeException(e.getMessage(), e.getErrorCode(), e);
}
 
开发者ID:apache,项目名称:activemq-artemis,代码行数:41,代码来源:JmsExceptionUtils.java

示例3: toRuntimeException

import javax.jms.TransactionRolledBackRuntimeException; //导入依赖的package包/类
public static JMSRuntimeException toRuntimeException(final JMSException e) {
    if (e instanceof javax.jms.IllegalStateException) {
        return new IllegalStateRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof InvalidClientIDException) {
        return new InvalidClientIDRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof InvalidDestinationException) {
        return new InvalidDestinationRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof InvalidSelectorException) {
        return new InvalidSelectorRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof JMSSecurityException) {
        return new JMSSecurityRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof MessageFormatException) {
        return new MessageFormatRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof MessageNotWriteableException) {
        return new MessageNotWriteableRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof ResourceAllocationException) {
        return new ResourceAllocationRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof TransactionInProgressException) {
        return new TransactionInProgressRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    if (e instanceof TransactionRolledBackException) {
        return new TransactionRolledBackRuntimeException(e.getMessage(), e.getErrorCode(), e);
    }
    return new JMSRuntimeException(e.getMessage(), e.getErrorCode(), e);
}
 
开发者ID:apache,项目名称:tomee,代码行数:34,代码来源:JMS2.java

示例4: testConvertsTransactionRolledBackExceptionToTransactionRolledBackRuntimeException

import javax.jms.TransactionRolledBackRuntimeException; //导入依赖的package包/类
@Test(expected = TransactionRolledBackRuntimeException.class)
public void testConvertsTransactionRolledBackExceptionToTransactionRolledBackRuntimeException() {
    throw JMSExceptionSupport.createRuntimeException(new TransactionRolledBackException("error"));
}
 
开发者ID:messaginghub,项目名称:pooled-jms,代码行数:5,代码来源:JMSExceptionSupportTest.java

示例5: testConvertsTransactionRolledBackExceptionToTransactionRolledBackRuntimeException

import javax.jms.TransactionRolledBackRuntimeException; //导入依赖的package包/类
@Test(expected = TransactionRolledBackRuntimeException.class)
public void testConvertsTransactionRolledBackExceptionToTransactionRolledBackRuntimeException() {
    throw JmsExceptionSupport.createRuntimeException(new TransactionRolledBackException("error"));
}
 
开发者ID:apache,项目名称:qpid-jms,代码行数:5,代码来源:JmsExceptionSupportTest.java


注:本文中的javax.jms.TransactionRolledBackRuntimeException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。