Examples of SpringTransactionPolicy


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

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

                // use this error handler instead of DeadLetterChannel that is the default
                // Notice: transactionErrorHandler is in SpringRouteBuilder
                if (useTransactionErrorHandler) {
                    // useTransactionErrorHandler is only used for unit testing to reuse code
View Full Code Here

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

        // Notice that we use the SpringRouteBuilder that has a few more features than
        // the standard RouteBuilder
        return new SpringRouteBuilder() {
            public void configure() throws Exception {
                // setup the transaction policy
                SpringTransactionPolicy required = lookup("PROPAGATION_REQUIRED", SpringTransactionPolicy.class);

                // use transaction error handler
                errorHandler(transactionErrorHandler(required));

                // must setup policy for each route
View Full Code Here

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

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new SpringRouteBuilder() {
            public void configure() throws Exception {
                // use required as transaction policy
                SpringTransactionPolicy required = lookup("PROPAGATION_REQUIRED", SpringTransactionPolicy.class);

                // configure to use transaction error handler and pass on the required as it will fetch
                // the transaction manager from it that it needs
                errorHandler(transactionErrorHandler(required));
View Full Code Here

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

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

                // use this error handler instead of DeadLetterChannel that is the default
                // Notice: transactionErrorHandler is in SpringRouteBuilder
                if (useTransactionErrorHandler) {
                    // useTransactionErrorHandler is only used for unit testing to reuse code
View Full Code Here

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

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new SpringRouteBuilder() {
            public void configure() throws Exception {
                // use required as transaction policy
                SpringTransactionPolicy required = lookup("PROPAGATION_REQUIRED", SpringTransactionPolicy.class);

                // configure to use transaction error handler and pass on the required as it will fetch
                // the transaction manager from it that it needs
                errorHandler(transactionErrorHandler(required));
View Full Code Here

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

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

                // use this error handler instead of DeadLetterChannel that is the default
                // Notice: transactionErrorHandler is in SpringRouteBuilder
                if (isUseTransactionErrorHandler()) {
                    // useTransactionErrorHandler is only used for unit testing to reuse code
View Full Code Here

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

        // Notice that we use the SpringRouteBuilder that has a few more features than
        // the standard RouteBuilder
        return new SpringRouteBuilder() {
            public void configure() throws Exception {
                // setup the transaction policy
                SpringTransactionPolicy required = lookup("PROPAGATION_REQUIRED", SpringTransactionPolicy.class);

                // use transaction error handler
                errorHandler(transactionErrorHandler(required));

                // must setup policy for each route
View Full Code Here

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

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new SpringRouteBuilder() {
            public void configure() throws Exception {
                // use required as transaction policy
                SpringTransactionPolicy required = lookup("PROPAGATION_REQUIRED", SpringTransactionPolicy.class);

                // configure to use transaction error handler and pass on the required as it will fetch
                // the transaction manager from it that it needs
                errorHandler(transactionErrorHandler(required));
View Full Code Here

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

    protected RouteBuilder createRouteBuilder() throws Exception {
        return new SpringRouteBuilder() {
            public void configure() throws Exception {
                // use required as transaction policy
                SpringTransactionPolicy required = lookup("PROPAGATION_REQUIRED", SpringTransactionPolicy.class);

                // configure to use transaction error handler and pass on the required as it will fetch
                // the transaction manager from it that it needs
                errorHandler(transactionErrorHandler(required));
View Full Code Here

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

       
        DataSourceTransactionManager txMgr = new DataSourceTransactionManager();
        txMgr.setDataSource(ds);
        reg.bind("txManager", txMgr);
       
        SpringTransactionPolicy txPolicy = new SpringTransactionPolicy();
        txPolicy.setTransactionManager(txMgr);
        txPolicy.setPropagationBehaviorName("PROPAGATION_REQUIRED");
        reg.bind("required", txPolicy);
       
        return reg;
    }
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.