I'm not sure, and don't have the code in front of me, but could you
try on the latest release or a snapshot to reproduce?

On Wed, Dec 11, 2013 at 1:30 AM, deepak_a <angesh...@gmail.com> wrote:
> All,
>
> I am using ActiveMQ 5.6.0 SQL Server 2008 is used in backend. With SQL
> Server -
> I get the following exception
>
> 2013-12-11 09:17:15,085 WARN
> [org.apache.activemq.store.jdbc.JDBCPersistenceAdapter] (ActiveMQ Transport:
> tcp:///127.0.0.1:62351) Commit failed: commit() should not be called while
> in auto-commit mode. java.sql.SQLException: commit() should not be called
> while in auto-commit mode. at
> net.sourceforge.jtds.jdbc.ConnectionJDBC2.commit(ConnectionJDBC2.java:1878)
> ....................
> ....................
> 2013-12-11 09:17:15,089 WARN
> [org.apache.activemq.store.jdbc.JDBCPersistenceAdapter] (ActiveMQ Transport:
> tcp:///127.0.0.1:62351) Rollback failed: rollback() should not be called
> while in auto-commit mode. java.sql.SQLException: rollback() should not be
> called while in auto-commit mode. at
> net.sourceforge.jtds.jdbc.ConnectionJDBC2.rollback(ConnectionJDBC2.java:1893)
> at
> net.sourceforge.jtds.jdbcx.proxy.ConnectionProxy.rollback(ConnectionProxy.java:517)
> ....................
> ....................
> 2013-12-11 09:17:15,109 WARN
> [org.apache.activemq.store.jdbc.JDBCPersistenceAdapter] (ActiveMQ Transport:
> tcp:///127.0.0.1:62351) Error while closing connection: commit() should not
> be called while in auto-commit mode. java.sql.SQLException: commit() should
> not be called while in auto-commit mode. at
> net.sourceforge.jtds.jdbc.ConnectionJDBC2.commit(ConnectionJDBC2.java:1878)
> ....................
> ....................
> Caused by: java.sql.SQLException: commit() should not be called while in
> auto-commit mode. at
> net.sourceforge.jtds.jdbc.ConnectionJDBC2.commit(ConnectionJDBC2.java:1878)
> at
> net.sourceforge.jtds.jdbcx.proxy.ConnectionProxy.commit(ConnectionProxy.java:87)
>
> This happens when a message is to be persisted to the database.
> My broker-config is as follows Datasource is shown below
>
>
>      <persistenceAdapter>
>        <jdbcPersistenceAdapter dataSource="#reform-ds"
> useDatabaseLock="false" >
>                 </jdbcPersistenceAdapter>
>      </persistenceAdapter>
>
>
> Datasource is as follows
>
>
> <xa-datasource>
>                     <jndi-name>ReformDS</jndi-name>
>                     <track-connection-by-tx/>
>                     <isSameRM-override-value>false</isSameRM-override-value>
>
> <xa-datasource-class>net.sourceforge.jtds.jdbcx.JtdsDataSource</xa-datasource-class>
>
>                         <xa-datasource-property
> name="ServerName">LDN-LRM-PC-189</xa-datasource-property>
>                     <xa-datasource-property
> name="DatabaseName">reform</xa-datasource-property>
>                     <xa-datasource-property
> name="Instance">SQLEXPRESS</xa-datasource-property>
>                     <xa-datasource-property
> name="XaEmulation">true</xa-datasource-property>
>
>                                         <connection-property 
> name="autoCommit">false</connection-property>
>                 <track-connection-by-tx>true</track-connection-by-tx>
>                 <no-tx-separate-pools>true</no-tx-separate-pools>
>
>
> <transaction-isolation>TRANSACTION_READ_UNCOMMITTED</transaction-isolation>
>                     <min-pool-size>10</min-pool-size>
>                     <max-pool-size>30</max-pool-size>
>                     <idle-timeout-minutes>15</idle-timeout-minutes>
>                     <blocking-timeout-millis>5000</blocking-timeout-millis>
>
>                     <check-valid-connection-sql>select
> 1</check-valid-connection-sql>
>                     <set-tx-query-timeout/>
>                     <metadata>
>                       <type-mapping>MS SQLSERVER</type-mapping>
>                     </metadata>
>                         <security-domain>EncryptDBPassword</security-domain>
>
> <depends>jboss.security:service=JaasSecurityDomain,domain=ServerMasterPassword</depends>
>                 </xa-datasource>
> </datasources>
>
>
> Is this happening because - my Datasource is attempting to commit in
> addition to the auto-commit in SQL Server? -
> I don;t see any option to disable auto-commit in the Datasource though...
>
>
> regards
> D
>
>
>
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/Auto-commit-issue-with-SQL-Server-ActiveMQ-tp4675355.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.



-- 
Christian Posta
http://www.christianposta.com/blog
twitter: @christianposta

Reply via email to