2 Replies Latest reply on Jul 20, 2017 10:43 AM by cfang

    jdbc repository

    mistrz_7

      I have server where aplication use jbatch proceses. For few months every think works fine. Today I switch job repository from in-memory to jdbc. Now my jobs doesn't work and in log I see:

       

      2017-07-20 16:00:09,938 WARN  [com.arjuna.ats.arjuna] (Batch Thread - 1) ARJUNA012140: Adding multiple last resources is disallowed. Trying to add LastResourceRecord(XAOnePhaseResource(LocalXAResourceImpl@172027b2[connectionListene      r=5b9e6bdf connectionManager=3843b8f5 warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff0a158c18:-a588d9e:5970b54b:a9, node_name=1, branch_uid=0:ffff0a158c18:-a588d9e:5970b54b:ac, subordinate      nodename=null, eis_name=java:/fmsFms > productName=Microsoft SQL Server productVersion=10.50.6542 jndiName=java:/fmsFms])), but already have LastResourceRecord(XAOnePhaseResource(LocalXAResourceImpl@4dd422f6[connectionListener=7d38      18c0 connectionManager=699cc45 warned=false currentXid=< formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffff0a158c18:-a588d9e:5970b54b:a9, node_name=1, branch_uid=0:ffff0a158c18:-a588d9e:5970b54b:ab, subordinatenodenam      e=null, eis_name=java:/fms > productName=Microsoft SQL Server productVersion=10.50.6542 jndiName=java:/fms]))

       

      I know that it's connected with situation that jbatch process use fmsFms database and jbatch repository is on fms databases. My apps use few databases and I can't change it. So how to resolve this problem?

       

      Regards

      sw

        • 1. Re: jdbc repository
          cfang

          looks like it's related to the transaction last resource optimization in two-phase commit.  Can you check the datasource configuration in WildFly or EAP configuration file (standalone.xml or domain.xml), and try setting it to <xa-datasource> (you might have used <datasource>).  Aside from the warning message, does it affect your application any other way?

          • 2. Re: jdbc repository
            cfang

            if your batch application does not need global transaction (e.g., item reader), you can configure the datasource to be non-jta.  That may exclude it from being enlisted by the transaction manager.