activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michalis <mixalis.varda...@gmail.com>
Subject SqlServer Master/Slave
Date Fri, 10 May 2013 13:47:10 GMT
Hi all,

I use activemq as it is embeded in SMX 4.5.0
I'm trying to use the jdbc message storage with Microsoft SQL Server as I
want to achieve master/slave topology among brokers.

In my activemq-broker.xml I have

/        <persistenceAdapter>
			<jdbcPersistenceAdapter dataDirectory="activemq-data"
dataSource="#mssql-ds" createTablesOnStartup="false" />
        </persistenceAdapter>/

and 

/ <bean id="mssql-ds" class="org.apache.commons.dbcp.BasicDataSource"
destroy-method="close">
		<property name="driverClassName"
value="com.microsoft.sqlserver.jdbc.SQLServerDriver"/>
		<property name="url"
value="jdbc:sqlserver://10.100.100.10;DatabaseName=mydb"/>
		<property name="username" value="user"/>
		<property name="password" value="password"/>
 </bean>/

The problem is that when SMX starts the activemq broker I get the following
exception

15:09:03,867 | DEBUG | rint Extender: 3 | SQLServerException               |
184 - wrap_mvn_com.microsoft.sqlserver_sqljdbc4_4.0.0 - 0.0.0 | ***
SQLException: com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR
UPDATE clause allowed only for DECLARE CURSOR. Msg 1003, Level 15, State 2,
Line 1: FOR UPDATE clause allowed only for DECLARE CURSOR.
15:09:03,867 | DEBUG | rint Extender: 3 | DefaultDatabaseLocker            |
62 - org.apache.activemq.activemq-core - 5.7.0 | Lock failure:
*com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR UPDATE clause
allowed only for DECLARE CURSOR.*
com.microsoft.sqlserver.jdbc.SQLServerException: Line 1: FOR UPDATE clause
allowed only for DECLARE CURSOR.

I searched in the forums and it seems that SqlServer does not support FOR
UPDATE so the broker cannot take the lock to the database.

Can this be fixed somehow? 

Thanks in advance,
Michalis







--
View this message in context: http://activemq.2283324.n4.nabble.com/SqlServer-Master-Slave-tp4666887.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message