0 Replies Latest reply on Sep 21, 2015 6:00 AM by Bharath Polanki

    Optional autocommit available?

    Bharath Polanki Newbie




      I have an application which is currently running in glassfish server  with autocommit as true. In some areas my application is explicitly calling connection.commit() and few places no connection.commit() is called. So when there is no connection.commit() is called autocommit comes into picture and commits the transaction. When connection.commit() is called explicitly the transaction takes place as usual without error saying autocommit is set do not commit explicitly.



      My worry is: Now we are migrating to Jboss, how can I achieve above said situations by using JBOSS. When I deploy application in JBOSS now I am facing issues when I do call connection.commit() explicitly error message :

      java.sql.SQLException: You cannot commit with autocommit set!



      Here is my configuration currently what I have in domain.xml. My server version is Jboss 6.4.1.



      <datasource jta="true" jndi-name="XYZ/datasource" pool-name="SybaseConnectionPool" enabled="true" use-ccm="true" statistics-enabled="false">                       

      <connection-url>server url here</connection-url>

                              <connection-property name="charset">






































      A help here is really appreciated. Kindly let me know any information required from my end which you feel missing.Thanks in advance.