Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-10671

camel-jdbc transaction does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.5-ER1
    • jboss-fuse-6.3
    • Camel
    • % %
    • +
    • Hide
      1. setup postgresql
        create database reproducer;
        \u reproducer;
        create table TESTCOMMIT(key int NOT NULL UNIQUE, PRIMARY KEY (key));
        create table TESTROLLBACK(key int NOT NULL UNIQUE, PRIMARY KEY (key));
        create table TESTROLLBACK2(key int NOT NULL UNIQUE, PRIMARY KEY (key));
        insert into TESTROLLBACK VALUES(2);
        
      2. setup Fuse 6.3 r11
        start karaf contianer
        features:addurl mvn:org.ops4j.pax.jdbc/pax-jdbc-features/0.9.0/xml/features
        features:install pax-jdbc-postgresql 
        install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.4_3
        features:install spring-jdbc
        features:install camel-jdbc
        
      3. run reproducer
        download and unzip attached jbds projects, and do mvn clean install
        deploy the bundle
        
      4. check postgresql
        select count(*) from TESTCOMMIT;
          // The result shuod be 2
        select count(*) from TESTROLLBACK;
          // The result shuod be 1
        select count(*) from TESTROLLBACK2;
          // The result shuod be 0
        
      5. clean up table for next try;
        delete from TESTCOMMIT;
        delete from TESTROLLBACK;
        delete from TESTROLLBACK2;
        insert into TESTROLLBACK VALUES(2);
        
      Show
      setup postgresql create database reproducer; \u reproducer; create table TESTCOMMIT(key int NOT NULL UNIQUE, PRIMARY KEY (key)); create table TESTROLLBACK(key int NOT NULL UNIQUE, PRIMARY KEY (key)); create table TESTROLLBACK2(key int NOT NULL UNIQUE, PRIMARY KEY (key)); insert into TESTROLLBACK VALUES(2); setup Fuse 6.3 r11 start karaf contianer features:addurl mvn:org.ops4j.pax.jdbc/pax-jdbc-features/0.9.0/xml/features features:install pax-jdbc-postgresql install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-dbcp/1.4_3 features:install spring-jdbc features:install camel-jdbc run reproducer download and unzip attached jbds projects, and do mvn clean install deploy the bundle check postgresql select count(*) from TESTCOMMIT; // The result shuod be 2 select count(*) from TESTROLLBACK; // The result shuod be 1 select count(*) from TESTROLLBACK2; // The result shuod be 0 clean up table for next try; delete from TESTCOMMIT; delete from TESTROLLBACK; delete from TESTROLLBACK2; insert into TESTROLLBACK VALUES(2);
    • Fuse 7.4 Sprint 47 - Bug Fix

      Although there is "transacted" option for camel-jdbc and official documents mention about it(1), camel-jdbc transaction does not work as expected.

      (1)
      https://access.redhat.com/documentation/en-us/red_hat_jboss_fuse/6.3/html/transaction_guide/txndemarcation#TxnDemarcation-ByMarking

            zfeng@redhat.com Zheng Feng
            rhn-support-hfuruich Hisao Furuichi
            Tomas Turek Tomas Turek
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: