0 Replies Latest reply on Jan 12, 2013 3:34 PM by martian

    JBoss 5.1.0 datasource configuration "autocommit"

    martian Newbie

      I have a question regarding the datasource configuration in JBoss 5.1.0. I have a XA datasource configured using Oracle 11g as the database. The ojdbc6.jar has been copied over into the servers "lib" folder. I'm able to get the connection successfully but the "autocommit" for it seems to be set to "true". Is this by design?


      The way it exhibits itself is, when we are running a spring batch job that uses a cursor based item reader, after the first commit by the framework (for the writer), the cursor loses its position. I can see Spring batch is trying to open the cursor using FOR READ but that doesn't seem to make a difference. On digging into it, it seems like setting the "autocommit" to "false" on the connection would help. I just can't seem to find any documentation on how to do this for a XA connection.


      Usual suspects like settings <xa-datasource-property name="autoCommit">false</xa-datasource-property> doesn't work. Any ideas? Would really appreciate any pointers ....





      <xa-datasource-property name="DatabaseName">abc</xa-datasource-property>

      <xa-datasource-property name="User">user</xa-datasource-property>

      <xa-datasource-property name="Password">password</xa-datasource-property>

      <xa-datasource-property name="PortNumber">1521</xa-datasource-property>

      <xa-datasource-property name="DriverType">4</xa-datasource-property>

      <xa-datasource-property name="ServerName"></xa-datasource-property>

      <xa-datasource-property name="URL">jdbc:oracle:thin:@localhost:1521:abc</xa-datasource-property>