[ 
https://issues.apache.org/activemq/browse/SMX4KNL-163?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jamie Goodyear updated SMX4KNL-163:
-----------------------------------

    Attachment: smx4knl-163a.txt

smx4knl-163a.txt

This patch includes a Default JDBC lock implementation. To use this feature the 
following must be set in your environment on each system in the master/slave 
setup:

 * Classpath updated to include JDBC driver.
 * system.properties file updated to reflect the below entries.

Entries for etc/system.properties:
{noformat} 
servicemix.lock=true
servicemix.lock.class=org.apache.servicemix.kernel.main.DefaultJDBCLock
servicemix.lock.jdbc.url=jdbc:derby://dbserver:1527/sample
servicemix.lock.jdbc.driver=org.apache.derby.jdbc.ClientDriver
servicemix.lock.jdbc.user=user
servicemix.lock.jdbc.password=password
servicemix.lock.jdbc.table=SERVICEMIX_LOCK
{noformat} 

Note: 
 * The database name "sample" will be created if it does not exist on the db.
 * First SMX4 instance to acquire the locking table is the master instance.
 * Will fail if jdbc driver is not on classpath. 

Testing notes:
Was tested with the following setup:

{noformat}
SMX instances on separate hosts:
host1 (SMX4 on AIX) 
host2 (SMX4 on Mac OSX)

Standalone Database Server:
dbserver (DerbyDB on Ubuntu)
{noformat}

Disconnecting the AIX machine allowed the Mac to pick up the SMX4 lock. When 
AIX servicemix instance was restarted it waited until the Mac instance lost its 
lock on the db table lock (Mac was shutdown). 

> Provide default jdbc lock impl for master/slave deployments
> -----------------------------------------------------------
>
>                 Key: SMX4KNL-163
>                 URL: https://issues.apache.org/activemq/browse/SMX4KNL-163
>             Project: ServiceMix Kernel
>          Issue Type: New Feature
>         Environment: All
>            Reporter: Jamie Goodyear
>            Assignee: Jamie Goodyear
>             Fix For: 1.1.0
>
>         Attachments: for-discussion-only.txt, smx4knl-163.txt, 
> smx4knl-163a.txt
>
>
> Provide default jdbc lock impl for master/slave deployments.
> From note on SMX4KNL-106:
> By default, a file based locking mechanism is used. There is an interface 
> that can be implemented to allow other locking mechanisms such as JDBC. This 
> would require setting a system property for the class name of the lock (it 
> can be done in etc/system.properties) and changing the shell script to add 
> the needed jars to the boot classpath.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to