Author: tolusha
Date: 2012-02-01 09:17:53 -0500 (Wed, 01 Feb 2012)
New Revision: 5556
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/core/WorkspaceContainerFacade.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/RepositoryImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
Log:
EXOJCR-1726: Ensure that all the running transactions are over before allowing to stop the
JCR
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/core/WorkspaceContainerFacade.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/core/WorkspaceContainerFacade.java 2012-02-01
14:03:00 UTC (rev 5555)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/core/WorkspaceContainerFacade.java 2012-02-01
14:17:53 UTC (rev 5556)
@@ -188,6 +188,7 @@
setOnline();
break;
case ManageableRepository.OFFLINE :
+ suspend();
break;
case ManageableRepository.READONLY :
setReadOnly(true);
@@ -249,7 +250,10 @@
{
try
{
- component.suspend();
+ if (!component.isSuspended())
+ {
+ component.suspend();
+ }
}
catch (SuspendException e)
{
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java 2012-02-01
14:03:00 UTC (rev 5555)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/RepositoryContainer.java 2012-02-01
14:17:53 UTC (rev 5556)
@@ -31,6 +31,7 @@
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.RepositoryEntry;
import org.exoplatform.services.jcr.config.WorkspaceEntry;
+import org.exoplatform.services.jcr.core.ManageableRepository;
import org.exoplatform.services.jcr.core.nodetype.ExtendedNodeTypeManager;
import org.exoplatform.services.jcr.core.nodetype.NodeTypeDataManager;
import org.exoplatform.services.jcr.core.security.JCRRuntimePermissions;
@@ -504,6 +505,17 @@
@Override
public synchronized void stop()
{
+ RepositoryImpl repository =
(RepositoryImpl)getComponentInstanceOfType(RepositoryImpl.class);
+
+ try
+ {
+ repository.setState(ManageableRepository.OFFLINE);
+ }
+ catch (RepositoryException e)
+ {
+ log.error("Can not switch repository to OFFLINE", e);
+ }
+
super.stop();
super.unregisterAllComponents();
}
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/RepositoryImpl.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/RepositoryImpl.java 2012-02-01
14:03:00 UTC (rev 5555)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/RepositoryImpl.java 2012-02-01
14:17:53 UTC (rev 5556)
@@ -407,7 +407,6 @@
public SessionImpl getDynamicSession(String workspaceName,
Collection<MembershipEntry> membershipEntries)
throws RepositoryException
{
-
if (getState() == OFFLINE)
LOG.warn("Repository " + getName() + " is OFFLINE.");
@@ -723,10 +722,18 @@
throw new RepositoryException("First switch repository to ONLINE and then
to needed state.\n" + toString());
}
- // set state for all workspaces
- for (String workspaceName : getWorkspaceNames())
+ String[] workspaces = getWorkspaceNames();
+ if (workspaces.length > 0)
{
- getWorkspaceContainer(workspaceName).setState(state);
+ // set state for all workspaces
+ for (String workspaceName : workspaces)
+ {
+ if (!workspaceName.equals(systemWorkspaceName))
+ {
+ getWorkspaceContainer(workspaceName).setState(state);
+ }
+ }
+ getWorkspaceContainer(systemWorkspaceName).setState(state);
}
isOffline = state == OFFLINE;
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2012-02-01
14:03:00 UTC (rev 5555)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchManager.java 2012-02-01
14:17:53 UTC (rev 5556)
@@ -1200,10 +1200,10 @@
*/
public void suspend() throws SuspendException
{
- isResponsibleForResuming = true;
-
if (rpcService != null)
{
+ isResponsibleForResuming = true;
+
try
{
rpcService.executeCommandOnAllNodes(suspend, true);
@@ -1274,13 +1274,13 @@
{
throw new ResumeException(e);
}
+
+ isResponsibleForResuming = false;
}
else
{
resumeLocally();
}
-
- isResponsibleForResuming = false;
}
/**
@@ -1541,32 +1541,29 @@
{
throw new SuspendException("Can't suspend index, while reindexing in
progeress.");
}
- if (isSuspended)
- {
- throw new SuspendException("Component already suspended.");
- }
- if (handler instanceof Suspendable)
+ if (!isSuspended)
{
- ((Suspendable)handler).suspend();
- }
+ if (handler instanceof Suspendable)
+ {
+ ((Suspendable)handler).suspend();
+ }
- isSuspended = true;
+ isSuspended = true;
+ }
}
protected void resumeLocally() throws ResumeException
{
- if (!isSuspended)
+ if (isSuspended)
{
- throw new ResumeException("Component is not suspended.");
- }
+ if (handler instanceof Suspendable)
+ {
+ ((Suspendable)handler).resume();
+ }
- if (handler instanceof Suspendable)
- {
- ((Suspendable)handler).resume();
+ isSuspended = false;
}
-
- isSuspended = false;
}
/**
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2012-02-01
14:03:00 UTC (rev 5555)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2012-02-01
14:17:53 UTC (rev 5556)
@@ -968,6 +968,14 @@
finally
{
workingThreads.decrementAndGet();
+
+ if (isSuspended && workingThreads.get() == 0)
+ {
+ synchronized (workingThreads)
+ {
+ workingThreads.notifyAll();
+ }
+ }
}
}
@@ -1953,10 +1961,10 @@
*/
public void suspend() throws SuspendException
{
- isResponsibleForResuming = true;
-
if (rpcService != null)
{
+ isResponsibleForResuming = true;
+
try
{
rpcService.executeCommandOnAllNodes(suspend, true);
@@ -1995,13 +2003,13 @@
{
throw new ResumeException(e);
}
+
+ isResponsibleForResuming = false;
}
else
{
resumeLocally();
}
-
- isResponsibleForResuming = false;
}
/**
@@ -2014,36 +2022,41 @@
private void suspendLocally() throws SuspendException
{
- if (isSuspended)
+ if (!isSuspended)
{
- throw new SuspendException("Component already suspended.");
- }
+ latcher = new CountDownLatch(1);
+ isSuspended = true;
- latcher = new CountDownLatch(1);
- isSuspended = true;
-
- while (workingThreads.get() != 0)
- {
- try
+ if (workingThreads.get() > 0)
{
- Thread.sleep(50);
+ synchronized (workingThreads)
+ {
+ while (workingThreads.get() > 0)
+ {
+ try
+ {
+ workingThreads.wait();
+ }
+ catch (InterruptedException e)
+ {
+ if (LOG.isTraceEnabled())
+ {
+ LOG.trace(e.getMessage(), e);
+ }
+ }
+ }
+ }
}
- catch (InterruptedException e)
- {
- throw new SuspendException(e);
- }
}
}
private void resumeLocally() throws ResumeException
{
- if (!isSuspended)
+ if (isSuspended)
{
- throw new ResumeException("Component is not suspended.");
+ latcher.countDown();
+ isSuspended = false;
}
-
- latcher.countDown();
- isSuspended = false;
}
/**
Modified:
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml
===================================================================
---
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2012-02-01
14:03:00 UTC (rev 5555)
+++
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/cluster-config.xml 2012-02-01
14:17:53 UTC (rev 5556)
@@ -1,39 +1,54 @@
-<?xml version='1.0' encoding='UTF-8'?>
-<!-- This document was created with Syntext Serna Free. --><!DOCTYPE article
PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" []>
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This document was created with Syntext Serna Free. -->
+<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<chapter id="JCR.ClusterConfig">
-<?dbhtml filename="ch-cluster-config.html"?> <title>Configuring
JBoss AS with eXo JCR in cluster</title>
+ <?dbhtml filename="ch-cluster-config.html"?>
+
+ <title>Configuring JBoss AS with eXo JCR in cluster</title>
+
<section>
<title>Launching Cluster</title>
+
<section>
<title>Deploying eXo JCR to JBoss As</title>
+
<para>To deploy eXo JCR to JBoss, do the following steps:</para>
+
<orderedlist>
<listitem>
- <para>Download the latest version of eXo JCR .ear file
distribution.</para>
+ <para>Download the latest version of eXo JCR .ear file
+ distribution.</para>
</listitem>
+
<listitem>
<para>Copy <jcr.ear> into
<%jboss_home%/server/default/deploy></para>
</listitem>
+
<listitem>
<para>Put exo-configuration.xml to the root
<%jboss_home%/exo-configuration.xml></para>
</listitem>
+
<listitem>
<para>Configure JAAS by inserting XML fragment shown below into
<%jboss_home%/server/default/conf/login-config.xml></para>
-
- <programlisting language="xml"><application-policy
name="exo-domain">
+
+ <programlisting language="xml"><application-policy
name="exo-domain">
<authentication>
- <login-module
code="org.exoplatform.services.security.j2ee.JbossLoginModule"
flag="required"></login-module>
+ <login-module
code="org.exoplatform.services.security.j2ee.JbossLoginModule"
flag="required"></login-module>
</authentication>
</application-policy></programlisting>
</listitem>
+
<listitem>
- <para>Ensure that you use JBossTS <link
linkend="Kernel.TransactionService">Transaction Service</link> and
- JBossCache <link
linkend="JCR.JBossTransactionsService">Transaction Manager</link>. Your
exo-configuration.xml must contain such
+ <para>Ensure that you use JBossTS <link
+ linkend="Kernel.TransactionService">Transaction
Service</link> and
+ JBossCache <link
linkend="JCR.JBossTransactionsService">Transaction
+ Manager</link>. Your exo-configuration.xml must contain such
parts:</para>
-
+
<programlisting language="xml"><component>
<key>org.jboss.cache.transaction.TransactionManagerLookup</key>
<type>org.jboss.cache.GenericTransactionManagerLookup</type>^
@@ -50,72 +65,79 @@
</init-params>
</component></programlisting>
</listitem>
+
<listitem>
<para>Start server:</para>
+
<itemizedlist>
<listitem>
<para>bin/run.sh for Unix</para>
</listitem>
+
<listitem>
<para>bin/run.bat for Windows</para>
</listitem>
</itemizedlist>
</listitem>
+
<listitem>
<para>Try accessing <uri>http://localhostu:8080/browser</uri>
with
- root/exo as login/password if you have done everything right, you'll
+ root/exo as login/password if you have done everything right, you'll
get access to repository browser.</para>
</listitem>
</orderedlist>
</section>
+
<section id="JCR.ClusterConfig.JCRExternalConfig">
<title>Configuring JCR to use external configuration</title>
+
<itemizedlist>
<listitem>
<para>To manually configure repository, create a new configuration
- file (e.g., exo-jcr-configuration.xml). For details, see <link
linkend="JCR.eXoJCRconfiguration">JCR Configuration</link>. Your
+ file (e.g., exo-jcr-configuration.xml). For details, see <link
+ linkend="JCR.eXoJCRconfiguration">JCR Configuration</link>.
Your
configuration must look like:</para>
-
- <programlisting language="xml"><repository-service
default-repository="repository1">
+
+ <programlisting language="xml"><repository-service
default-repository="repository1">
<repositories>
- <repository name="repository1"
system-workspace="ws1"
default-workspace="ws1">
+ <repository name="repository1" system-workspace="ws1"
default-workspace="ws1">
<security-domain>exo-domain</security-domain>
<access-control>optional</access-control>
<authentication-policy>org.exoplatform.services.jcr.impl.core.access.JAASAuthenticator</authentication-policy>
<workspaces>
- <workspace name="ws1">
- <container
class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
+ <workspace name="ws1">
+ <container
class="org.exoplatform.services.jcr.impl.storage.jdbc.optimisation.CQJDBCWorkspaceDataContainer">
<properties>
- <property name="source-name"
value="jdbcjcr" />
- <property name="dialect"
value="oracle" />
- <property name="multi-db"
value="false" />
- <property name="update-storage"
value="false" />
- <property name="max-buffer-size"
value="200k" />
- <property name="swap-directory"
value="../temp/swap/production" />
+ <property name="source-name"
value="jdbcjcr" />
+ <property name="dialect" value="oracle"
/>
+ <property name="multi-db" value="false"
/>
+ <property name="update-storage"
value="false" />
+ <property name="max-buffer-size"
value="200k" />
+ <property name="swap-directory"
value="../temp/swap/production" />
</properties>
<value-storages>
- see "<link
linkend="conf_value_storage">Value storage
configuration</link>" part.
+ see "<link linkend="conf_value_storage">Value
storage configuration</link>" part.
</value-storages>
</container>
- <initializer
class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
+ <initializer
class="org.exoplatform.services.jcr.impl.core.ScratchWorkspaceInitializer">
<properties>
- <property name="root-nodetype"
value="nt:unstructured" />
+ <property name="root-nodetype"
value="nt:unstructured" />
</properties>
</initializer>
- <cache enabled="true"
class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
- see "<link linkend="conf_cache">Cache
configuration</link>" part.
+ <cache enabled="true"
class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+ see "<link linkend="conf_cache">Cache
configuration</link>" part.
</cache>
- <query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
- see "<link linkend="conf_indexer">Indexer
configuration</link>" part.
+ <query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+ see "<link linkend="conf_indexer">Indexer
configuration</link>" part.
</query-handler>
- <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
- see "<link linkend="conf_lock_manager">Lock
Manager configuration</link>" part.
+ <lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+ see "<link linkend="conf_lock_manager">Lock
Manager configuration</link>" part.
</lock-manager>
</workspace>
- <workspace name="ws2">
+ <workspace name="ws2">
...
</workspace>
- <workspace name="wsN">
+ <workspace name="wsN">
...
</workspace>
</workspaces>
@@ -123,10 +145,11 @@
</repositories>
</repository-service> </programlisting>
</listitem>
+
<listitem>
- <para>Then, update RepositoryServiceConfiguration configuration in
+ <para>Then, update RepositoryServiceConfiguration configuration in
exo-configuration.xml to use this file:</para>
-
+
<programlisting language="xml"><component>
<key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
<type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
@@ -142,97 +165,139 @@
</itemizedlist>
</section>
</section>
+
<section>
<title>Requirements</title>
+
<section>
<title>Environment requirements</title>
+
<itemizedlist>
<listitem>
<para>Every node of cluster MUST have the same mounted Network File
System with the read and write permissions on it.</para>
- <para>"/mnt/tornado" - path to the mounted Network File
System (all
+
+ <para>"/mnt/tornado" - path to the mounted Network File System
(all
cluster nodes must use the same NFS).</para>
</listitem>
+
<listitem>
<para>Every node of cluster MUST use the same database.</para>
</listitem>
+
<listitem>
- <para>The same Clusters on different nodes MUST have the same
- names (e.g., if Indexer cluster in workspace production on the first
- node has the name "production_indexer_cluster", then indexer
clusters in
+ <para>The same Clusters on different nodes MUST have the same names
+ (e.g., if Indexer cluster in workspace production on the first node
+ has the name "production_indexer_cluster", then indexer clusters in
workspace production on all other nodes MUST have the same name
- "production_indexer_cluster" ).</para>
+ "production_indexer_cluster" ).</para>
</listitem>
</itemizedlist>
</section>
+
<section>
<title>Configuration requirements</title>
+
<para>Configuration of every workspace in repository must contains of
such parts:</para>
+
<itemizedlist>
<listitem id="conf_value_storage">
<para>Value Storage configuration:</para>
-
+
<programlisting language="xml"><value-storages>
- <value-storage id="system"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
+ <value-storage id="system"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path"
value="/mnt/tornado/temp/values/production" /> <!--path
within NFS where ValueStorage will hold it's data-->
+ <property name="path"
value="/mnt/tornado/temp/values/production" /> <!--path within
NFS where ValueStorage will hold it's data-->
</properties>
<filters>
- <filter property-type="Binary" />
+ <filter property-type="Binary" />
</filters>
</value-storage>
</value-storages></programlisting>
</listitem>
+
<listitem id="conf_cache">
<para>Cache configuration:</para>
-
- <programlisting language="xml"><cache
enabled="true"
class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
+
+ <programlisting language="xml"><cache
enabled="true"
class="org.exoplatform.services.jcr.impl.dataflow.persistent.jbosscache.JBossCacheWorkspaceStorageCache">
<properties>
- <property name="jbosscache-configuration"
value="jar:/conf/portal/test-jbosscache-data.xml" />
<!-- path to JBoss Cache configuration for data storage -->
- <property name="jgroups-configuration"
value="jar:/conf/portal/udp-mux.xml" />
<!-- path to JGroups configuration -->
- <property name="jbosscache-cluster-name"
value="JCR_Cluster_cache_production" />
<!-- JBoss Cache data storage cluster name -->
- <property name="jgroups-multiplexer-stack"
value="true" />
+ <property name="jbosscache-configuration"
value="jar:/conf/portal/test-jbosscache-data.xml" /> <!--
path to JBoss Cache configuration for data storage -->
+ <property name="jgroups-configuration"
value="jar:/conf/portal/udp-mux.xml" /> <!--
path to JGroups configuration -->
+ <property name="jbosscache-cluster-name"
value="JCR_Cluster_cache_production" /> <!--
JBoss Cache data storage cluster name -->
+ <property name="jgroups-multiplexer-stack" value="true"
/>
</properties>
</cache> </programlisting>
</listitem>
+
<listitem id="conf_indexer">
<para>Indexer configuration:</para>
-
- <programlisting language="xml"><query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
+
+ <programlisting language="xml"><query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="changesfilter-class"
value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter"
/>
- <property name="index-dir"
value="/mnt/tornado/temp/jcrlucenedb/production" />
<!-- path within NFS where ValueStorage will hold it's data
-->
- <property name="jbosscache-configuration"
value="jar:/conf/portal/test-jbosscache-indexer.xml" />
<!-- path to JBoss Cache configuration for indexer -->
- <property name="jgroups-configuration"
value="jar:/conf/portal/udp-mux.xml" />
<!-- path to JGroups configuration -->
- <property name="jbosscache-cluster-name"
value="JCR_Cluster_indexer_production" />
<!-- JBoss Cache indexer cluster name -->
- <property name="jgroups-multiplexer-stack"
value="true" />
+ <property name="changesfilter-class"
value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JBossCacheIndexChangesFilter"
/>
+ <property name="index-dir"
value="/mnt/tornado/temp/jcrlucenedb/production" />
<!-- path within NFS where ValueStorage will hold it's data -->
+ <property name="jbosscache-configuration"
value="jar:/conf/portal/test-jbosscache-indexer.xml" /> <!--
path to JBoss Cache configuration for indexer -->
+ <property name="jgroups-configuration"
value="jar:/conf/portal/udp-mux.xml" /> <!--
path to JGroups configuration -->
+ <property name="jbosscache-cluster-name"
value="JCR_Cluster_indexer_production" /> <!--
JBoss Cache indexer cluster name -->
+ <property name="jgroups-multiplexer-stack" value="true"
/>
</properties>
</query-handler> </programlisting>
</listitem>
+
<listitem id="conf_lock_manager">
<para>Lock Manager configuration:</para>
-
- <programlisting language="xml"><lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
+
+ <programlisting language="xml"><lock-manager
class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManagerImpl">
<properties>
- <property name="time-out" value="15m"
/>
- <property name="jbosscache-configuration"
value="jar:/conf/portal/test-jbosscache-lock.xml" />
<!-- path to JBoss Cache configuration for lock manager -->
- <property name="jgroups-configuration"
value="jar:/conf/portal/udp-mux.xml" />
<!-- path to JGroups configuration -->
- <property name="jgroups-multiplexer-stack"
value="true" />
- <property name="jbosscache-cluster-name"
value="JCR_Cluster_lock_production" />
<!-- JBoss Cache locks cluster name -->
+ <property name="time-out" value="15m" />
+ <property name="jbosscache-configuration"
value="jar:/conf/portal/test-jbosscache-lock.xml" /> <!--
path to JBoss Cache configuration for lock manager -->
+ <property name="jgroups-configuration"
value="jar:/conf/portal/udp-mux.xml" /> <!--
path to JGroups configuration -->
+ <property name="jgroups-multiplexer-stack" value="true"
/>
+ <property name="jbosscache-cluster-name"
value="JCR_Cluster_lock_production" /> <!--
JBoss Cache locks cluster name -->
- <property name="jbosscache-cl-cache.jdbc.table.name"
value="jcrlocks_production"/> <!--
the name of the DB table where lock's data will be stored -->
- <property name="jbosscache-cl-cache.jdbc.table.create"
value="true"/>
- <property name="jbosscache-cl-cache.jdbc.table.drop"
value="false"/>
- <property name="jbosscache-cl-cache.jdbc.table.primarykey"
value="jcrlocks_production_pk"/>
- <property name="jbosscache-cl-cache.jdbc.fqn.column"
value="fqn"/>
- <property name="jbosscache-cl-cache.jdbc.node.column"
value="node"/>
- <property name="jbosscache-cl-cache.jdbc.parent.column"
value="parent"/>
- <property name="jbosscache-cl-cache.jdbc.datasource"
value="jdbcjcr"/>
+ <property name="jbosscache-cl-cache.jdbc.table.name"
value="jcrlocks_production"/> <!-- the name
of the DB table where lock's data will be stored -->
+ <property name="jbosscache-cl-cache.jdbc.table.create"
value="true"/>
+ <property name="jbosscache-cl-cache.jdbc.table.drop"
value="false"/>
+ <property name="jbosscache-cl-cache.jdbc.table.primarykey"
value="jcrlocks_production_pk"/>
+ <property name="jbosscache-cl-cache.jdbc.fqn.column"
value="fqn"/>
+ <property name="jbosscache-cl-cache.jdbc.node.column"
value="node"/>
+ <property name="jbosscache-cl-cache.jdbc.parent.column"
value="parent"/>
+ <property name="jbosscache-cl-cache.jdbc.datasource"
value="jdbcjcr"/>
</properties>
</lock-manager></programlisting>
</listitem>
</itemizedlist>
</section>
</section>
+
+ <section>
+ <title>How properly stop the node</title>
+
+ <para>To be sure that all transactions are over and JCR is in consistent
+ state after stopping node, you need to follow next steps:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>Connect using JMX to one of cluster's node which you won't
need
+ to stop.</para>
+ </listitem>
+
+ <listitem>
+ <para>Use RepositorySuspendController suspend all repositories (see
+ <link linked="JCR.SearchIndexBackup">37.1 Repository
+ suspending</link>)</para>
+ </listitem>
+
+ <listitem>
+ <para>Stop the node</para>
+ </listitem>
+
+ <listitem>
+ <para>Use RepositorySuspendController to resume all repositories (see
+ <link linked="JCR.SearchIndexBackup">37.3 Repository
+ resuming</link>)</para>
+ </listitem>
+ </itemizedlist>
+ </section>
</chapter>