Justin Cranford - 2012-02-14

According to this FAQ, HA-JDBC should shutdown automatically in this scenario?

https://sourceforge.net/apps/mediawiki/ha-
jdbc/index.php?title=FAQ

<Quote>
So, if a statement execution results in SQLExceptions from every non-local
database - but success in every local database, AND the jgroups group size is
1 (i.e. !StateManager.isMembershipEmpty() = true), then the database cluster
is stopped (i.e. will no longer process requests, until manually started) and
an error is logged.
</Quote>

I am trying to reproduce this. Does HA-JDBC shutdown the application servers
(Tomcat), or just become unresponsive? I see my applications continueing with
oppose states, and servicing SQL locally.

What am I missing? Here is my config for one of my nodes. The other
application server has a config with the other database marked as local. Is
something misconfigured here? Why am I not seeing the specified behaviour?

<ha-jdbc>
<distributable<br>config="stacks.xml"
stack="tcp-sync"
timeout="6000"
/>
<sync
id="diffsync"
class="net.sf.hajdbc.sync.FullSynchronizationStrategy"

<property name="fetchSize">5000</property>
<property name="maxBatchSize">500</property>
</sync>
<cluster
balancer="simple"
default-sync="diffsync"
dialect="net.sf.hajdbc.dialect.MySQLDialect"
meta-data-cache="eager"
transaction-mode="serial"
failure-detect-schedule="0 0 0 1 1 ? 2000"
auto-activate-schedule="0 0 0 1 1 ? 2000"
min-threads="5"
max-threads="200"
max-idle="25"
detect-identity-columns="false"
detect-sequences="false"
eval-current-date="true"
eval-current-time="true"
eval-current-timestamp="true"
eval-rand="true"

<database id="cspm1" weight="1" local="false">
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://10.20.0.130:3306/cspm</url>
<user>user1</user>
<password>passwd</password>
</database>
<database id="cspm2" weight="1" local="true">
<driver>com.mysql.jdbc.Driver</driver>
<url>jdbc:mysql://10.20.0.102:3306/cspm</url>
<user>user1</user>
<password>passwd</password>
</database>
</cluster>
</ha-jdbc>