exo-jcr SVN: r1485 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2010-01-19 10:26:42 -0500 (Tue, 19 Jan 2010)
New Revision: 1485
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws1.xml
Log:
EXOJCR-390 : change to single db
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws1.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws1.xml 2010-01-19 15:25:08 UTC (rev 1484)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws1.xml 2010-01-19 15:26:42 UTC (rev 1485)
@@ -59,7 +59,7 @@
cache.jdbc.node.column=node
cache.jdbc.node.type=LONGBLOB
cache.jdbc.parent.column=parent
- cache.jdbc.datasource=jdbcjcr1
+ cache.jdbc.datasource=jdbcjcr
</properties>
</loader>
16 years, 3 months
exo-jcr SVN: r1484 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2010-01-19 10:25:08 -0500 (Tue, 19 Jan 2010)
New Revision: 1484
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-configuration.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jcr-config.xml
Log:
EXOJCR-390 : change to single db
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-configuration.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-configuration.xml 2010-01-19 15:11:25 UTC (rev 1483)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-configuration.xml 2010-01-19 15:25:08 UTC (rev 1484)
@@ -255,38 +255,8 @@
</properties-param>
</init-params>
</component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr1</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="com.mysql.jdbc.Driver" />
- <property name="url" value="jdbc:mysql://localhost/cluster_jcr2"/>
- <property name="username" value="root"/>
- <property name="password" value="admin"/>
- <property name="maxActive" value="100" />
- <property name="maxIdle" value="5" />
- <property name="initialSize" value="5" />
+
- </properties-param>
- </init-params>
- </component-plugin>
-
<!-- Resource configuration for UserTransaction
use JOTM
-->
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jcr-config.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jcr-config.xml 2010-01-19 15:11:25 UTC (rev 1483)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jcr-config.xml 2010-01-19 15:25:08 UTC (rev 1484)
@@ -34,7 +34,7 @@
<properties>
<property name="source-name" value="jdbcjcr" />
<property name="dialect" value="mysql" />
- <property name="multi-db" value="true" />
+ <property name="multi-db" value="false" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
<property name="swap-directory" value="target/temp/swap/ws" />
@@ -77,6 +77,7 @@
<property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JbossCacheIndexChangesFilter" />
<property name="changesfilter-config-path" value="conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml" />
<property name="max-volatile-time" value="60" />
+
</properties>
</query-handler>
<lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
@@ -90,9 +91,9 @@
<workspace name="ws1">
<container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
<properties>
- <property name="source-name" value="jdbcjcr1" />
+ <property name="source-name" value="jdbcjcr" />
<property name="dialect" value="mysql" />
- <property name="multi-db" value="true" />
+ <property name="multi-db" value="false" />
<property name="update-storage" value="false" />
<property name="max-buffer-size" value="200k" />
<property name="swap-directory" value="target/temp/swap/ws1" />
16 years, 3 months
exo-jcr SVN: r1483 - jcr/branches/1.12.0-JBCCACHE.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-01-19 10:11:25 -0500 (Tue, 19 Jan 2010)
New Revision: 1483
Modified:
jcr/branches/1.12.0-JBCCACHE/pom.xml
Log:
EXOJCR-388 main updates according to the dependencies list of EAP applied
Modified: jcr/branches/1.12.0-JBCCACHE/pom.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/pom.xml 2010-01-19 14:53:19 UTC (rev 1482)
+++ jcr/branches/1.12.0-JBCCACHE/pom.xml 2010-01-19 15:11:25 UTC (rev 1483)
@@ -212,7 +212,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.3</version>
+ <version>2.4</version>
</dependency>
<dependency>
<groupId>commons-chain</groupId>
@@ -348,7 +348,7 @@
<dependency>
<groupId>jgroups</groupId>
<artifactId>jgroups</artifactId>
- <version>2.6.10.GA</version>
+ <version>2.6.13.GA</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
16 years, 3 months
exo-jcr SVN: r1482 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-01-19 09:53:19 -0500 (Tue, 19 Jan 2010)
New Revision: 1482
Added:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestBLOBValue.java
Log:
EXOJCR-404 test in lab
Added: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestBLOBValue.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestBLOBValue.java (rev 0)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestBLOBValue.java 2010-01-19 14:53:19 UTC (rev 1482)
@@ -0,0 +1,66 @@
+package org.exoplatform.services.jcr.lab.cluster.test;
+
+import org.exoplatform.services.jcr.JcrAPIBaseTest;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStream;
+
+import javax.jcr.Node;
+import javax.jcr.Property;
+import javax.jcr.Session;
+
+public class TestBLOBValue extends JcrAPIBaseTest
+{
+
+ private Node testRoot;
+
+ private static File testFile;
+
+ @Override
+ public void setUp() throws Exception
+ {
+ super.setUp();
+
+ testRoot = root.addNode("TestBLOBValue");
+ root.save();
+
+ if (testFile == null)
+ {
+ testFile = createBLOBTempFile(1020); // 1MB
+ }
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ testRoot.remove();
+ root.save();
+
+ super.tearDown();
+ }
+
+ public void testAddProperty() throws Exception
+ {
+ // write
+ Property text = testRoot.setProperty("text", "string property");
+
+ FileInputStream fis = new FileInputStream(testFile);
+ Property blob = testRoot.setProperty("blob", fis);
+
+ testRoot.save();
+ fis.close();
+
+ // read
+ Session user1 = repository.login(credentials, root.getSession().getWorkspace().getName());
+ Node troot = user1.getRootNode().getNode("TestBLOBValue");
+ Property tblob = troot.getProperty("blob");
+ InputStream blobStream = tblob.getStream();
+ }
+
+ public void testUpdateProperty() throws Exception
+ {
+
+ }
+
+}
Property changes on: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/lab/cluster/test/TestBLOBValue.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Id
16 years, 3 months
exo-jcr SVN: r1481 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf: standalone and 1 other directory.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2010-01-19 09:43:16 -0500 (Tue, 19 Jan 2010)
New Revision: 1481
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws1.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-config.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws.xml
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws1.xml
Log:
EXOJCR-417 : The cleanup cluster configuration is done. Add multiplexerStack parameter to all jgroupsConfig.
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml 2010-01-19 13:03:08 UTC (rev 1480)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws.xml 2010-01-19 14:43:16 UTC (rev 1481)
@@ -15,7 +15,7 @@
"enable_bundling" is set to false, because of notice, that appeared
during running
-->
- <jgroupsConfig>
+ <jgroupsConfig multiplexerStack="fc-fast-minimalthreads">
<!--
UDP discard_incompatible_packets="true" enable_bundling="false"
enable_diagnostics="false" ip_ttl="2" loopback="false"
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml 2010-01-19 13:03:08 UTC (rev 1480)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-config-ws1.xml 2010-01-19 14:43:16 UTC (rev 1481)
@@ -15,7 +15,7 @@
"enable_bundling" is set to false, because of notice, that appeared
during running
-->
- <jgroupsConfig>
+ <jgroupsConfig multiplexerStack="fc-fast-minimalthreads" >
<!--
UDP discard_incompatible_packets="true" enable_bundling="false"
enable_diagnostics="false" ip_ttl="2" loopback="false"
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml 2010-01-19 13:03:08 UTC (rev 1480)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml 2010-01-19 14:43:16 UTC (rev 1481)
@@ -9,7 +9,7 @@
<clustering mode="replication" clusterName="JBoss-Cache-Indexer-Cluster_db1_ws">
<stateRetrieval timeout="20000" fetchInMemoryState="false" nonBlocking="true"/>
- <jgroupsConfig>
+ <jgroupsConfig multiplexerStack="fc-fast-minimalthreads">
<TCP bind_addr="127.0.0.1" start_port="9700" loopback="true"
recv_buf_size="20000000" send_buf_size="640000"
discard_incompatible_packets="true" max_bundle_size="64000"
@@ -50,9 +50,9 @@
</clustering>
<!-- Eviction configuration -->
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="1000000">
+ <default algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" eventQueueSize="1000000">
<property name="maxNodes" value="10000" />
- <property name="timeToLive" value="120000" />
+ <property name="minTimeToLive" value="60000" />
</default>
</eviction>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml 2010-01-19 13:03:08 UTC (rev 1480)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml 2010-01-19 14:43:16 UTC (rev 1481)
@@ -9,7 +9,7 @@
<clustering mode="replication" clusterName="JBoss-Cache-Indexer-Cluster_db1_ws1">
<stateRetrieval timeout="20000" fetchInMemoryState="false" nonBlocking="true"/>
- <jgroupsConfig>
+ <jgroupsConfig multiplexerStack="fc-fast-minimalthreads">
<TCP bind_addr="127.0.0.1" start_port="9750" loopback="true"
recv_buf_size="20000000" send_buf_size="640000"
discard_incompatible_packets="true" max_bundle_size="64000"
@@ -50,9 +50,9 @@
</clustering>
<!-- Eviction configuration -->
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="1000000">
+ <default algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" eventQueueSize="1000000">
<property name="maxNodes" value="10000" />
- <property name="timeToLive" value="120000" />
+ <property name="minTimeToLive" value="60000" />
</default>
</eviction>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws.xml 2010-01-19 13:03:08 UTC (rev 1480)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws.xml 2010-01-19 14:43:16 UTC (rev 1481)
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="3600000"/>
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000"/>
<clustering mode="replication" clusterName="JBoss-Cache-Lock-Cluster_db1_ws">
<stateRetrieval timeout="20000" fetchInMemoryState="false" nonBlocking="true"/>
- <jgroupsConfig>
+ <jgroupsConfig multiplexerStack="fc-fast-minimalthreads">
- <TCP bind_addr="127.0.0.1" start_port="9700" loopback="true"
+ <TCP bind_addr="127.0.0.1" start_port="9800" loopback="true"
recv_buf_size="20000000" send_buf_size="640000"
discard_incompatible_packets="true" max_bundle_size="64000"
max_bundle_timeout="30" use_incoming_packet_handler="true"
@@ -46,7 +46,7 @@
<sync />
</clustering>
- <loaders passivation="false" shared="false">
+ <loaders passivation="false" shared="true">
<loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false"
ignoreModifications="false" purgeOnStartup="false">
<properties>
@@ -59,10 +59,7 @@
cache.jdbc.node.column=node
cache.jdbc.node.type=LONGBLOB
cache.jdbc.parent.column=parent
- cache.jdbc.driver=com.mysql.jdbc.Driver
- cache.jdbc.url=jdbc:mysql://localhost/cluster_jcr1
- cache.jdbc.user=root
- cache.jdbc.password=admin
+ cache.jdbc.datasource=jdbcjcr
</properties>
</loader>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws1.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws1.xml 2010-01-19 13:03:08 UTC (rev 1480)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jbosscache-lock-config_db1_ws1.xml 2010-01-19 14:43:16 UTC (rev 1481)
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="3600000"/>
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000"/>
<clustering mode="replication" clusterName="JBoss-Cache-Indexer-Cluster_db1_ws1">
<stateRetrieval timeout="20000" fetchInMemoryState="false" nonBlocking="true"/>
- <jgroupsConfig>
+ <jgroupsConfig multiplexerStack="fc-fast-minimalthreads">
- <TCP bind_addr="127.0.0.1" start_port="9750" loopback="true"
+ <TCP bind_addr="127.0.0.1" start_port="9850" loopback="true"
recv_buf_size="20000000" send_buf_size="640000"
discard_incompatible_packets="true" max_bundle_size="64000"
max_bundle_timeout="30" use_incoming_packet_handler="true"
@@ -46,7 +46,7 @@
<sync />
</clustering>
- <loaders passivation="false" shared="false">
+ <loaders passivation="false" shared="true">
<loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="false"
ignoreModifications="false" purgeOnStartup="false">
<properties>
@@ -59,10 +59,7 @@
cache.jdbc.node.column=node
cache.jdbc.node.type=LONGBLOB
cache.jdbc.parent.column=parent
- cache.jdbc.driver=com.mysql.jdbc.Driver
- cache.jdbc.url=jdbc:mysql://localhost/cluster_jcr2
- cache.jdbc.user=root
- cache.jdbc.password=admin
+ cache.jdbc.datasource=jdbcjcr1
</properties>
</loader>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-config.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-config.xml 2010-01-19 13:03:08 UTC (rev 1480)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-config.xml 2010-01-19 14:43:16 UTC (rev 1481)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="3600000"/>
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000"/>
<!-- Configure the TransactionManager -->
<transaction transactionManagerLookupClass="org.jboss.cache.transaction.JBossStandaloneJTAManagerLookup" />
@@ -11,9 +11,9 @@
<!-- Eviction configuration -->
<eviction wakeUpInterval="5000">
- <default algorithmClass="org.jboss.cache.eviction.LRUAlgorithm" eventQueueSize="1000000">
+ <default algorithmClass="org.jboss.cache.eviction.FIFOAlgorithm" eventQueueSize="1000000">
<property name="maxNodes" value="5000" />
- <property name="timeToLive" value="60000" />
+ <property name="minTimeToLive" value="60000" />
</default>
</eviction>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig.xml 2010-01-19 13:03:08 UTC (rev 1480)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig.xml 2010-01-19 14:43:16 UTC (rev 1481)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="3600000"/>
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000"/>
<!-- loaders passivation="false" shared="false">
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws.xml 2010-01-19 13:03:08 UTC (rev 1480)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws.xml 2010-01-19 14:43:16 UTC (rev 1481)
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="3600000"/>
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000"/>
- <loaders passivation="false" shared="false">
+ <loaders passivation="false" shared="true">
<loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="true"
ignoreModifications="false" purgeOnStartup="false">
@@ -15,12 +15,9 @@
cache.jdbc.fqn.column=fqn
cache.jdbc.fqn.type=VARCHAR(512)
cache.jdbc.node.column=node
- cache.jdbc.node.type=VARBINARY(65535)
+ cache.jdbc.node.type=OBJECT
cache.jdbc.parent.column=parent
- cache.jdbc.driver=org.hsqldb.jdbcDriver
- cache.jdbc.url=jdbc:hsqldb:file:target/temp/data/exojcr
- cache.jdbc.user=sa
- cache.jdbc.password=
+ cache.jdbc.datasource=jdbcjcr
</properties>
</loader>
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws1.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws1.xml 2010-01-19 13:03:08 UTC (rev 1480)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/standalone/test-jbosscache-lockconfig_db1_ws1.xml 2010-01-19 14:43:16 UTC (rev 1481)
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<jbosscache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:jboss:jbosscache-core:config:3.1">
- <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="3600000"/>
+ <locking useLockStriping="false" concurrencyLevel="50000" lockParentForChildInsertRemove="false" lockAcquisitionTimeout="20000"/>
- <loaders passivation="false" shared="false">
+ <loaders passivation="false" shared="true">
<loader class="org.jboss.cache.loader.JDBCCacheLoader" async="false" fetchPersistentState="true"
ignoreModifications="false" purgeOnStartup="false">
@@ -15,12 +15,9 @@
cache.jdbc.fqn.column=fqn
cache.jdbc.fqn.type=VARCHAR(512)
cache.jdbc.node.column=node
- cache.jdbc.node.type=VARBINARY(65535)
+ cache.jdbc.node.type=OBJECT
cache.jdbc.parent.column=parent
- cache.jdbc.driver=org.hsqldb.jdbcDriver
- cache.jdbc.url=jdbc:hsqldb:file:target/temp/data/exojcr
- cache.jdbc.user=sa
- cache.jdbc.password=
+ cache.jdbc.datasource=jdbcjcr
</properties>
</loader>
16 years, 3 months
exo-jcr SVN: r1480 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2010-01-19 08:03:08 -0500 (Tue, 19 Jan 2010)
New Revision: 1480
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java
Log:
EXOJCR-419: Cleaned useless comments and added TODO for EXOJCR-419
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java 2010-01-19 12:56:54 UTC (rev 1479)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java 2010-01-19 13:03:08 UTC (rev 1480)
@@ -27,14 +27,12 @@
import java.io.IOException;
/**
- * @author <a href="mailto:Sergey.Kabashnyuk@exoplatform.org">Sergey
- * Kabashnyuk</a>
+ * @author <a href="mailto:Sergey.Kabashnyuk@exoplatform.org">Sergey Kabashnyuk</a>
* @version $Id: SearchIndexConfigurationHelper.java 1053 2009-12-15 09:27:30Z nzamosenchuk $
*
*/
public class SearchIndexConfigurationHelper
{
-
private final SearchIndex searchIndex;
/**
@@ -55,13 +53,11 @@
*/
public void init(QueryHandlerEntry queryHandlerEntry) throws IOException, RepositoryConfigurationException
{
- // Path will be set using queryHandelContext
-
+ // TODO: support human-readable values ( https://jira.jboss.org/jira/browse/EXOJCR-419 )
for (SimpleParameterEntry parameter : queryHandlerEntry.getParameters())
{
setParam(parameter.getName(), parameter.getValue());
}
-
}
/**
@@ -83,9 +79,6 @@
searchIndex.setRespectDocumentOrder(Boolean.parseBoolean(value));
else if (QueryHandlerParams.PARAM_EXCERPTPROVIDER_CLASS.equals(name))
searchIndex.setExcerptProviderClass(value);
- // else if
- // (QueryHandlerParams.PARAM_EXCLUDED_NODE_IDENTIFERS.equals(name))
- // searchIndex.setE
else if (QueryHandlerParams.PARAM_EXTRACTOR_BACKLOG.equals(name))
searchIndex.setExtractorBackLogSize(Integer.parseInt(value));
else if (QueryHandlerParams.PARAM_EXTRACTOR_POOLSIZE.equals(name))
@@ -96,9 +89,6 @@
searchIndex.setForceConsistencyCheck(Boolean.parseBoolean(value));
else if (QueryHandlerParams.PARAM_ERRORLOG_SIZE.equals(name))
searchIndex.setErrorLogfileSize(Integer.parseInt(value));
- // else if (QueryHandlerParams.PARAM_INDEX_DIR.equals(name))
- // searchIndex.setBufferSize(0);
- // else if (OLD_PARAM_INDEX_DIR
else if (QueryHandlerParams.PARAM_INDEXING_CONFIGURATION_PATH.equals(name))
searchIndex.setIndexingConfiguration(value);
else if (QueryHandlerParams.PARAM_INDEXING_CONFIGURATION_CLASS.equals(name))
@@ -115,8 +105,6 @@
searchIndex.setQueryClass(value);
else if (QueryHandlerParams.PARAM_RESULT_FETCH_SIZE.equals(name))
searchIndex.setResultFetchSize(Integer.parseInt(value));
- // else if (QueryHandlerParams.PARAM_ROOT_NODE_ID.equals(name))
- // searchIndex.setBufferSize(0);
else if (QueryHandlerParams.PARAM_SPELLCHECKER_CLASS.equals(name))
searchIndex.setSpellCheckerClass(value);
else if (QueryHandlerParams.PARAM_SUPPORT_HIGHLIGHTING.equals(name))
@@ -137,8 +125,5 @@
{
searchIndex.setAnalyzer(value);
}
- // else if (QueryHandlerParams.PARAM_UPGRADE_INDEX.equals(name))
- // searchIndex.i
-
}
}
16 years, 3 months
exo-jcr SVN: r1479 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-01-19 07:56:54 -0500 (Tue, 19 Jan 2010)
New Revision: 1479
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
Log:
EXOJCR-418: InitialContextInitializer recall added
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java 2010-01-19 12:24:19 UTC (rev 1478)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManager.java 2010-01-19 12:56:54 UTC (rev 1479)
@@ -40,7 +40,6 @@
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.core.NodeImpl;
import org.exoplatform.services.jcr.impl.core.lock.AbstractLockManager;
-import org.exoplatform.services.jcr.impl.core.lock.LockPersister;
import org.exoplatform.services.jcr.impl.core.lock.LockRemover;
import org.exoplatform.services.jcr.impl.core.lock.SessionLockManager;
import org.exoplatform.services.jcr.impl.dataflow.TransientItemData;
@@ -50,6 +49,7 @@
import org.exoplatform.services.jcr.observation.ExtendedEvent;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
+import org.exoplatform.services.naming.InitialContextInitializer;
import org.jboss.cache.Cache;
import org.jboss.cache.CacheFactory;
import org.jboss.cache.DefaultCacheFactory;
@@ -156,19 +156,15 @@
private Map<String, CacheableSessionLockManager> sessionLockManagers;
/**
- * Constructor for workspace without LockPersister
+ * Constructor.
*
- * @param dataManager
- * @param config
+ * @param dataManager - workspace persistent data manager
+ * @param config - workspace entry
+ * @param context InitialContextInitializer, needed to reload context after JBoss cache creation
+ * @throws RepositoryConfigurationException
*/
- public CacheableLockManager(WorkspacePersistentDataManager dataManager, WorkspaceEntry config)
- throws RepositoryConfigurationException
- {
- this(dataManager, config, null);
- }
-
public CacheableLockManager(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
- LockPersister persister) throws RepositoryConfigurationException
+ InitialContextInitializer context) throws RepositoryConfigurationException
{
List<SimpleParameterEntry> paramenerts = config.getLockManager().getParameters();
@@ -205,6 +201,10 @@
? config.getLockManager().getParameterValue(JBOSSCACCHE_CONFIG) : config.getLockManager()
.getCacheConfig();
CacheFactory<Serializable, Object> factory = new DefaultCacheFactory<Serializable, Object>();
+
+ // Context recall is a workaround of JDBCCacheLoader starting.
+ context.recall();
+
cache = factory.createCache(pathToConfig, false);
cache.create();
}
@@ -695,19 +695,19 @@
{
return;
}
-
+
changesLog.add(ItemState.createDeletedState(lockOwner));
ItemData lockIsDeep =
copyItemData((PropertyData)dataManager.getItemData(nData, new QPathEntry(Constants.JCR_LOCKISDEEP, 1)));
-
+
//TODO EXOJCR-412, should be refactored in future.
//Skip removing, because that lock was removed in other node of cluster.
if (lockIsDeep == null)
{
return;
}
-
+
changesLog.add(ItemState.createDeletedState(lockIsDeep));
// lock probably removed by other thread
16 years, 3 months
exo-jcr SVN: r1478 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent: jbosscache and 1 other directory.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2010-01-19 07:24:19 -0500 (Tue, 19 Jan 2010)
New Revision: 1478
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
Log:
EXOJCR-390 : cache.beginTransaction() is colled in JBossCache
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2010-01-19 12:18:31 UTC (rev 1477)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/CacheableWorkspaceDataManager.java 2010-01-19 12:24:19 UTC (rev 1478)
@@ -191,7 +191,9 @@
{
DataRequest prev = requestCache.get(this.hashCode());
if (prev != null)
+ {
prev.await();
+ }
return this;
}
@@ -248,6 +250,7 @@
}
}
+ @Deprecated
protected abstract class StorageTxIsolatedOperation extends TxIsolatedOperation
{
StorageTxIsolatedOperation()
@@ -275,12 +278,13 @@
}
}
- protected class SaveInTransaction extends StorageTxIsolatedOperation
+ protected class SaveInTransaction extends TxIsolatedOperation
{
final ItemStateChangesLog changes;
SaveInTransaction(ItemStateChangesLog changes)
{
+ super(transactionManager);
this.changes = changes;
}
@@ -731,111 +735,6 @@
return propertiesList;
}
- // /**
- // * Apply all the changes in new XA transaction. This save should run in dedicated XA transaction,
- // * i.e. only JCR storage stuff should be involved to.
- // */
- // private void saveInTransaction(ItemStateChangesLog changes) throws RepositoryException
- // {
- // try
- // {
- // transactionManager.begin(); // start new global tx
- // cache.beginTransaction(); // TODO keep it into the cache impl
- // CacheableWorkspaceDataManager.super.save(changes);
- // cache.commitTransaction();
- // transactionManager.commit(); // commit global tx
- // }
- // catch (RollbackException e)
- // {
- // // Indicate that the transaction has been rolled back rather than committed.
- // throw new RepositoryException(e);
- // }
- // catch (JCRInvalidItemStateException e)
- // {
- // try
- // {
- // cache.rollbackTransaction();
- // transactionManager.rollback(); // rollback global tx
- // }
- // catch (Exception e1)
- // {
- // LOG.error("Rollback error ", e1);
- // }
- //
- // throw new JCRInvalidItemStateException(e.getMessage(), e.getIdentifier(), e.getState(), e);
- // }
- // catch (InvalidItemStateException e)
- // {
- // try
- // {
- // cache.rollbackTransaction();
- // transactionManager.rollback();
- // }
- // catch (Exception e1)
- // {
- // LOG.error("Rollback error ", e1);
- // }
- //
- // throw new InvalidItemStateException(e);
- // }
- // catch (ItemExistsException e)
- // {
- // try
- // {
- // cache.rollbackTransaction();
- // transactionManager.rollback();
- // }
- // catch (Exception e1)
- // {
- // LOG.error("Rollback error ", e1);
- // }
- //
- // throw new ItemExistsException(e);
- // }
- // catch (ReadOnlyWorkspaceException e)
- // {
- // try
- // {
- // cache.rollbackTransaction();
- // transactionManager.rollback();
- // }
- // catch (Exception e1)
- // {
- // LOG.error("Rollback error ", e1);
- // }
- //
- // throw new ReadOnlyWorkspaceException(e);
- // }
- // catch (RepositoryException e)
- // {
- // try
- // {
- // cache.rollbackTransaction();
- // transactionManager.rollback();
- // }
- // catch (Exception e1)
- // {
- // LOG.error("Rollback error ", e1);
- // }
- //
- // throw new RepositoryException(e);
- // }
- // catch (Exception e)
- // {
- // try
- // {
- // cache.rollbackTransaction();
- // transactionManager.rollback();
- // }
- // catch (Exception e1)
- // {
- // LOG.error("Rollback error ", e1);
- // }
- //
- // throw new RepositoryException(e);
- // }
- // }
-
protected boolean isTxAware()
{
return transactionManager != null;
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2010-01-19 12:18:31 UTC (rev 1477)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/persistent/jbosscache/JBossCacheWorkspaceStorageCache.java 2010-01-19 12:24:19 UTC (rev 1478)
@@ -392,43 +392,58 @@
*/
public void onSaveItems(final ItemStateChangesLog itemStates)
{
- for (ItemState state : itemStates.getAllStates())
+ // if something happen we will rollback changes
+ boolean rollback = true;
+ try
{
- if (state.isAdded())
+ cache.beginTransaction();
+ for (ItemState state : itemStates.getAllStates())
{
- if (state.isPersisted())
+ if (state.isAdded())
{
+ if (state.isPersisted())
+ {
+ putItem(state.getData());
+ }
+ }
+ else if (state.isUpdated())
+ {
+ if (state.isPersisted())
+ {
+ ItemData prevItem = putItem(state.getData());
+ if (prevItem != null && state.isNode())
+ {
+ // nodes reordered, if prev is null it's InvalidItemState case
+ update((NodeData)state.getData(), (NodeData)prevItem);
+ }
+ }
+ }
+ else if (state.isDeleted())
+ {
+ removeItem(state.getData());
+ }
+ else if (state.isRenamed())
+ {
putItem(state.getData());
}
- }
- else if (state.isUpdated())
- {
- if (state.isPersisted())
+ else if (state.isMixinChanged())
{
- ItemData prevItem = putItem(state.getData());
- if (prevItem != null && state.isNode())
+ if (state.isPersisted())
{
- // nodes reordered, if prev is null it's InvalidItemState case
- update((NodeData)state.getData(), (NodeData)prevItem);
+ // update subtree ACLs
+ updateMixin((NodeData)state.getData());
}
}
}
- else if (state.isDeleted())
+ cache.commitTransaction();
+ rollback = false;
+ }
+ finally
+ {
+ if (rollback)
{
- removeItem(state.getData());
+ cache.rollbackTransaction();
}
- else if (state.isRenamed())
- {
- putItem(state.getData());
- }
- else if (state.isMixinChanged())
- {
- if (state.isPersisted())
- {
- // update subtree ACLs
- updateMixin((NodeData)state.getData());
- }
- }
}
}
16 years, 3 months
exo-jcr SVN: r1477 - in jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src: main/java/org/exoplatform/services/jcr/impl/core/query and 2 other directories.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2010-01-19 07:18:31 -0500 (Tue, 19 Jan 2010)
New Revision: 1477
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/QueryHandlerParams.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jcr-config.xml
Log:
EXOJCR-414: Added parameter "max-volatile-time" to QueryHandler config that measures the max age of volatile (in-memory) index. After this time volatile will be flushed to FS in any case (even if the index is under heavy load now). If nothing is configured or "-1" is set, then max age is unlimited. In this case behavior of Indexer flushings is the same as it was before. In cluster configuration this value is set to 60 seconds.
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/QueryHandlerParams.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/QueryHandlerParams.java 2010-01-19 12:15:17 UTC (rev 1476)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/config/QueryHandlerParams.java 2010-01-19 12:18:31 UTC (rev 1477)
@@ -94,6 +94,8 @@
public static final String PARAM_VOLATILE_IDLE_TIME = "volatile-idle-time";
public static final String PARAM_MAX_VOLATILE_SIZE = "max-volatile-size";
+
+ public static final String PARAM_MAX_VOLATILE_TIME = "max-volatile-time";
//since https://jira.jboss.org/jira/browse/EXOJCR-17
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java 2010-01-19 12:15:17 UTC (rev 1476)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/SearchIndexConfigurationHelper.java 2010-01-19 12:18:31 UTC (rev 1477)
@@ -131,6 +131,8 @@
searchIndex.setVolatileIdleTime(Integer.parseInt(value));
else if (QueryHandlerParams.PARAM_MAX_VOLATILE_SIZE.equals(name))
searchIndex.setMaxVolatileIndexSize(Integer.parseInt(value));
+ else if (QueryHandlerParams.PARAM_MAX_VOLATILE_TIME.equals(name))
+ searchIndex.setMaxVolatileTime(Integer.parseInt(value));
else if (QueryHandlerParams.PARAM_ANALYZER_CLASS.equals(name))
{
searchIndex.setAnalyzer(value);
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java 2010-01-19 12:15:17 UTC (rev 1476)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/MultiIndex.java 2010-01-19 12:18:31 UTC (rev 1477)
@@ -163,6 +163,11 @@
private long lastFlushTime;
/**
+ * The time this index was last flushed or a transaction was committed.
+ */
+ private long lastFileSystemFlushTime;
+
+ /**
* The <code>IndexMerger</code> for this <code>MultiIndex</code>.
*/
private final IndexMerger merger;
@@ -1060,13 +1065,14 @@
}
}
executeAndLog(new Commit(getTransactionId()));
-
+
indexNames.write();
// reset redo log
redoLog.clear();
lastFlushTime = System.currentTimeMillis();
+ lastFileSystemFlushTime = System.currentTimeMillis();
}
// delete obsolete indexes
@@ -1150,6 +1156,7 @@
};
FLUSH_TIMER.schedule(flushTask, 0, 1000);
lastFlushTime = System.currentTimeMillis();
+ lastFileSystemFlushTime = System.currentTimeMillis();
}
/**
@@ -1215,6 +1222,12 @@
commitVolatileIndex();
return true;
}
+ long volatileTime = System.currentTimeMillis() - lastFileSystemFlushTime;
+ if (handler.getMaxVolatileTime() > 0 && volatileTime >= handler.getMaxVolatileTime() * 1000)
+ {
+ commitVolatileIndex();
+ return true;
+ }
return false;
}
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java 2010-01-19 12:15:17 UTC (rev 1476)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/query/lucene/SearchIndex.java 2010-01-19 12:18:31 UTC (rev 1477)
@@ -143,6 +143,20 @@
public static final long DEFAULT_EXTRACTOR_TIMEOUT = 100;
/**
+ * The maximum volatile index size in bytes until it is written to disk. The
+ * default value is 1048576 (1MB).
+ */
+ public static final long DEFAULT_MAX_VOLATILE_INDEX_SIZE = 1024 * 1024;
+
+ /**
+ * volatileTime config parameter.
+ * Max age of volatile. It is guaranteed that in any case volatile index will
+ * be flush to FS not later then in maxVolatileTime seconds.
+ * Default is (-1) that means no maximal timeout set
+ */
+ public static final int DEFAULT_MAX_VOLATILE_TIME = -1;
+
+ /**
* The default value for {@link #termInfosIndexDivisor}.
*/
public static final int DEFAULT_TERM_INFOS_INDEX_DIVISOR = 1;
@@ -183,9 +197,16 @@
* The maximum volatile index size in bytes until it is written to disk. The
* default value is 1048576 (1MB).
*/
- private long maxVolatileIndexSize = 1024 * 1024;
+ private long maxVolatileIndexSize = DEFAULT_MAX_VOLATILE_INDEX_SIZE;
/**
+ * volatileTime config parameter.
+ * Max age of volatile. It is guaranteed that in any case volatile index will
+ * be flush to FS not later then in maxVolatileTime seconds.
+ */
+ private int maxVolatileTime = DEFAULT_MAX_VOLATILE_TIME;
+
+ /**
* volatileIdleTime config parameter.
*/
private int volatileIdleTime = 3;
@@ -2460,6 +2481,22 @@
}
/**
+ * @return maxVolatileTime in seconds
+ */
+ public int getMaxVolatileTime()
+ {
+ return maxVolatileTime;
+ }
+
+ /**
+ * @param maxVolatileTime in seconds
+ */
+ public void setMaxVolatileTime(int maxVolatileTime)
+ {
+ this.maxVolatileTime = maxVolatileTime;
+ }
+
+ /**
* @return the name of the directory manager class.
*/
public String getDirectoryManagerClass()
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jcr-config.xml
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jcr-config.xml 2010-01-19 12:15:17 UTC (rev 1476)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/test/resources/conf/cluster/test-jcr-config.xml 2010-01-19 12:18:31 UTC (rev 1477)
@@ -76,6 +76,7 @@
<property name="index-dir" value="${java.io.tmpdir}/cluster_nfs/db1/ws" />
<property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JbossCacheIndexChangesFilter" />
<property name="changesfilter-config-path" value="conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws.xml" />
+ <property name="max-volatile-time" value="60" />
</properties>
</query-handler>
<lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
@@ -117,6 +118,7 @@
<property name="index-dir" value="${java.io.tmpdir}/cluster_nfs/db1/ws1" />
<property name="changesfilter-class" value="org.exoplatform.services.jcr.impl.core.query.jbosscache.JbossCacheIndexChangesFilter" />
<property name="changesfilter-config-path" value="conf/cluster/test-jbosscache-indexer-config-exoloader_db1_ws1.xml" />
+ <property name="max-volatile-time" value="60" />
</properties>
</query-handler>
<lock-manager class="org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableLockManager">
16 years, 3 months
exo-jcr SVN: r1476 - jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-01-19 07:15:17 -0500 (Tue, 19 Jan 2010)
New Revision: 1476
Modified:
jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableResourceManager.java
Log:
EXOJCR-405 commit exception for two-phase is XA_RBOTHER
Modified: jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableResourceManager.java
===================================================================
--- jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableResourceManager.java 2010-01-19 11:34:34 UTC (rev 1475)
+++ jcr/branches/1.12.0-JBCCACHE/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/dataflow/session/TransactionableResourceManager.java 2010-01-19 12:15:17 UTC (rev 1476)
@@ -176,10 +176,10 @@
}
catch (TransactionException e)
{
- boolean mixedCommit = i > 0;
if (onePhase)
{
// rollback now
+ boolean mixedCommit = i > 0;
for (; i < joinedList.size(); i++)
{
SoftReference<XASessionImpl> sr = joinedList.get(i);
@@ -189,59 +189,20 @@
xaSession.getTransientNodesManager().getTransactManager().rollback();
}
}
- }
-
- if (mixedCommit)
- {
- // somethings were commited already
- throw new TransactionException(XAException.XA_HEURMIX, e);
- }
- else
- {
- // all things were rolled back
- throw new TransactionException(XAException.XA_HEURRB, e);
- }
- }
- }
- }
-
- /**
- * TODO proposal
- * @param userSession
- * @throws TransactionException
- */
- private void commit1(XASessionImpl userSession) throws TransactionException
- {
- List<XASessionImpl> xaSessions = null;
- synchronized (this)
- {
- List<SoftReference<XASessionImpl>> joinedList = txResources.remove(userSession.getUserID());
- if (joinedList != null)
- for (SoftReference<XASessionImpl> sr : joinedList)
- {
- XASessionImpl xaSession = sr.get();
- if (xaSession != null)
+
+ if (mixedCommit)
{
- if (xaSessions == null)
- {
- xaSessions = new ArrayList<XASessionImpl>();
- }
- xaSessions.add(xaSession);
+ // somethings were commited already
+ throw new TransactionException(XAException.XA_HEURMIX, e);
}
- }
- }
- if (xaSessions != null)
- {
- for (XASessionImpl xaSession : xaSessions)
- {
- synchronized (xaSession)
- {
- if (xaSession.isLive())
+ else
{
- TransactionableDataManager txManager = xaSession.getTransientNodesManager().getTransactManager();
- txManager.commit();
+ // all things were rolled back
+ throw new TransactionException(XAException.XA_HEURRB, e);
}
}
+
+ throw new TransactionException(XAException.XA_RBOTHER, e);
}
}
}
16 years, 3 months