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


Java TransactionAttributeType.NEVER属性代码示例

本文整理汇总了Java中javax.ejb.TransactionAttributeType.NEVER属性的典型用法代码示例。如果您正苦于以下问题:Java TransactionAttributeType.NEVER属性的具体用法?Java TransactionAttributeType.NEVER怎么用?Java TransactionAttributeType.NEVER使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.ejb.TransactionAttributeType的用法示例。


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

示例1: testGetHandlerForBeanClass1

@Test
public void testGetHandlerForBeanClass1() {
    @TransactionAttribute(TransactionAttributeType.NEVER)
    class Bean {
    }
    assertSame(TransactionInvocationHandlers.TX_NEVER,
            TransactionInvocationHandlers.getHandlerFor(Bean.class));
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:8,代码来源:TransactionInvocationHandlersTest.java

示例2: testCall

@Test
public void testCall() throws Exception {
    final Object value = new Object();
    @TransactionAttribute(TransactionAttributeType.NEVER)
    class Bean implements Callable<Object> {
        public Object call() {
            return value;
        }
    }
    DeployedSessionBean bean = new DeployedSessionBean(tmStub,
            sessionContext, new Bean());
    assertSame(value, bean.getInterfaceOrClass(Callable.class).call());
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:13,代码来源:DeployedSessionBeanTest.java

示例3: testCallWithSystemException

@Test(expected = EJBException.class)
public void testCallWithSystemException() {
    @TransactionAttribute(TransactionAttributeType.NEVER)
    class Bean implements Runnable {
        public void run() {
            throw new RuntimeException();
        }
    }
    DeployedSessionBean bean = new DeployedSessionBean(tmStub,
            sessionContext, new Bean());
    bean.getInterfaceOrClass(Runnable.class).run();
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:12,代码来源:DeployedSessionBeanTest.java

示例4: testCallWithApplicationException1

@Test(expected = AppException.class)
public void testCallWithApplicationException1() {
    @TransactionAttribute(TransactionAttributeType.NEVER)
    class Bean implements Runnable {
        public void run() {
            throw new AppException();
        }
    }
    DeployedSessionBean bean = new DeployedSessionBean(tmStub,
            sessionContext, new Bean());
    bean.getInterfaceOrClass(Runnable.class).run();
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:12,代码来源:DeployedSessionBeanTest.java

示例5: testCallWithApplicationException2

@Test(expected = IOException.class)
public void testCallWithApplicationException2() throws Exception {
    @TransactionAttribute(TransactionAttributeType.NEVER)
    class Bean implements Callable<Void> {
        public Void call() throws Exception {
            throw new IOException();
        }
    }
    DeployedSessionBean bean = new DeployedSessionBean(tmStub,
            sessionContext, new Bean());
    bean.getInterfaceOrClass(Callable.class).call();
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:12,代码来源:DeployedSessionBeanTest.java

示例6: checkMultipleInvocations

@TransactionAttribute(TransactionAttributeType.NEVER)
@PermitAll
@Override
public void checkMultipleInvocations() throws NamingException {
	HashSet<String> servers = new HashSet<String>();
	
	for(int i = 0 ; i <10 ; i++) {
		final String server = proxy.getJBossServerName();
		log.fine("Invocation routed to server " + server);
		servers.add(server);
	}
	log.info("Invocations routed to the following servers : " + servers);
}
 
开发者ID:wfink,项目名称:jboss-eap7.1-playground,代码行数:13,代码来源:DelegateROCBean.java

示例7: getTrue

@TransactionAttribute(TransactionAttributeType.NEVER)
public boolean getTrue(){
    return true;
}
 
开发者ID:arcuri82,项目名称:testing_security_development_enterprise_systems,代码行数:4,代码来源:EJB_09_NEVER.java


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