Package org.apache.camel.spring.spi

Examples of org.apache.camel.spring.spi.SpringTransactionPolicy


        DataSource auditDataSource = EmbeddedDataSourceFactory.getDataSource("sql/schema.sql");

        DataSourceTransactionManager transactionManager = new DataSourceTransactionManager(auditDataSource);
        registry.put("transactionManager", transactionManager);

        SpringTransactionPolicy propagationRequired = new SpringTransactionPolicy();
        propagationRequired.setTransactionManager(transactionManager);
        propagationRequired.setPropagationBehaviorName("PROPAGATION_REQUIRED");
        registry.put("PROPAGATION_REQUIRED", propagationRequired);

        auditLogDao = new AuditLogDao(auditDataSource);

        CamelContext camelContext = new DefaultCamelContext(registry);
View Full Code Here


        DataSourceTransactionManager transactionManager = new DataSourceTransactionManager(dataSource);
        registry.put("transactionManager", transactionManager);

        {
            SpringTransactionPolicy propagationRequired = new SpringTransactionPolicy();
            propagationRequired.setTransactionManager(transactionManager);
            propagationRequired.setPropagationBehaviorName("PROPAGATION_REQUIRED");
            registry.put("PROPAGATION_REQUIRED", propagationRequired);
        }

        {
            SpringTransactionPolicy propagationNotSupported = new SpringTransactionPolicy();
            propagationNotSupported.setTransactionManager(transactionManager);
            propagationNotSupported.setPropagationBehaviorName("PROPAGATION_NOT_SUPPORTED");
            registry.put("PROPAGATION_NOT_SUPPORTED", propagationNotSupported);
        }

        auditLogDao = new AuditLogDao(dataSource);
        messageDao = new MessageDao(dataSource);
View Full Code Here

        JmsTransactionManager jmsTransactionManager = new JmsTransactionManager();
        jmsTransactionManager.setConnectionFactory(connectionFactory);
        registry.put("jmsTransactionManager", jmsTransactionManager);

        SpringTransactionPolicy policy = new SpringTransactionPolicy();
        policy.setTransactionManager(jmsTransactionManager);
        policy.setPropagationBehaviorName("PROPAGATION_REQUIRED");
        registry.put("PROPAGATION_REQUIRED", policy);

        CamelContext camelContext = new DefaultCamelContext(registry);

        ActiveMQComponent activeMQComponent = new ActiveMQComponent();
View Full Code Here

        DataSourceTransactionManager transactionManager = new DataSourceTransactionManager(dataSource);
        registry.put("transactionManager", transactionManager);

        {
            SpringTransactionPolicy propagationRequiresNew = new SpringTransactionPolicy();
            propagationRequiresNew.setTransactionManager(transactionManager);
            propagationRequiresNew.setPropagationBehaviorName("PROPAGATION_REQUIRES_NEW");
            registry.put("PROPAGATION_REQUIRES_NEW", propagationRequiresNew);
        }

        {
            SpringTransactionPolicy propagationRequiresNew2 = new SpringTransactionPolicy();
            propagationRequiresNew2.setTransactionManager(transactionManager);
            propagationRequiresNew2.setPropagationBehaviorName("PROPAGATION_REQUIRES_NEW");
            registry.put("PROPAGATION_REQUIRES_NEW-2", propagationRequiresNew2);
        }

        auditLogDao = new AuditLogDao(dataSource);
        messageDao = new MessageDao(dataSource);
View Full Code Here

        DataSource auditDataSource = EmbeddedDataSourceFactory.getDataSource("sql/schema.sql");

        DataSourceTransactionManager transactionManager = new DataSourceTransactionManager(auditDataSource);
        registry.put("transactionManager", transactionManager);

        SpringTransactionPolicy propagationRequired = new SpringTransactionPolicy();
        propagationRequired.setTransactionManager(transactionManager);
        propagationRequired.setPropagationBehaviorName("PROPAGATION_REQUIRED");
        registry.put("PROPAGATION_REQUIRED", propagationRequired);

        auditLogDao = new AuditLogDao(auditDataSource);

        CamelContext camelContext = new DefaultCamelContext(registry);
View Full Code Here

        //registry.put("auditDataSource", auditDataSource);

        DataSourceTransactionManager transactionManager = new DataSourceTransactionManager(auditDataSource);
        registry.put("transactionManager", transactionManager);

        SpringTransactionPolicy propagationRequired = new SpringTransactionPolicy();
        propagationRequired.setTransactionManager(transactionManager);
        propagationRequired.setPropagationBehaviorName("PROPAGATION_REQUIRED");
        registry.put("PROPAGATION_REQUIRED", propagationRequired);

        auditLogDao = new AuditLogDao(auditDataSource);

        CamelContext camelContext = new DefaultCamelContext(registry);
View Full Code Here

        dataSource = EmbeddedDataSourceFactory.getDataSource("sql/schema.sql");

        DataSourceTransactionManager transactionManager = new DataSourceTransactionManager(dataSource);
        registry.put("transactionManager", transactionManager);

        SpringTransactionPolicy propagationRequired = new SpringTransactionPolicy();
        propagationRequired.setTransactionManager(transactionManager);
        propagationRequired.setPropagationBehaviorName("PROPAGATION_REQUIRED");
        registry.put("PROPAGATION_REQUIRED", propagationRequired);

        auditLogDao = new AuditLogDao(dataSource);
        messageDao = new MessageDao(dataSource);
View Full Code Here

        jtaTransactionManager.setTransactionManager(userTransactionManager);
        jtaTransactionManager.setUserTransaction(userTransactionImp);

        registry.put("jta.transactionManager", jtaTransactionManager);

        SpringTransactionPolicy propagationRequired = new SpringTransactionPolicy();
        propagationRequired.setTransactionManager(jtaTransactionManager);
        propagationRequired.setPropagationBehaviorName("PROPAGATION_REQUIRED");
        registry.put("PROPAGATION_REQUIRED", propagationRequired);


        auditLogDao = new AuditLogDao(jdbcDataSource);
View Full Code Here

* @version $Revision: 781988 $
*/
public class AnnotatedRoute extends SpringRouteBuilder {

    public void configure() throws Exception {
        SpringTransactionPolicy required = getContext().getRegistry()
            .lookup("PROPAGATION_REQUIRED", SpringTransactionPolicy.class);

        from("direct:okay").
                policy(required).
                setBody(constant("Tiger in Action")).beanRef("bookService").
View Full Code Here

        // the standard RouteBuilder
        return new SpringRouteBuilder() {
            public void configure() throws Exception {
                // START SNIPPET: e1
                // setup the transaction policy
                SpringTransactionPolicy required = context.getRegistry()
                    .lookup("PROPAGATION_REQUIRED", SpringTransactionPolicy.class);

                // use this error handler instead of DeadLetterChannel that is the default
                // Notice: transactionErrorHandler is in SpringRouteBuilder
                if (useTransactionErrorHandler) {
View Full Code Here

TOP

Related Classes of org.apache.camel.spring.spi.SpringTransactionPolicy

Copyright © 2018 www.massapicom. 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.