當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。