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


Java TransactionAttributeType.SUPPORTS属性代码示例

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


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

示例1: testGetHandlerForBeanClassAndMethod1

@Test
public void testGetHandlerForBeanClassAndMethod1() throws Exception {
    @TransactionAttribute(TransactionAttributeType.SUPPORTS)
    class Bean implements Runnable {
        @TransactionAttribute(TransactionAttributeType.MANDATORY)
        public void run() {
        }
    }
    assertSame(TransactionInvocationHandlers.TX_MANDATORY,
            TransactionInvocationHandlers.getHandlerFor(Bean.class,
                    Bean.class.getMethod("run")));
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:12,代码来源:TransactionInvocationHandlersTest.java

示例2: testGetHandlerForBeanClassAndMethod2

@Test
public void testGetHandlerForBeanClassAndMethod2() throws Exception {
    @TransactionAttribute(TransactionAttributeType.SUPPORTS)
    class Bean implements Runnable {
        public void run() {
        }
    }
    assertSame(TransactionInvocationHandlers.TX_SUPPORTS,
            TransactionInvocationHandlers.getHandlerFor(Bean.class,
                    Bean.class.getMethod("run")));
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:11,代码来源:TransactionInvocationHandlersTest.java

示例3: testGetHandlerForBeanClassAndMethod1

@Test
public void testGetHandlerForBeanClassAndMethod1() throws Exception {
    @TransactionAttribute(TransactionAttributeType.SUPPORTS)
    class Bean implements Runnable {
        @Override
        @TransactionAttribute(TransactionAttributeType.MANDATORY)
        public void run() {
        }
    }
    assertSame(TransactionInvocationHandlers.TX_MANDATORY,
            TransactionInvocationHandlers.getHandlerFor(Bean.class,
                    Bean.class.getMethod("run")));
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:13,代码来源:TransactionInvocationHandlersTest.java

示例4: testGetHandlerForBeanClassAndMethod2

@Test
public void testGetHandlerForBeanClassAndMethod2() throws Exception {
    @TransactionAttribute(TransactionAttributeType.SUPPORTS)
    class Bean implements Runnable {
        @Override
        public void run() {
        }
    }
    assertSame(TransactionInvocationHandlers.TX_SUPPORTS,
            TransactionInvocationHandlers.getHandlerFor(Bean.class,
                    Bean.class.getMethod("run")));
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:12,代码来源:TransactionInvocationHandlersTest.java

示例5: createFooSupports

@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public void createFooSupports(String name){
    Foo foo = new Foo(name);
    em.persist(foo);
}
 
开发者ID:arcuri82,项目名称:testing_security_development_enterprise_systems,代码行数:5,代码来源:EJB_07_MANDATORY.java

示例6: isPresentSupports

@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public boolean isPresentSupports(String name){
    return em.find(Foo.class, name) != null;
}
 
开发者ID:arcuri82,项目名称:testing_security_development_enterprise_systems,代码行数:4,代码来源:EJB_07_MANDATORY.java

示例7: isPresentWithSupports

@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public boolean isPresentWithSupports(String name){
    return em.find(Foo.class, name) != null;
}
 
开发者ID:arcuri82,项目名称:testing_security_development_enterprise_systems,代码行数:4,代码来源:EJB_04_SUPPORTS.java

示例8: createFooWithSupports

@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public void createFooWithSupports(String name){
    Foo foo = new Foo(name);
    em.persist(foo);
}
 
开发者ID:arcuri82,项目名称:testing_security_development_enterprise_systems,代码行数:5,代码来源:EJB_04_SUPPORTS.java

示例9: getAllBooks

@TransactionAttribute(TransactionAttributeType.SUPPORTS)
public Collection<Book> getAllBooks() {
	return em.createQuery("FROM Book", Book.class).getResultList();
}
 
开发者ID:wwu-pi,项目名称:tap17-muggl-javaee,代码行数:4,代码来源:BookServiceBean.java


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