activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From deepak_a <angesh...@gmail.com>
Subject Auto commit issue with SQL Server + ActiveMQ
Date Wed, 11 Dec 2013 09:30:01 GMT
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.

Mime
View raw message