You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Pat Fox (JIRA)" <ji...@apache.org> on 2013/10/31 20:35:17 UTC

[jira] [Created] (AMQ-4841) lease-database-locker does not use the configured tablePrefix in UPDATE statement

Pat Fox created AMQ-4841:
----------------------------

             Summary:  lease-database-locker does not use the configured tablePrefix in UPDATE statement
                 Key: AMQ-4841
                 URL: https://issues.apache.org/jira/browse/AMQ-4841
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker
    Affects Versions: 5.9.0
         Environment: - tested on latest trunk
            Reporter: Pat Fox
         Attachments: JDBCLockTablePrefixTest.java

Using the configuration
{code}
<persistenceAdapter>
    <jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#mysql-ds" lockKeepAlivePeriod="5000">
        		       <locker>
					<lease-database-locker lockAcquireSleepInterval="10000"/>
				</locker>
				<statements>
					<statements tablePrefix="TTT_" messageTableName="AMQ_MSGS" durableSubAcksTableName="AMQ_ACKS" lockTableName="AMQ_LOCK"/>
				</statements>
        		      <adapter>
					<mysql-jdbc-adapter/>
				</adapter>
			</jdbcPersistenceAdapter>
		</persistenceAdapter>
{code}

The logging show the Lock table was created WITH the configured prefix but the lease locker UPDATE statement does not use that prefix

{code}
2013-10-30 14:33:03,245 | DEBUG | Executing SQL: CREATE TABLE TTT_AMQ_LOCK( ID BIGINT NOT NULL, TIME BIGINT, BROKER_NAME VARCHAR(250), PRIMARY KEY (ID) ) ENGINE=INNODB | org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter | main

...

2013-10-30 14:33:10,889 | DEBUG | jdbcBroker, lease keepAlive Query is UPDATE ACTIVEMQ_LOCK SET BROKER_NAME=?, TIME=? WHERE BROKER_NAME=? AND ID = 1 | org.apache.activemq.store.jdbc.LeaseDatabaseLocker | ActiveMQ JDBC PA Scheduled Task
{code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)