activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ericklip <e...@klip.com>
Subject activemq 5.7.0 lease-database-locker lockAcquireSleepInterval is fixed on 5000ms
Date Tue, 13 Nov 2012 19:31:57 GMT
i tried to configure lease-database-locker with a longer
lockAcquireSleepInterval, but it always stays on 5000ms (default value)

i tried following 2 ways, neither one works.

<persistenceAdapter>
	<jdbcPersistenceAdapter dataDirectory="${activemq.data}"
dataSource="#mysql-ds" lockKeepAlivePeriod="2000">
		<locker>
			<lease-database-locker lockAcquireSleepInterval="10000"/>
		</locker>
	</jdbcPersistenceAdapter>
</persistenceAdapter>


<persistenceAdapter>
	<jdbcPersistenceAdapter dataDirectory="${activemq.data}"
dataSource="#mysql-ds" lockKeepAlivePeriod="2000"
lockAcquireSleepInterval="10000">
		<locker>
			<lease-database-locker />
		</Locker>
	</jdbcPersistenceAdapter>
</persistenceAdapter>


i looked at source code, looks LeaseDatabaseLocker configure  method
overwrote external setting,  is there any way to get around of it?

   public void configure(PersistenceAdapter adapter) throws IOException {
        if (adapter instanceof JDBCPersistenceAdapter) {
            this.persistenceAdapter = (JDBCPersistenceAdapter)adapter;
            this.dataSource = ((JDBCPersistenceAdapter)
adapter).getLockDataSource();
            this.statements = ((JDBCPersistenceAdapter)
adapter).getStatements();
        }
        lockAcquireSleepInterval = DEFAULT_LOCK_ACQUIRE_SLEEP_INTERVAL;
    }


thanks

Eric



--
View this message in context: http://activemq.2283324.n4.nabble.com/activemq-5-7-0-lease-database-locker-lockAcquireSleepInterval-is-fixed-on-5000ms-tp4659273.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message