Examples of TransactionConfiguration


Examples of org.multiverse.api.TransactionConfiguration

            .setFamilyName("example")
            .setReadonly(true)
            .build();

        // get transaction config from multiverse
        TransactionConfiguration config = new Atomic<TransactionConfiguration>(txFactory) {
            public TransactionConfiguration atomically() {
                ref.get();
                return ThreadLocalTransaction.getThreadLocalTransaction().getConfiguration();
            }
        }.execute();

        assertEquals("example", config.getFamilyName());
        assertEquals(true, config.isReadonly());
    }
View Full Code Here

Examples of org.springframework.test.context.transaction.TransactionConfiguration

     * the configuration attributes should be retrieved
     * @return a new TransactionConfigurationAttributes instance
     */
    private TransactionConfigurationAttributes retrieveTransactionConfigurationAttributes(Class<?> clazz) {
        Class<TransactionConfiguration> annotationType = TransactionConfiguration.class;
        TransactionConfiguration config = clazz.getAnnotation(annotationType);
        if (logger.isDebugEnabled()) {
            logger.debug("Retrieved @TransactionConfiguration [" + config + "] for test class [" + clazz + "]");
        }

        String transactionManagerName;
        boolean defaultRollback;
        if (config != null) {
            transactionManagerName = config.transactionManager();
            defaultRollback = config.defaultRollback();
        }
        else {
            transactionManagerName = (String) AnnotationUtils.getDefaultValue(annotationType, "transactionManager");
            defaultRollback = (Boolean) AnnotationUtils.getDefaultValue(annotationType, "defaultRollback");
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.