Author: buildbot
Date: Thu Mar 20 09:22:38 2014
New Revision: 902501

Log:
Production update by buildbot for activemq

Modified:
    websites/production/activemq/content/cache/main.pageCache
    websites/production/activemq/content/pluggable-storage-lockers.html

Modified: websites/production/activemq/content/cache/main.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/activemq/content/pluggable-storage-lockers.html
==============================================================================
--- websites/production/activemq/content/pluggable-storage-lockers.html 
(original)
+++ websites/production/activemq/content/pluggable-storage-lockers.html Thu Mar 
20 09:22:38 2014
@@ -98,7 +98,7 @@
         </locker>
     </jdbcPersistenceAdapter>
 &lt;/persistenceAdapter&gt;]]></script>
-</div></div><p>The Database Locker uses its&#160;<code>keepAlive</code> method 
to ensure the broker still holds the lock. You can set the keep alive period 
using the <code>lockKeepAlivePeriod</code> property. The default period is 
30000 ms.</p><p>A problem with this locker can occur when the master broker 
crashes or loses its connection to the database. The information about the lock 
remains in the database, until the database responds to the half closed socket 
connection via a tcp timeout. The database lock expiry requirement can prevent 
the slave from starting for a period. In addition, where the database supports 
failover, and the connection is dropped in the event of a replica failover, the 
broker sees this as a failure and both master and slave will again compete for 
a lock.</p><h3 id="Pluggablestoragelockers-LeaseDatabaseLocker">Lease Database 
Locker</h3><p>The Lease Database Locker solves the master/slave problems of the 
default Database Locker. It does so by having the maste
 r broker acquire a lock that's only valid for a short period. To retain the 
lock the master broker must periodically extend the lock's lease. The slave 
broker also checks periodically to see if the lease has expired. The lease can 
survive a db replica failover. You can configure it like this:</p><div 
class="code panel pdl" style="border-width: 1px;"><div class="codeContent 
panelContent pdl">
+</div></div><p>The Database Locker uses its&#160;<code>keepAlive</code> method 
to ensure the broker still holds the lock. You can set the keep alive period 
using the <code>lockKeepAlivePeriod</code> property. The default period is 
30000 ms. If a broker fails to acquire the lock on the database, it will retry 
every lockAcquireSleepInterval milliseconds.</p><p>This locker opens a JDBC 
transaction against a database table (activemq_lock) that lasts as long as the 
broker remains alive. This locks the entire table and prevents another broker 
from accessing the store. In most cases this will be a fairly long running JDBC 
transaction which occupies resources on the database over time.</p><p>A problem 
with this locker can occur when the master broker crashes or loses its 
connection to the database. The information about the lock remains in the 
database, until the database responds to the half closed socket connection via 
a tcp timeout. The database lock expiry requirement can prevent the sl
 ave from starting for a period. In addition, if the database supports 
failover, and the connection is dropped in the event of a replica failover, 
that JDBC transaction will be rolled back. The broker sees this as a failure 
and both master and slave will again compete for a lock.</p><h3 
id="Pluggablestoragelockers-LeaseDatabaseLocker">Lease Database 
Locker</h3><p>The Lease Database Locker solves the master/slave problems of the 
default Database Locker. It does not open a long running JDBC transaction but 
lets the master broker acquire a lock that's only valid for a short period. To 
retain the lock the master broker must periodically extend the lock's lease. 
The slave broker also checks periodically to see if the lease has expired. The 
lease can survive a db replica failover. You can configure it like 
this:</p><div class="code panel pdl" style="border-width: 1px;"><div 
class="codeContent panelContent pdl">
 <script class="theme: Default; brush: xml; gutter: false" 
type="syntaxhighlighter"><![CDATA[&lt;persistenceAdapter&gt;
        &lt;jdbcPersistenceAdapter dataDirectory=&quot;${activemq.data}&quot; 
dataSource=&quot;#mysql-ds&quot; lockKeepAlivePeriod=&quot;5000&quot;&gt;
                &lt;locker&gt;


Reply via email to