exo-jcr SVN: r808 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2009-11-23 08:32:26 -0500 (Mon, 23 Nov 2009)
New Revision: 808
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
Log:
EXOJCR-203 : Fix in JDBCStorageConnection - convert internal id to identifier.
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-11-23 13:24:28 UTC (rev 807)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-11-23 13:32:26 UTC (rev 808)
@@ -2052,7 +2052,7 @@
ResultSet item = findNodeIdentifier(getInternalId(parentId), name, index);
if (item.next())
{
- return item.getString(COLUMN_ID);
+ return getIdentifier(item.getString(COLUMN_ID));
}
}
catch (SQLException e)
@@ -2084,7 +2084,7 @@
ResultSet item = findPropertyIdentifier(getInternalId(parentId), name);
if (item.next())
{
- return item.getString(COLUMN_ID);
+ return getIdentifier(item.getString(COLUMN_ID));
}
}
catch (SQLException e)
@@ -2209,7 +2209,7 @@
ResultSet prop = findChildPropertiesIdNameByParentIdentifier(getInternalId(parentId));
while (prop.next())
{
- children.add(new PropertyDataInfo(prop.getString(COLUMN_ID), getIdentifier(prop.getString(COLUMN_NAME))));
+ children.add(new PropertyDataInfo(getIdentifier(prop.getString(COLUMN_ID)), prop.getString(COLUMN_NAME)));
}
return children;
16 years, 8 months
exo-jcr SVN: r807 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2009-11-23 08:24:28 -0500 (Mon, 23 Nov 2009)
New Revision: 807
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
Log:
EXOJCR-203 : Fix in JDBCStorageConnection - convert internal id to identifier.
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-11-23 11:43:27 UTC (rev 806)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-11-23 13:24:28 UTC (rev 807)
@@ -2209,7 +2209,7 @@
ResultSet prop = findChildPropertiesIdNameByParentIdentifier(getInternalId(parentId));
while (prop.next())
{
- children.add(new PropertyDataInfo(prop.getString(COLUMN_ID), prop.getString(COLUMN_NAME)));
+ children.add(new PropertyDataInfo(prop.getString(COLUMN_ID), getIdentifier(prop.getString(COLUMN_NAME))));
}
return children;
@@ -2279,7 +2279,7 @@
while (node.next())
{
String propId = node.getString(COLUMN_ID);
- if (!childrens.add(propId))
+ if (!childrens.add(getIdentifier(propId)))
{
throw new RepositoryException("FATAL Property id dublicated " + propId);
}
@@ -2304,7 +2304,7 @@
while (node.next())
{
String nodeId = node.getString(COLUMN_ID); //"NODE_ID");//
- childrens.add(nodeId);
+ childrens.add(getIdentifier(nodeId));
}
return childrens;
@@ -2334,7 +2334,7 @@
while (node.next())
{
String nodeId = node.getString(COLUMN_ID);
- if (!childrens.add(nodeId))
+ if (!childrens.add(getIdentifier(nodeId)))
{
throw new RepositoryException("FATAL Node id dublicated " + nodeId);
}
16 years, 8 months
exo-jcr SVN: r806 - jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2009-11-23 06:43:27 -0500 (Mon, 23 Nov 2009)
New Revision: 806
Added:
jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws.xml
jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws1.xml
jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws2.xml
jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws3.xml
jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws.xml
jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws1.xml
jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws2.xml
Modified:
jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-203 : Add difernt configiration to JBossCache was added.
Added: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws.xml
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws.xml (rev 0)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws.xml 2009-11-23 11:43:27 UTC (rev 806)
@@ -0,0 +1,80 @@
+<?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">
+
+ <!-- Configure the TransactionManager -->
+ <transaction
+ transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" />
+
+ <clustering mode="replication" clusterName="JBoss-Cache-Cluster_db1_ws">
+
+ <jgroupsConfig>
+ <!--UDP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="false" ip_ttl="2"
+ loopback="false" max_bundle_size="64000" max_bundle_timeout="30" mcast_addr="228.10.10.10"
+ mcast_port="45588" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000"
+ oob_thread_pool.enabled="true" oob_thread_pool.keep_alive_time="10000" oob_thread_pool.max_threads="4"
+ oob_thread_pool.min_threads="1" oob_thread_pool.queue_enabled="true" oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run" thread_naming_pattern="pl" thread_pool.enabled="true"
+ thread_pool.keep_alive_time="30000" thread_pool.max_threads="25" thread_pool.min_threads="1"
+ thread_pool.queue_enabled="true" thread_pool.queue_max_size="10" thread_pool.rejection_policy="Run"
+ tos="8" ucast_recv_buf_size="20000000" ucast_send_buf_size="640000" use_concurrent_stack="true"
+ use_incoming_packet_handler="true" />
+ <PING num_initial_members="3" timeout="2000" /-->
+
+ <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" enable_bundling="true" use_send_queues="false" sock_conn_timeout="300"
+ skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
+
+ oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
+ <MPING timeout="2000" num_initial_members="3" mcast_port="34521" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
+
+
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD max_tries="5" shun="true" timeout="10000"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
+ use_mcast_xmit="false"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000"/>
+ <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000"
+ view_bundling="true"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER/>
+ <pbcast.FLUSH timeout="0"/>
+
+ </jgroupsConfig>
+
+ <sync />
+ <!-- Alternatively, to use async replication, comment out the element above and uncomment the element below. -->
+ <!-- <async /> -->
+ </clustering>
+
+ <loaders passivation="false" shared="false">
+ <!-- loader class="org.jboss.cache.loader.FileCacheLoader" async="false"
+ fetchPersistentState="true" ignoreModifications="false"
+ purgeOnStartup="false">
+ <properties>
+ location=/tmp/test-jboss-cache/proxy
+ </properties>
+ </loader -->
+
+ <loader class="org.exoplatform.services.jcr.impl.storage.jbosscache.JDBCCacheLoader"
+ async="false" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader>
+
+ <!-- loader class="org.exoplatform.services.jcr.impl.core.query.cacheloader.IndexerCacheLoader"
+ async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader-->
+
+ </loaders>
+
+ <!-- Enable batching -->
+ <invocationBatching enabled="true"/>
+</jbosscache>
Property changes on: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws1.xml
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws1.xml (rev 0)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws1.xml 2009-11-23 11:43:27 UTC (rev 806)
@@ -0,0 +1,80 @@
+<?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">
+
+ <!-- Configure the TransactionManager -->
+ <transaction
+ transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" />
+
+ <clustering mode="replication" clusterName="JBoss-Cache-Cluster_db1_ws1">
+
+ <jgroupsConfig>
+ <!--UDP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="false" ip_ttl="2"
+ loopback="false" max_bundle_size="64000" max_bundle_timeout="30" mcast_addr="228.10.10.10"
+ mcast_port="45588" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000"
+ oob_thread_pool.enabled="true" oob_thread_pool.keep_alive_time="10000" oob_thread_pool.max_threads="4"
+ oob_thread_pool.min_threads="1" oob_thread_pool.queue_enabled="true" oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run" thread_naming_pattern="pl" thread_pool.enabled="true"
+ thread_pool.keep_alive_time="30000" thread_pool.max_threads="25" thread_pool.min_threads="1"
+ thread_pool.queue_enabled="true" thread_pool.queue_max_size="10" thread_pool.rejection_policy="Run"
+ tos="8" ucast_recv_buf_size="20000000" ucast_send_buf_size="640000" use_concurrent_stack="true"
+ use_incoming_packet_handler="true" />
+ <PING num_initial_members="3" timeout="2000" /-->
+
+ <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" enable_bundling="true" use_send_queues="false" sock_conn_timeout="300"
+ skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
+
+ oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
+ <MPING timeout="2000" num_initial_members="3" mcast_port="34522" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
+
+
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD max_tries="5" shun="true" timeout="10000"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
+ use_mcast_xmit="false"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000"/>
+ <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000"
+ view_bundling="true"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER/>
+ <pbcast.FLUSH timeout="0"/>
+
+ </jgroupsConfig>
+
+ <sync />
+ <!-- Alternatively, to use async replication, comment out the element above and uncomment the element below. -->
+ <!-- <async /> -->
+ </clustering>
+
+ <loaders passivation="false" shared="false">
+ <!-- loader class="org.jboss.cache.loader.FileCacheLoader" async="false"
+ fetchPersistentState="true" ignoreModifications="false"
+ purgeOnStartup="false">
+ <properties>
+ location=/tmp/test-jboss-cache/proxy
+ </properties>
+ </loader -->
+
+ <loader class="org.exoplatform.services.jcr.impl.storage.jbosscache.JDBCCacheLoader"
+ async="false" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader>
+
+ <!-- loader class="org.exoplatform.services.jcr.impl.core.query.cacheloader.IndexerCacheLoader"
+ async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader-->
+
+ </loaders>
+
+ <!-- Enable batching -->
+ <invocationBatching enabled="true"/>
+</jbosscache>
Property changes on: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws1.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws2.xml
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws2.xml (rev 0)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws2.xml 2009-11-23 11:43:27 UTC (rev 806)
@@ -0,0 +1,80 @@
+<?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">
+
+ <!-- Configure the TransactionManager -->
+ <transaction
+ transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" />
+
+ <clustering mode="replication" clusterName="JBoss-Cache-Cluster_db1_ws2">
+
+ <jgroupsConfig>
+ <!--UDP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="false" ip_ttl="2"
+ loopback="false" max_bundle_size="64000" max_bundle_timeout="30" mcast_addr="228.10.10.10"
+ mcast_port="45588" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000"
+ oob_thread_pool.enabled="true" oob_thread_pool.keep_alive_time="10000" oob_thread_pool.max_threads="4"
+ oob_thread_pool.min_threads="1" oob_thread_pool.queue_enabled="true" oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run" thread_naming_pattern="pl" thread_pool.enabled="true"
+ thread_pool.keep_alive_time="30000" thread_pool.max_threads="25" thread_pool.min_threads="1"
+ thread_pool.queue_enabled="true" thread_pool.queue_max_size="10" thread_pool.rejection_policy="Run"
+ tos="8" ucast_recv_buf_size="20000000" ucast_send_buf_size="640000" use_concurrent_stack="true"
+ use_incoming_packet_handler="true" />
+ <PING num_initial_members="3" timeout="2000" /-->
+
+ <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" enable_bundling="true" use_send_queues="false" sock_conn_timeout="300"
+ skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
+
+ oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
+ <MPING timeout="2000" num_initial_members="3" mcast_port="34523" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
+
+
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD max_tries="5" shun="true" timeout="10000"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
+ use_mcast_xmit="false"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000"/>
+ <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000"
+ view_bundling="true"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER/>
+ <pbcast.FLUSH timeout="0"/>
+
+ </jgroupsConfig>
+
+ <sync />
+ <!-- Alternatively, to use async replication, comment out the element above and uncomment the element below. -->
+ <!-- <async /> -->
+ </clustering>
+
+ <loaders passivation="false" shared="false">
+ <!-- loader class="org.jboss.cache.loader.FileCacheLoader" async="false"
+ fetchPersistentState="true" ignoreModifications="false"
+ purgeOnStartup="false">
+ <properties>
+ location=/tmp/test-jboss-cache/proxy
+ </properties>
+ </loader -->
+
+ <loader class="org.exoplatform.services.jcr.impl.storage.jbosscache.JDBCCacheLoader"
+ async="false" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader>
+
+ <!-- loader class="org.exoplatform.services.jcr.impl.core.query.cacheloader.IndexerCacheLoader"
+ async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader-->
+
+ </loaders>
+
+ <!-- Enable batching -->
+ <invocationBatching enabled="true"/>
+</jbosscache>
Property changes on: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws2.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws3.xml
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws3.xml (rev 0)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws3.xml 2009-11-23 11:43:27 UTC (rev 806)
@@ -0,0 +1,80 @@
+<?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">
+
+ <!-- Configure the TransactionManager -->
+ <transaction
+ transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" />
+
+ <clustering mode="replication" clusterName="JBoss-Cache-Cluster_db1_ws3">
+
+ <jgroupsConfig>
+ <!--UDP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="false" ip_ttl="2"
+ loopback="false" max_bundle_size="64000" max_bundle_timeout="30" mcast_addr="228.10.10.10"
+ mcast_port="45588" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000"
+ oob_thread_pool.enabled="true" oob_thread_pool.keep_alive_time="10000" oob_thread_pool.max_threads="4"
+ oob_thread_pool.min_threads="1" oob_thread_pool.queue_enabled="true" oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run" thread_naming_pattern="pl" thread_pool.enabled="true"
+ thread_pool.keep_alive_time="30000" thread_pool.max_threads="25" thread_pool.min_threads="1"
+ thread_pool.queue_enabled="true" thread_pool.queue_max_size="10" thread_pool.rejection_policy="Run"
+ tos="8" ucast_recv_buf_size="20000000" ucast_send_buf_size="640000" use_concurrent_stack="true"
+ use_incoming_packet_handler="true" />
+ <PING num_initial_members="3" timeout="2000" /-->
+
+ <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" enable_bundling="true" use_send_queues="false" sock_conn_timeout="300"
+ skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
+
+ oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
+ <MPING timeout="2000" num_initial_members="3" mcast_port="34524" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
+
+
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD max_tries="5" shun="true" timeout="10000"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
+ use_mcast_xmit="false"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000"/>
+ <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000"
+ view_bundling="true"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER/>
+ <pbcast.FLUSH timeout="0"/>
+
+ </jgroupsConfig>
+
+ <sync />
+ <!-- Alternatively, to use async replication, comment out the element above and uncomment the element below. -->
+ <!-- <async /> -->
+ </clustering>
+
+ <loaders passivation="false" shared="false">
+ <!-- loader class="org.jboss.cache.loader.FileCacheLoader" async="false"
+ fetchPersistentState="true" ignoreModifications="false"
+ purgeOnStartup="false">
+ <properties>
+ location=/tmp/test-jboss-cache/proxy
+ </properties>
+ </loader -->
+
+ <loader class="org.exoplatform.services.jcr.impl.storage.jbosscache.JDBCCacheLoader"
+ async="false" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader>
+
+ <!-- loader class="org.exoplatform.services.jcr.impl.core.query.cacheloader.IndexerCacheLoader"
+ async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader-->
+
+ </loaders>
+
+ <!-- Enable batching -->
+ <invocationBatching enabled="true"/>
+</jbosscache>
Property changes on: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1_ws3.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws.xml
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws.xml (rev 0)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws.xml 2009-11-23 11:43:27 UTC (rev 806)
@@ -0,0 +1,84 @@
+<?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">
+
+ <!-- Configure the TransactionManager -->
+ <transaction
+ transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" />
+
+ <clustering mode="replication" clusterName="JBoss-Cache-Cluster_db1tck_ws">
+
+ <jgroupsConfig>
+ <!-- UDP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="false" ip_ttl="2"
+ loopback="false" max_bundle_size="64000" max_bundle_timeout="30" mcast_addr="228.10.10.10"
+ mcast_port="45588" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000"
+ oob_thread_pool.enabled="true" oob_thread_pool.keep_alive_time="10000" oob_thread_pool.max_threads="4"
+ oob_thread_pool.min_threads="1" oob_thread_pool.queue_enabled="true" oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run" thread_naming_pattern="pl" thread_pool.enabled="true"
+ thread_pool.keep_alive_time="30000" thread_pool.max_threads="25" thread_pool.min_threads="1"
+ thread_pool.queue_enabled="true" thread_pool.queue_max_size="10" thread_pool.rejection_policy="Run"
+ tos="8" ucast_recv_buf_size="20000000" ucast_send_buf_size="640000" use_concurrent_stack="true"
+ use_incoming_packet_handler="true" />
+ <PING num_initial_members="3" timeout="2000" / -->
+
+ <TCP bind_addr="127.0.0.1" start_port="7800" 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" enable_bundling="true" use_send_queues="false" sock_conn_timeout="300"
+ skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
+
+ oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
+ <MPING timeout="2000" num_initial_members="3" mcast_port="34531" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
+
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD max_tries="5" shun="true" timeout="10000"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
+ use_mcast_xmit="false"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000"/>
+ <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000"
+ view_bundling="true"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER/>
+ <pbcast.FLUSH timeout="0"/>
+
+ </jgroupsConfig>
+
+ <sync />
+ <!-- Alternatively, to use async replication, comment out the element above and uncomment the element below. -->
+ <!-- <async /> -->
+ </clustering>
+
+ <loaders passivation="false" shared="false">
+ <!-- loader class="org.jboss.cache.loader.FileCacheLoader" async="false"
+ fetchPersistentState="true" ignoreModifications="false"
+ purgeOnStartup="false">
+ <properties>
+ location=/tmp/test-jboss-cache/proxy
+ </properties>
+ </loader -->
+
+ <loader class="org.exoplatform.services.jcr.impl.storage.jbosscache.JDBCCacheLoader"
+ async="false" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader>
+
+ <!-- loader class="org.exoplatform.services.jcr.impl.core.query.cacheloader.IndexerCacheLoader"
+ async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader -->
+
+ <!-- loader class="org.exoplatform.services.jcr.impl.storage.jbosscache.LockCacheLoader"
+ async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader -->
+ </loaders>
+
+ <!-- Enable batching -->
+ <invocationBatching enabled="true"/>
+</jbosscache>
Property changes on: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws1.xml
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws1.xml (rev 0)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws1.xml 2009-11-23 11:43:27 UTC (rev 806)
@@ -0,0 +1,84 @@
+<?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">
+
+ <!-- Configure the TransactionManager -->
+ <transaction
+ transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" />
+
+ <clustering mode="replication" clusterName="JBoss-Cache-Cluster_db1tck_ws1">
+
+ <jgroupsConfig>
+ <!-- UDP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="false" ip_ttl="2"
+ loopback="false" max_bundle_size="64000" max_bundle_timeout="30" mcast_addr="228.10.10.10"
+ mcast_port="45588" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000"
+ oob_thread_pool.enabled="true" oob_thread_pool.keep_alive_time="10000" oob_thread_pool.max_threads="4"
+ oob_thread_pool.min_threads="1" oob_thread_pool.queue_enabled="true" oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run" thread_naming_pattern="pl" thread_pool.enabled="true"
+ thread_pool.keep_alive_time="30000" thread_pool.max_threads="25" thread_pool.min_threads="1"
+ thread_pool.queue_enabled="true" thread_pool.queue_max_size="10" thread_pool.rejection_policy="Run"
+ tos="8" ucast_recv_buf_size="20000000" ucast_send_buf_size="640000" use_concurrent_stack="true"
+ use_incoming_packet_handler="true" />
+ <PING num_initial_members="3" timeout="2000" / -->
+
+ <TCP bind_addr="127.0.0.1" start_port="7800" 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" enable_bundling="true" use_send_queues="false" sock_conn_timeout="300"
+ skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
+
+ oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
+ <MPING timeout="2000" num_initial_members="3" mcast_port="34532" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
+
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD max_tries="5" shun="true" timeout="10000"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
+ use_mcast_xmit="false"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000"/>
+ <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000"
+ view_bundling="true"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER/>
+ <pbcast.FLUSH timeout="0"/>
+
+ </jgroupsConfig>
+
+ <sync />
+ <!-- Alternatively, to use async replication, comment out the element above and uncomment the element below. -->
+ <!-- <async /> -->
+ </clustering>
+
+ <loaders passivation="false" shared="false">
+ <!-- loader class="org.jboss.cache.loader.FileCacheLoader" async="false"
+ fetchPersistentState="true" ignoreModifications="false"
+ purgeOnStartup="false">
+ <properties>
+ location=/tmp/test-jboss-cache/proxy
+ </properties>
+ </loader -->
+
+ <loader class="org.exoplatform.services.jcr.impl.storage.jbosscache.JDBCCacheLoader"
+ async="false" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader>
+
+ <!-- loader class="org.exoplatform.services.jcr.impl.core.query.cacheloader.IndexerCacheLoader"
+ async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader -->
+
+ <!-- loader class="org.exoplatform.services.jcr.impl.storage.jbosscache.LockCacheLoader"
+ async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader -->
+ </loaders>
+
+ <!-- Enable batching -->
+ <invocationBatching enabled="true"/>
+</jbosscache>
Property changes on: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws1.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Added: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws2.xml
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws2.xml (rev 0)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws2.xml 2009-11-23 11:43:27 UTC (rev 806)
@@ -0,0 +1,84 @@
+<?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">
+
+ <!-- Configure the TransactionManager -->
+ <transaction
+ transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" />
+
+ <clustering mode="replication" clusterName="JBoss-Cache-Cluster_db1tck_ws2">
+
+ <jgroupsConfig>
+ <!-- UDP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="false" ip_ttl="2"
+ loopback="false" max_bundle_size="64000" max_bundle_timeout="30" mcast_addr="228.10.10.10"
+ mcast_port="45588" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000"
+ oob_thread_pool.enabled="true" oob_thread_pool.keep_alive_time="10000" oob_thread_pool.max_threads="4"
+ oob_thread_pool.min_threads="1" oob_thread_pool.queue_enabled="true" oob_thread_pool.queue_max_size="10"
+ oob_thread_pool.rejection_policy="Run" thread_naming_pattern="pl" thread_pool.enabled="true"
+ thread_pool.keep_alive_time="30000" thread_pool.max_threads="25" thread_pool.min_threads="1"
+ thread_pool.queue_enabled="true" thread_pool.queue_max_size="10" thread_pool.rejection_policy="Run"
+ tos="8" ucast_recv_buf_size="20000000" ucast_send_buf_size="640000" use_concurrent_stack="true"
+ use_incoming_packet_handler="true" />
+ <PING num_initial_members="3" timeout="2000" / -->
+
+ <TCP bind_addr="127.0.0.1" start_port="7800" 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" enable_bundling="true" use_send_queues="false" sock_conn_timeout="300"
+ skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
+ thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
+
+ oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
+ oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
+ <MPING timeout="2000" num_initial_members="3" mcast_port="34533" bind_addr="127.0.0.1" mcast_addr="224.0.0.1" />
+
+ <MERGE2 max_interval="30000" min_interval="10000"/>
+ <FD_SOCK/>
+ <FD max_tries="5" shun="true" timeout="10000"/>
+ <VERIFY_SUSPECT timeout="1500"/>
+ <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
+ use_mcast_xmit="false"/>
+ <UNICAST timeout="300,600,1200,2400,3600"/>
+ <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000"/>
+ <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000"
+ view_bundling="true"/>
+ <FRAG2 frag_size="60000"/>
+ <pbcast.STREAMING_STATE_TRANSFER/>
+ <pbcast.FLUSH timeout="0"/>
+
+ </jgroupsConfig>
+
+ <sync />
+ <!-- Alternatively, to use async replication, comment out the element above and uncomment the element below. -->
+ <!-- <async /> -->
+ </clustering>
+
+ <loaders passivation="false" shared="false">
+ <!-- loader class="org.jboss.cache.loader.FileCacheLoader" async="false"
+ fetchPersistentState="true" ignoreModifications="false"
+ purgeOnStartup="false">
+ <properties>
+ location=/tmp/test-jboss-cache/proxy
+ </properties>
+ </loader -->
+
+ <loader class="org.exoplatform.services.jcr.impl.storage.jbosscache.JDBCCacheLoader"
+ async="false" fetchPersistentState="true" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader>
+
+ <!-- loader class="org.exoplatform.services.jcr.impl.core.query.cacheloader.IndexerCacheLoader"
+ async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader -->
+
+ <!-- loader class="org.exoplatform.services.jcr.impl.storage.jbosscache.LockCacheLoader"
+ async="false" fetchPersistentState="false" ignoreModifications="false" purgeOnStartup="false">
+ <properties>
+ </properties>
+ </loader -->
+ </loaders>
+
+ <!-- Enable batching -->
+ <invocationBatching enabled="true"/>
+</jbosscache>
Property changes on: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader_db1tck_ws2.xml
___________________________________________________________________
Name: svn:eol-style
+ native
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jcr-config.xml 2009-11-23 11:41:40 UTC (rev 805)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jcr-config.xml 2009-11-23 11:43:27 UTC (rev 806)
@@ -32,7 +32,7 @@
<!-- for system storage -->
<container class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
- <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader_db1_ws.xml" />
<property name="source-name" value="jdbcjcr" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
@@ -79,7 +79,7 @@
<workspace name="ws1">
<container class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
- <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader_db1_ws1.xml" />
<property name="source-name" value="jdbcjcr1" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
@@ -115,7 +115,7 @@
<workspace name="ws2">
<container class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
- <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader_db1_ws2.xml" />
<property name="source-name" value="jdbcjcr2" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
@@ -153,7 +153,7 @@
<container
class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
- <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader_db1_ws3.xml" />
<property name="source-name" value="jdbcjcr3" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
@@ -228,7 +228,7 @@
<!-- for system storage -->
<container class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
- <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader_db1tck_ws.xml" />
<property name="source-name" value="jdbcjcrtck" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
@@ -278,7 +278,7 @@
<workspace name="ws1">
<container class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
- <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader_db1tck_ws1.xml" />
<property name="source-name" value="jdbcjcr1tck" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
@@ -319,7 +319,7 @@
<workspace name="ws2">
<container class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
- <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader_db1tck_ws2.xml" />
<property name="source-name" value="jdbcjcr2tck" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
16 years, 8 months
exo-jcr SVN: r805 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2009-11-23 06:41:40 -0500 (Mon, 23 Nov 2009)
New Revision: 805
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java
Log:
EXOJCR-246: JDBCCahceLoader getChildNames updated
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java 2009-11-23 11:22:30 UTC (rev 804)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java 2009-11-23 11:41:40 UTC (rev 805)
@@ -599,6 +599,13 @@
return null;
}
}
+ else if (name.size() > 2)
+ {
+ // seems it is fqn like /$NODES/nodeUUID/childname[/...] or /$REFS/nodeUUID/propUUUIS[/...]
+ // TODO this is unexpected part of cache throw Exception
+ LOG.warn("This is unexpected FQN " + name);
+ return null;
+ }
else if (name.get(0).equals(JBossCacheStorage.NODES))
{
// TODO should never be called
16 years, 8 months
exo-jcr SVN: r804 - in jcr/branches/1.12.0-JBC/component/core/src: main/java/org/exoplatform/services/jcr/impl/storage/jdbc and 3 other directories.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2009-11-23 06:22:30 -0500 (Mon, 23 Nov 2009)
New Revision: 804
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/JDBCWorkspaceDataContainerTestBase.java
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoaderTest.java
Log:
EXOJCR-246: JDBCCahceLoader getChildNames implemented for /$REFS
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java 2009-11-23 11:10:55 UTC (rev 803)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java 2009-11-23 11:22:30 UTC (rev 804)
@@ -412,6 +412,7 @@
else
{
attrs = null;
+ LOG.warn("Unexpected Fqn asked " + name);
}
}
@@ -618,8 +619,7 @@
}
else if (name.get(0).equals(JBossCacheStorage.REFS))
{
- // TODO return all referenced nodes in workspace
- return new LinkedHashSet<String>();
+ return conn.getAllRefencedNodeIdentifiers();
}
else if (name.get(0).equals(Fqn.ROOT))
{
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java 2009-11-23 11:10:55 UTC (rev 803)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DBConstants.java 2009-11-23 11:22:30 UTC (rev 804)
@@ -222,6 +222,11 @@
*/
protected String FIND_REFERENCE;
+ /**
+ * FIND_REFERENCED_NODES
+ */
+ protected String FIND_REFERENCED_NODES;
+
// ======================== ITEMS table ========================
/**
* COLUMN_ID.
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-11-23 11:10:55 UTC (rev 803)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCStorageConnection.java 2009-11-23 11:22:30 UTC (rev 804)
@@ -2293,6 +2293,28 @@
}
}
+ public Set<String> getAllRefencedNodeIdentifiers() throws RepositoryException, IllegalStateException
+ {
+ checkIfOpened();
+
+ try
+ {
+ ResultSet node = findAllReferencedNodeIdentifiers();
+ Set<String> childrens = new LinkedHashSet<String>();
+ while (node.next())
+ {
+ String nodeId = node.getString(COLUMN_ID); //"NODE_ID");//
+ childrens.add(nodeId);
+ }
+
+ return childrens;
+ }
+ catch (SQLException e)
+ {
+ throw new RepositoryException(e);
+ }
+ }
+
/**
* Return all Nodes in workspace.
* TODO check if it used, should not!
@@ -2390,4 +2412,6 @@
protected abstract ResultSet findAllNodeIdentifiers() throws SQLException;
+ protected abstract ResultSet findAllReferencedNodeIdentifiers() throws SQLException;
+
}
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java 2009-11-23 11:10:55 UTC (rev 803)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/MultiDbJDBCConnection.java 2009-11-23 11:22:30 UTC (rev 804)
@@ -126,6 +126,8 @@
protected PreparedStatement findReference;
+ protected PreparedStatement findAllReferencedNodes;
+
/**
* Multidatabase JDBC Connection constructor.
*
@@ -195,6 +197,8 @@
FIND_REFERENCE = "select P.ID from JCR_MREF R, JCR_MITEM P where R.NODE_ID=? and R.PROPERTY_ID=?";
+ FIND_REFERENCED_NODES = "select N.ID from JCR_MREF R, JCR_MITEM N where N.ID=R.NODE_ID";
+
FIND_VALUES_BY_PROPERTYID =
"select PROPERTY_ID, ORDER_NUM, DATA, STORAGE_DESC from JCR_MVALUE where PROPERTY_ID=? order by ORDER_NUM";
@@ -241,6 +245,7 @@
DELETE_ITEM = "delete from JCR_MITEM where ID=?";
DELETE_VALUE = "delete from JCR_MVALUE where PROPERTY_ID=?";
DELETE_REF = "delete from JCR_MREF where PROPERTY_ID=?";
+
}
/**
@@ -726,4 +731,18 @@
return result.next();
}
+
+ @Override
+ protected ResultSet findAllReferencedNodeIdentifiers() throws SQLException
+ {
+ // TODO make query
+ if (findAllReferencedNodes == null)
+ findAllReferencedNodes = dbConnection.prepareStatement(this.FIND_REFERENCED_NODES);
+ else
+ findAllReferencedNodes.clearParameters();
+
+ ResultSet result = findAllReferencedNodes.executeQuery();
+
+ return result;
+ }
}
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java 2009-11-23 11:10:55 UTC (rev 803)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/db/SingleDbJDBCConnection.java 2009-11-23 11:22:30 UTC (rev 804)
@@ -729,4 +729,11 @@
// TODO Auto-generated method stub
return false;
}
+
+ @Override
+ protected ResultSet findAllReferencedNodeIdentifiers() throws SQLException
+ {
+ // TODO Auto-generated method stub
+ return null;
+ }
}
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/JDBCWorkspaceDataContainerTestBase.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/JDBCWorkspaceDataContainerTestBase.java 2009-11-23 11:10:55 UTC (rev 803)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/JDBCWorkspaceDataContainerTestBase.java 2009-11-23 11:22:30 UTC (rev 804)
@@ -1,5 +1,7 @@
package org.exoplatform.services.jcr.impl.storage;
+import junit.framework.TestCase;
+
import org.apache.commons.dbcp.BasicDataSourceFactory;
import org.exoplatform.services.idgenerator.impl.IDGeneratorServiceImpl;
import org.exoplatform.services.jcr.access.AccessControlList;
@@ -33,8 +35,6 @@
import javax.naming.InitialContext;
import javax.sql.DataSource;
-import junit.framework.TestCase;
-
/**
* Created by The eXo Platform SAS.
*
@@ -52,7 +52,7 @@
protected void setUp() throws Exception
{
super.setUp();
-
+
initPersistence();
}
@@ -91,8 +91,8 @@
return "jdbcjcr_" + IdGenerator.generate();
}
- protected WorkspaceEntry getNewWs(String wsName, boolean isMultiDb, String dsName, String vsPath, ContainerEntry entry)
- throws Exception
+ protected WorkspaceEntry getNewWs(String wsName, boolean isMultiDb, String dsName, String vsPath,
+ ContainerEntry entry) throws Exception
{
List params = new ArrayList();
@@ -225,7 +225,7 @@
protected void deleteJCRRoot() throws Exception
{
// prepare
-
+
// delete root (/) etc
}
@@ -238,8 +238,8 @@
* @param primaryType InternalQName
* @throws Exception
*/
- protected void addDbNode(WorkspaceStorageConnection conn, QPath root, String nodeId, InternalQName primaryType, String parentNodeId)
- throws Exception
+ protected void addDbNode(WorkspaceStorageConnection conn, QPath root, String nodeId, InternalQName primaryType,
+ String parentNodeId) throws Exception
{
// add root (/)
conn.add(new TransientNodeData(root, nodeId, 1, primaryType, new InternalQName[0], 0, parentNodeId,
@@ -250,6 +250,25 @@
}
/**
+ * Add Node to the connection but doesn't save it.
+ *
+ * @param conn WorkspaceStorageConnection
+ * @param root QPath
+ * @param nodeId String
+ * @param primaryType InternalQName
+ * @throws Exception
+ */
+ protected void addDbNodeWithMixin(WorkspaceStorageConnection conn, QPath root, String nodeId,
+ InternalQName primaryType, InternalQName[] mixins, String parentNodeId) throws Exception
+ {
+ // add root (/)
+ conn.add(new TransientNodeData(root, nodeId, 1, primaryType, mixins, 0, parentNodeId, new AccessControlList()));
+
+ // add property (/jcr:primaryType)
+ conn.add(createProperty(root, nodeId, Constants.JCR_PRIMARYTYPE, primaryType, false));
+ }
+
+ /**
* Add Property to the connection but doesn't save it.
*
* @param conn WorkspaceStorageConnection
@@ -343,5 +362,4 @@
// new AccessControlList()));
}
-
}
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoaderTest.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoaderTest.java 2009-11-23 11:10:55 UTC (rev 803)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoaderTest.java 2009-11-23 11:22:30 UTC (rev 804)
@@ -42,10 +42,12 @@
import org.jboss.cache.Modification;
import java.util.ArrayList;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
+import javax.jcr.PropertyType;
import javax.naming.Context;
/**
@@ -186,11 +188,12 @@
WorkspaceStorageConnection conn = persistentContainer.openConnection();
QPath baseNodePath = QPath.makeChildPath(Constants.ROOT_PATH, InternalQName.parse("[]baseNode"));
String baseNodeId = IdGenerator.generate();
- addDbNode(conn, baseNodePath, baseNodeId,Constants.NT_UNSTRUCTURED, Constants.ROOT_UUID);
-
+ addDbNode(conn, baseNodePath, baseNodeId, Constants.NT_UNSTRUCTURED, Constants.ROOT_UUID);
+
// add child nodes [node1]
String nodeId = IdGenerator.generate();
- addDbNode(conn, QPath.makeChildPath(baseNodePath, InternalQName.parse("[]node1")), nodeId, Constants.NT_UNSTRUCTURED, baseNodeId);
+ addDbNode(conn, QPath.makeChildPath(baseNodePath, InternalQName.parse("[]node1")), nodeId,
+ Constants.NT_UNSTRUCTURED, baseNodeId);
conn.commit();
List<Modification> modifications = new ArrayList<Modification>();
@@ -261,24 +264,24 @@
QPath nodePath = QPath.parse("[]:1[]node:1");
addDbNode(conn, nodePath, nodeId, Constants.NT_UNSTRUCTURED, Constants.ROOT_UUID);
conn.commit();
-
+
conn = persistentContainer.openConnection();
-
+
NodeData nodeData =
new TransientNodeData(nodePath, nodeId, 1, Constants.NT_UNSTRUCTURED, new InternalQName[0], 2,
Constants.ROOT_UUID, new AccessControlList());
-
+
List<Modification> modifications = new ArrayList<Modification>();
modifications.addAll(updateNode(nodeData));
-
+
loader.put(modifications);
// tests it
conn = persistentContainer.openConnection();
-
- NodeData destNodeData = (NodeData) conn.getItemData(nodeId);
-
+
+ NodeData destNodeData = (NodeData)conn.getItemData(nodeId);
+
assertNotNull(destNodeData);
assertEquals(2, destNodeData.getOrderNumber());
}
@@ -292,26 +295,29 @@
String nodeId = IdGenerator.generate();
QPath nodePath = QPath.parse("[]:1[]node:1");
addDbNode(conn, nodePath, nodeId, Constants.NT_UNSTRUCTURED, Constants.ROOT_UUID);
-
- TransientPropertyData propData = addDbProperty(conn, nodePath, nodeId, InternalQName.parse("[]prop"), "JCR DATA VALUE [base]", false);
-
+
+ TransientPropertyData propData =
+ addDbProperty(conn, nodePath, nodeId, InternalQName.parse("[]prop"), "JCR DATA VALUE [base]", false);
+
conn.commit();
// create update property
- TransientPropertyData updatePropData = new TransientPropertyData(QPath.makeChildPath(nodePath, InternalQName.parse("[]prop")), propData.getIdentifier(), 1, 1, nodeId, false);
+ TransientPropertyData updatePropData =
+ new TransientPropertyData(QPath.makeChildPath(nodePath, InternalQName.parse("[]prop")), propData
+ .getIdentifier(), 1, 1, nodeId, false);
updatePropData.setValue(new TransientValueData("JCR DATA VALUE [updated]"));
-
+
List<Modification> modifications = new ArrayList<Modification>();
-
+
modifications.addAll(updateProperty(updatePropData));
-
+
loader.put(modifications);
// tests it
conn = persistentContainer.openConnection();
-
- PropertyData destPropData = (PropertyData) conn.getItemData(propData.getIdentifier());
-
+
+ PropertyData destPropData = (PropertyData)conn.getItemData(propData.getIdentifier());
+
assertNotNull(destPropData);
ValueData valueData = destPropData.getValues().get(0);
assertEquals("JCR DATA VALUE [updated]", new String(valueData.getAsByteArray(), "UTF-8"));
@@ -362,25 +368,26 @@
// prepare
WorkspaceStorageConnection conn = persistentContainer.openConnection();
-
+
QPath baseNodePath = QPath.makeChildPath(Constants.ROOT_PATH, InternalQName.parse("[]baseNode"));
String baseNodeId = IdGenerator.generate();
- addDbNode(conn, baseNodePath, baseNodeId,Constants.NT_UNSTRUCTURED, Constants.ROOT_UUID);
-
+ addDbNode(conn, baseNodePath, baseNodeId, Constants.NT_UNSTRUCTURED, Constants.ROOT_UUID);
+
// add child nodes [node1]
String nodeId = IdGenerator.generate();
- addDbNode(conn, QPath.makeChildPath(baseNodePath, InternalQName.parse("[]node1")), nodeId, Constants.NT_UNSTRUCTURED, baseNodeId);
+ addDbNode(conn, QPath.makeChildPath(baseNodePath, InternalQName.parse("[]node1")), nodeId,
+ Constants.NT_UNSTRUCTURED, baseNodeId);
conn.commit();
-
+
// tests it
Map<Object, Object> attrebutes = loader.get(Fqn.fromElements(JBossCacheStorage.NODES, baseNodeId, "[]node1:1"));
-
+
assertNotNull(attrebutes);
-
- String destNodeId = (String) attrebutes.get(JBossCacheStorage.ITEM_ID);
-
+
+ String destNodeId = (String)attrebutes.get(JBossCacheStorage.ITEM_ID);
+
assertNotNull(destNodeId);
- assertEquals(nodeId, destNodeId);
+ assertEquals(nodeId, destNodeId);
}
public void testGetPropertyByIdentifier() throws Exception
@@ -395,8 +402,7 @@
connection.commit();
// tests it
- Map<Object, Object> attrebutes =
- loader.get(Fqn.fromElements(JBossCacheStorage.PROPS, propData.getIdentifier()));
+ Map<Object, Object> attrebutes = loader.get(Fqn.fromElements(JBossCacheStorage.PROPS, propData.getIdentifier()));
assertNotNull(attrebutes);
@@ -433,19 +439,22 @@
QPath baseNodePath = QPath.makeChildPath(Constants.ROOT_PATH, InternalQName.parse("[]baseNode"));
String baseNodeId = IdGenerator.generate();
- addDbNode(conn, baseNodePath, baseNodeId,Constants.NT_UNSTRUCTURED, Constants.ROOT_UUID);
-
+ addDbNode(conn, baseNodePath, baseNodeId, Constants.NT_UNSTRUCTURED, Constants.ROOT_UUID);
+
// add child nodes [node1, node2, node3]
- addDbNode(conn, QPath.makeChildPath(baseNodePath, InternalQName.parse("[]node1")), IdGenerator.generate(), Constants.NT_UNSTRUCTURED, baseNodeId);
- addDbNode(conn, QPath.makeChildPath(baseNodePath, InternalQName.parse("[]node2")), IdGenerator.generate(), Constants.NT_UNSTRUCTURED, baseNodeId);
- addDbNode(conn, QPath.makeChildPath(baseNodePath, InternalQName.parse("[]node3")), IdGenerator.generate(), Constants.NT_UNSTRUCTURED, baseNodeId);
+ addDbNode(conn, QPath.makeChildPath(baseNodePath, InternalQName.parse("[]node1")), IdGenerator.generate(),
+ Constants.NT_UNSTRUCTURED, baseNodeId);
+ addDbNode(conn, QPath.makeChildPath(baseNodePath, InternalQName.parse("[]node2")), IdGenerator.generate(),
+ Constants.NT_UNSTRUCTURED, baseNodeId);
+ addDbNode(conn, QPath.makeChildPath(baseNodePath, InternalQName.parse("[]node3")), IdGenerator.generate(),
+ Constants.NT_UNSTRUCTURED, baseNodeId);
conn.commit();
// tests it
- Set<String> childs = (Set<String>) loader.getChildrenNames(Fqn.fromElements(JBossCacheStorage.NODES, baseNodeId));
-
+ Set<String> childs = (Set<String>)loader.getChildrenNames(Fqn.fromElements(JBossCacheStorage.NODES, baseNodeId));
+
assertNotNull(childs);
-
+
assertEquals(3, childs.size());
assertTrue(childs.contains("[]node1:1"));
assertTrue(childs.contains("[]node2:1"));
@@ -460,24 +469,27 @@
QPath baseNodePath = QPath.makeChildPath(Constants.ROOT_PATH, InternalQName.parse("[]baseNode"));
String baseNodeId = IdGenerator.generate();
- addDbNode(conn, baseNodePath, baseNodeId,Constants.NT_UNSTRUCTURED, Constants.ROOT_UUID);
+ addDbNode(conn, baseNodePath, baseNodeId, Constants.NT_UNSTRUCTURED, Constants.ROOT_UUID);
- TransientPropertyData propData1 = addDbProperty(conn, baseNodePath, baseNodeId, InternalQName.parse("[]prop1"), "JCR DATA VALUE 1", false);
- TransientPropertyData propData2 = addDbProperty(conn, baseNodePath, baseNodeId, InternalQName.parse("[]prop2"), "JCR DATA VALUE 2", false);
- TransientPropertyData propData3 = addDbProperty(conn, baseNodePath, baseNodeId, InternalQName.parse("[]prop3"), "JCR DATA VALUE 3", false);
+ TransientPropertyData propData1 =
+ addDbProperty(conn, baseNodePath, baseNodeId, InternalQName.parse("[]prop1"), "JCR DATA VALUE 1", false);
+ TransientPropertyData propData2 =
+ addDbProperty(conn, baseNodePath, baseNodeId, InternalQName.parse("[]prop2"), "JCR DATA VALUE 2", false);
+ TransientPropertyData propData3 =
+ addDbProperty(conn, baseNodePath, baseNodeId, InternalQName.parse("[]prop3"), "JCR DATA VALUE 3", false);
conn.commit();
-
+
// tests it
Map<Object, Object> attrebutes = loader.get(Fqn.fromElements(JBossCacheStorage.NODES, baseNodeId));
-
+
assertNotNull(attrebutes);
-
+
assertTrue(attrebutes.containsKey(Constants.JCR_PRIMARYTYPE.getAsString()));
assertTrue(attrebutes.containsKey("[]prop1"));
assertTrue(attrebutes.containsKey("[]prop2"));
assertTrue(attrebutes.containsKey("[]prop3"));
-
+
assertEquals(propData1.getIdentifier(), attrebutes.get("[]prop1"));
assertEquals(propData2.getIdentifier(), attrebutes.get("[]prop2"));
assertEquals(propData3.getIdentifier(), attrebutes.get("[]prop3"));
@@ -487,54 +499,142 @@
{
// prepare
+ String nodeId = IdGenerator.generate();
+ QPath nodePath = QPath.parse("[]:1[]node:1");
+ NodeData node =
+ new TransientNodeData(nodePath, nodeId, 1, Constants.NT_UNSTRUCTURED,
+ new InternalQName[]{Constants.MIX_REFERENCEABLE}, 0, Constants.ROOT_UUID, new AccessControlList());
+
+ PropertyData primaryType =
+ createProperty(nodePath, nodeId, Constants.JCR_PRIMARYTYPE, Constants.NT_UNSTRUCTURED, false);
+
+ List<Modification> modifications = new ArrayList<Modification>();
+ modifications.addAll(addNode(node));
+ modifications.addAll(addProperty(primaryType));
+
+ loader.put(modifications);
+
+ // make node with refernce
+ String refnodeId = IdGenerator.generate();
+
+ QPath refnodePath = QPath.parse("[]:1[]node2:1");
+ NodeData refnode =
+ new TransientNodeData(refnodePath, refnodeId, 1, Constants.NT_UNSTRUCTURED, new InternalQName[0], 0,
+ Constants.ROOT_UUID, new AccessControlList());
+
+ PropertyData refprimaryType =
+ createProperty(refnodePath, refnodeId, Constants.JCR_PRIMARYTYPE, Constants.NT_UNSTRUCTURED, false);
+
+ String refPropId1 = IdGenerator.generate();
+ TransientPropertyData propData =
+ new TransientPropertyData(QPath.makeChildPath(refnodePath, "[]refprop1"), refPropId1, 1,
+ PropertyType.REFERENCE, refnodeId, false);
+ propData.setValue(new TransientValueData(nodeId));
+
+ modifications.clear();
+ modifications.addAll(addNode(refnode));
+ modifications.addAll(addProperty(refprimaryType));
+ loader.put(modifications);
+
+ WorkspaceStorageConnection conn = persistentContainer.openConnection();
+
+ // NodeData destNodeData = (NodeData)conn.getItemData(nodeId);
+ //
+ // assertNotNull(destNodeData);
+ // assertEquals(node.getIdentifier(), destNodeData.getIdentifier());
+ // assertEquals(node.getOrderNumber(), destNodeData.getOrderNumber());
+ // assertEquals(node.getParentIdentifier(), destNodeData.getParentIdentifier());
+ // assertEquals(node.getPersistedVersion(), destNodeData.getPersistedVersion());
+ // assertEquals(node.getQPath().getAsString(), destNodeData.getQPath().getAsString());
+ // assertEquals(node.getPrimaryTypeName().getAsString(), destNodeData.getPrimaryTypeName().getAsString());
+
+ modifications.clear();
+ modifications.addAll(addProperty(propData));
+ loader.put(modifications);
+
+ String refPropId2 = IdGenerator.generate();
+ TransientPropertyData propData2 =
+ new TransientPropertyData(QPath.makeChildPath(refnodePath, "[]refprop2"), refPropId2, 1,
+ PropertyType.REFERENCE, refnodeId, false);
+ propData2.setValue(new TransientValueData(nodeId));
+
+ modifications.clear();
+ modifications.addAll(addProperty(propData2));
+ loader.put(modifications);
+
// tests it
+ Set names = loader.getChildrenNames(Fqn.fromString("/$REFS/" + nodeId));
+
+ assertTrue(names.size() == 2);
+
+ Iterator it = names.iterator();
+
+ assertEquals(refPropId1, (String)it.next());
+ assertEquals(refPropId2, (String)it.next());
+
+ Set referncedNodes = loader.getChildrenNames(Fqn.fromString("/$REFS"));
+
+ assertTrue(referncedNodes.size() == 1);
+
+ it = referncedNodes.iterator();
+
+ assertEquals(nodeId, (String)it.next());
+
+ conn = persistentContainer.openConnection();
+
+ // tests it
+ List<PropertyData> refs = conn.getReferencesData(nodeId);
+
+ assertEquals(2, refs.size());
+ assertEquals(refPropId1, refs.get(0).getIdentifier());
+ assertEquals(refPropId2, refs.get(1).getIdentifier());
}
-
+
public void testExistNode() throws Exception
{
// prepare
WorkspaceStorageConnection conn = persistentContainer.openConnection();
-
+
QPath baseNodePath = QPath.makeChildPath(Constants.ROOT_PATH, InternalQName.parse("[]baseNode"));
String baseNodeId = IdGenerator.generate();
- addDbNode(conn, baseNodePath, baseNodeId,Constants.NT_UNSTRUCTURED, Constants.ROOT_UUID);
+ addDbNode(conn, baseNodePath, baseNodeId, Constants.NT_UNSTRUCTURED, Constants.ROOT_UUID);
conn.commit();
-
+
// tests it
String nodeId = IdGenerator.generate();
-
+
assertFalse(loader.exists(Fqn.fromElements(JBossCacheStorage.NODES, nodeId)));
assertFalse(loader.exists(Fqn.fromElements(JBossCacheStorage.NODES, baseNodeId, "[]node1:1")));
-
+
conn = persistentContainer.openConnection();
-
- addDbNode(conn, QPath.makeChildPath(baseNodePath, InternalQName.parse("[]node1")), nodeId, Constants.NT_UNSTRUCTURED, baseNodeId);
+
+ addDbNode(conn, QPath.makeChildPath(baseNodePath, InternalQName.parse("[]node1")), nodeId,
+ Constants.NT_UNSTRUCTURED, baseNodeId);
conn.commit();
-
+
assertTrue(loader.exists(Fqn.fromElements(JBossCacheStorage.NODES, nodeId)));
assertTrue(loader.exists(Fqn.fromElements(JBossCacheStorage.NODES, baseNodeId, "[]node1:1")));
}
-
+
public void testExistProperty() throws Exception
{
// prepare
WorkspaceStorageConnection conn = persistentContainer.openConnection();
-
+
TransientPropertyData propData =
- createProperty(Constants.ROOT_PATH, Constants.ROOT_UUID, Constants.JCR_DATA, "JCR DATA VALUE",
- false);
-
+ createProperty(Constants.ROOT_PATH, Constants.ROOT_UUID, Constants.JCR_DATA, "JCR DATA VALUE", false);
+
// tests it
assertFalse(loader.exists(Fqn.fromElements(JBossCacheStorage.PROPS, propData.getIdentifier())));
-
+
// commit in DB
conn.add(propData);
conn.commit();
-
+
assertTrue(loader.exists(Fqn.fromElements(JBossCacheStorage.PROPS, propData.getIdentifier())));
}
16 years, 8 months
exo-jcr SVN: r803 - jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2009-11-23 06:10:55 -0500 (Mon, 23 Nov 2009)
New Revision: 803
Modified:
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheRestartTest.java
Log:
EXOJCR-203 : The test JBossCacheRestartTest was changed.
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheRestartTest.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheRestartTest.java 2009-11-23 10:00:16 UTC (rev 802)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheRestartTest.java 2009-11-23 11:10:55 UTC (rev 803)
@@ -20,14 +20,18 @@
import org.exoplatform.services.jcr.access.AccessControlList;
import org.exoplatform.services.jcr.datamodel.InternalQName;
+import org.exoplatform.services.jcr.datamodel.PropertyData;
import org.exoplatform.services.jcr.datamodel.QPath;
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.dataflow.TransientNodeData;
import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
+import org.exoplatform.services.jcr.util.IdGenerator;
import org.jboss.cache.Fqn;
import org.jboss.cache.Node;
+import com.thoughtworks.xstream.core.ReferenceByIdMarshaller.IDGenerator;
+
/**
* Created by The eXo Platform SAS.
*
@@ -49,11 +53,30 @@
// add root (/)
initJCRRoot();
+ // add node (/node)
+ String node1id = IdGenerator.generate();
+ QPath node1path = QPath.parse("[]:1[]node:1");
+ conn.add(new TransientNodeData(node1path, node1id, 1, Constants.NT_UNSTRUCTURED, new InternalQName[0], 0,
+ Constants.ROOT_UUID, new AccessControlList()));
+
+ PropertyData primaryType =
+ createProperty(node1path, node1id, Constants.JCR_PRIMARYTYPE, Constants.NT_UNSTRUCTURED, false);
+ conn.add(primaryType);
+ conn.commit();
+
// check before stop
Node<Serializable, Object> rNode = cache.getRoot().getChild(Fqn.fromElements(JBossCacheStorage.NODES, Constants.ROOT_UUID));
assertNotNull("Node expected", rNode);
checkNode(rNode, Constants.ROOT_UUID, Constants.ROOT_PATH);
+ Node<Serializable, Object> node1 = cache.getRoot().getChild(Fqn.fromElements(JBossCacheStorage.NODES, node1id));
+ assertNotNull("Node '/node1' expected", node1);
+ checkNode(node1, node1id, node1path);
+
+ Node<Serializable, Object> prop1 = cache.getRoot().getChild(Fqn.fromElements(JBossCacheStorage.PROPS, primaryType.getIdentifier()));
+ assertNotNull("Property '/node1/jcr:primaryType' expected", prop1);
+ checkProp(primaryType.getIdentifier(), primaryType.getQPath(), new String(primaryType.getValues().get(0).getAsByteArray(),Constants.DEFAULT_ENCODING));
+
// stop cache
cache.stop();
cache.destroy();
@@ -65,5 +88,13 @@
rNode = cache.getRoot().getChild(Fqn.fromElements(JBossCacheStorage.NODES, Constants.ROOT_UUID));
assertNotNull("Node expected", rNode);
checkNode(rNode, Constants.ROOT_UUID, Constants.ROOT_PATH);
+
+ node1 = cache.getRoot().getChild(Fqn.fromElements(JBossCacheStorage.NODES, node1id));
+ assertNotNull("Node '/node1' expected", node1);
+ checkNode(node1, node1id, node1path);
+
+ prop1 = cache.getRoot().getChild(Fqn.fromElements(JBossCacheStorage.PROPS, primaryType.getIdentifier()));
+ assertNotNull("Property '/node1/jcr:primaryType' expected", prop1);
+ checkProp(primaryType.getIdentifier(), primaryType.getQPath(), new String(primaryType.getValues().get(0).getAsByteArray(),Constants.DEFAULT_ENCODING));
}
}
16 years, 8 months
exo-jcr SVN: r802 - jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2009-11-23 05:00:16 -0500 (Mon, 23 Nov 2009)
New Revision: 802
Modified:
jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader.xml
jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-199 : All ws on JBC
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader.xml
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader.xml 2009-11-23 09:53:45 UTC (rev 801)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jbosscache-config-exoloader.xml 2009-11-23 10:00:16 UTC (rev 802)
@@ -6,51 +6,8 @@
<transaction
transactionManagerLookupClass="org.jboss.cache.transaction.GenericTransactionManagerLookup" />
- <clustering mode="replication">
-
- <jgroupsConfig>
- <!--UDP discard_incompatible_packets="true" enable_bundling="false" enable_diagnostics="false" ip_ttl="2"
- loopback="false" max_bundle_size="64000" max_bundle_timeout="30" mcast_addr="228.10.10.10"
- mcast_port="45588" mcast_recv_buf_size="25000000" mcast_send_buf_size="640000"
- oob_thread_pool.enabled="true" oob_thread_pool.keep_alive_time="10000" oob_thread_pool.max_threads="4"
- oob_thread_pool.min_threads="1" oob_thread_pool.queue_enabled="true" oob_thread_pool.queue_max_size="10"
- oob_thread_pool.rejection_policy="Run" thread_naming_pattern="pl" thread_pool.enabled="true"
- thread_pool.keep_alive_time="30000" thread_pool.max_threads="25" thread_pool.min_threads="1"
- thread_pool.queue_enabled="true" thread_pool.queue_max_size="10" thread_pool.rejection_policy="Run"
- tos="8" ucast_recv_buf_size="20000000" ucast_send_buf_size="640000" use_concurrent_stack="true"
- use_incoming_packet_handler="true" />
- <PING num_initial_members="3" timeout="2000" /-->
-
- <TCP bind_addr="localhost" 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" enable_bundling="true" use_send_queues="false" sock_conn_timeout="300"
- skip_suspected_members="true" use_concurrent_stack="true" thread_pool.enabled="true" thread_pool.min_threads="1" thread_pool.max_threads="25"
- thread_pool.keep_alive_time="5000" thread_pool.queue_enabled="false" thread_pool.queue_max_size="100" thread_pool.rejection_policy="run"
+
- oob_thread_pool.enabled="true" oob_thread_pool.min_threads="1" oob_thread_pool.max_threads="8" oob_thread_pool.keep_alive_time="5000"
- oob_thread_pool.queue_enabled="false" oob_thread_pool.queue_max_size="100" oob_thread_pool.rejection_policy="run" />
- <MPING timeout="2000" num_initial_members="3" mcast_port="34526" bind_addr="localhost" mcast_addr="224.0.0.1" />
-
-
- <MERGE2 max_interval="30000" min_interval="10000"/>
- <FD_SOCK/>
- <FD max_tries="5" shun="true" timeout="10000"/>
- <VERIFY_SUSPECT timeout="1500"/>
- <pbcast.NAKACK discard_delivered_msgs="true" gc_lag="0" retransmit_timeout="300,600,1200,2400,4800"
- use_mcast_xmit="false"/>
- <UNICAST timeout="300,600,1200,2400,3600"/>
- <pbcast.STABLE desired_avg_gossip="50000" max_bytes="400000" stability_delay="1000"/>
- <pbcast.GMS join_timeout="5000" print_local_addr="true" shun="false" view_ack_collection_timeout="5000"
- view_bundling="true"/>
- <FRAG2 frag_size="60000"/>
- <pbcast.STREAMING_STATE_TRANSFER/>
- <pbcast.FLUSH timeout="0"/>
-
- </jgroupsConfig>
-
- <sync />
- <!-- Alternatively, to use async replication, comment out the element above and uncomment the element below. -->
- <!-- <async /> -->
- </clustering>
<loaders passivation="false" shared="false">
<!-- loader class="org.jboss.cache.loader.FileCacheLoader" async="false"
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jcr-config.xml 2009-11-23 09:53:45 UTC (rev 801)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/resources/conf/standalone/test-jcr-config.xml 2009-11-23 10:00:16 UTC (rev 802)
@@ -72,12 +72,14 @@
<property name="path" value="target/temp/lock" />
</properties>
</persister>
- </lock-manager -->
+ </lock-manager
+-->
</workspace>
<workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <container class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
<property name="source-name" value="jdbcjcr1" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
@@ -96,12 +98,7 @@
</value-storage>
</value-storages>
</container>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
- <properties>
- <property name="max-size" value="2k" />
- <property name="live-time" value="20m" />
- </properties>
- </cache>
+
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
<property name="index-dir" value="target/temp/index/db1/ws1" />
@@ -116,8 +113,9 @@
</workspace>
<workspace name="ws2">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <container class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
<property name="source-name" value="jdbcjcr2" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
@@ -136,12 +134,7 @@
</value-storage>
</value-storages>
</container>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
- <properties>
- <property name="max-size" value="2k" />
- <property name="live-time" value="20m" />
- </properties>
- </cache>
+
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
<property name="index-dir" value="target/temp/index/db1/ws2" />
@@ -158,8 +151,9 @@
<workspace name="ws3">
<!-- for system storage -->
<container
- class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
<property name="source-name" value="jdbcjcr3" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
@@ -204,13 +198,6 @@
<property name="root-nodetype" value="nt:unstructured" />
</properties>
</initializer>
- <cache enabled="true"
- class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
- <properties>
- <property name="max-size" value="2k" />
- <property name="live-time" value="20m" />
- </properties>
- </cache>
<query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
@@ -239,8 +226,9 @@
<workspaces>
<workspace name="ws">
<!-- for system storage -->
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <container class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
<property name="source-name" value="jdbcjcrtck" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
@@ -265,12 +253,6 @@
<property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
</properties>
</initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
- <properties>
- <property name="max-size" value="2k" />
- <property name="live-time" value="20m" />
- </properties>
- </cache>
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
<property name="index-dir" value="target/temp/index/db1tck/ws" />
@@ -294,8 +276,9 @@
</workspace>
<workspace name="ws1">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <container class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
<property name="source-name" value="jdbcjcr1tck" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
@@ -320,12 +303,6 @@
<property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
</properties>
</initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
- <properties>
- <property name="max-size" value="2k" />
- <property name="live-time" value="20m" />
- </properties>
- </cache>
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
<property name="index-dir" value="target/temp/index/db1tck/ws1" />
@@ -340,8 +317,9 @@
</workspace>
<workspace name="ws2">
- <container class="org.exoplatform.services.jcr.impl.storage.jdbc.JDBCWorkspaceDataContainer">
+ <container class="org.exoplatform.services.jcr.impl.storage.jbosscache.JBossCacheWorkspaceDataContainer">
<properties>
+ <property name="jbosscache-configuration" value="conf/standalone/test-jbosscache-config-exoloader.xml" />
<property name="source-name" value="jdbcjcr2tck" />
<property name="dialect" value="hsqldb" />
<property name="multi-db" value="true" />
@@ -366,12 +344,6 @@
<property name="root-permissions" value="any read;*:/platform/administrators read;*:/platform/administrators add_node;*:/platform/administrators set_property;*:/platform/administrators remove" />
</properties>
</initializer>
- <cache enabled="true" class="org.exoplatform.services.jcr.impl.dataflow.persistent.LinkedWorkspaceStorageCacheImpl">
- <properties>
- <property name="max-size" value="2k" />
- <property name="live-time" value="20m" />
- </properties>
- </cache>
<query-handler class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
<property name="index-dir" value="target/temp/index/db1tck/ws2" />
16 years, 8 months
exo-jcr SVN: r801 - jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2009-11-23 04:53:45 -0500 (Mon, 23 Nov 2009)
New Revision: 801
Modified:
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnectionTest.java
Log:
EXOJCR-246: JBossCacheStorageConnectionTest updated
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnectionTest.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnectionTest.java 2009-11-23 08:24:15 UTC (rev 800)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnectionTest.java 2009-11-23 09:53:45 UTC (rev 801)
@@ -38,9 +38,7 @@
import javax.jcr.InvalidItemStateException;
import javax.jcr.ItemExistsException;
-import javax.jcr.lock.LockException;
import javax.jcr.PropertyType;
-import javax.jcr.RepositoryException;
/**
* Created by The eXo Platform SAS.
@@ -881,17 +879,6 @@
props = conn.getReferencesData(node3id);
assertEquals("References expected", 0, props.size());
- // try remove referenced node
- try
- {
- conn.delete(node1);
- fail();
- }
- catch (RepositoryException e)
- {
- //ok
- }
-
// update reference property
TransientPropertyData updateProp =
16 years, 8 months
exo-jcr SVN: r800 - jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/lock.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2009-11-23 03:24:15 -0500 (Mon, 23 Nov 2009)
New Revision: 800
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/PersistentLockManager.java
Log:
EXOJCR-243: remove useless output.
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/PersistentLockManager.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/PersistentLockManager.java 2009-11-20 17:01:06 UTC (rev 799)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/PersistentLockManager.java 2009-11-23 08:24:15 UTC (rev 800)
@@ -105,8 +105,6 @@
{
for (LockData lockData : lockDatas)
{
- System.out.println(" found sucg lock: " + lockData.getNodeIdentifier());
- System.out.println(" it's expir time: " + lockData.getTimeToDeath());
if (lockData.getTimeToDeath() < 0)
{
// try to remove node, if unsuccessful then, at least, try to remove other expired locks
16 years, 8 months
exo-jcr SVN: r799 - in jcr/branches/1.12.0-JBC/component/core/src: test/java/org/exoplatform/services/jcr/impl/storage/jbosscache and 1 other directory.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2009-11-20 12:01:06 -0500 (Fri, 20 Nov 2009)
New Revision: 799
Modified:
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnectionTest.java
Log:
EXOJCR-248: fixes of SNS delete/update (not final: OrderBefore/Move tests fail)
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-11-20 16:39:32 UTC (rev 798)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnection.java 2009-11-20 17:01:06 UTC (rev 799)
@@ -151,7 +151,8 @@
Node<Serializable, Object> parent = nodesRoot.getChild(makeNodeFqn(data.getParentIdentifier()));
if (parent == null)
{
- throw new RepositoryException("Node parent doesn't exist " + data.getQPath().getAsString());
+ throw new InvalidItemStateException("Node's parent doesn't exist or removed by another Session "
+ + data.getQPath().getAsString());
}
final Fqn<String> name =
@@ -188,7 +189,8 @@
Node<Serializable, Object> parent = nodesRoot.getChild(makeNodeFqn(data.getParentIdentifier()));
if (parent == null)
{
- throw new RepositoryException("Property's parent doesn't exist " + data.getQPath().getAsString());
+ throw new InvalidItemStateException("Property's parent doesn't exist or removed by another Session "
+ + data.getQPath().getAsString());
}
if (data.getType() == PropertyType.REFERENCE)
@@ -272,26 +274,48 @@
// }
// }
- if (data.getParentIdentifier() != null)
+ // get parent
+ Node<Serializable, Object> parent = nodesRoot.getChild(makeNodeFqn(data.getParentIdentifier()));
+ if (parent == null)
{
- // check if parent is cached
- Node<Serializable, Object> parent = nodesRoot.getChild(makeNodeFqn(data.getParentIdentifier()));
- if (parent == null)
+ throw new InvalidItemStateException("Node's parent doesn't exist or removed by another Session "
+ + data.getQPath().getAsString());
+ }
+
+ // remove child on Parent
+ if (!parent.removeChild(makeChildNodeFqn(data.getQPath().getEntries()[data.getQPath().getEntries().length - 1])))
+ {
+ // TODO [PN] if not removed, try by Id stored in the cache (seems it's workaround, better solution should be)
+ Node<Serializable, Object> thisStoredNode = nodesRoot.getChild(makeNodeFqn(data.getIdentifier()));
+ if (thisStoredNode != null)
{
- throw new RepositoryException("Node parent doesn't exist " + data.getQPath().getAsString());
+ NodeData storedData = (NodeData)thisStoredNode.get(ITEM_DATA);
+ if (storedData != null)
+ {
+ // it's same-name siblings re-ordering, delete previous child
+ if (!parent.removeChild(makeChildNodeFqn(storedData.getQPath().getEntries()[storedData.getQPath()
+ .getEntries().length - 1])))
+ {
+ throw new InvalidItemStateException(
+ "Node's doesn't exist or deleted by another Session but listed in children nodes "
+ + data.getQPath().getAsString());
+ }
+ }
}
-
- // remove child on Parent
- if (!parent
- .removeChild(makeChildNodeFqn(data.getQPath().getEntries()[data.getQPath().getEntries().length - 1])))
+ else
{
throw new InvalidItemStateException("Node's doesn't exist or deleted by another Session "
+ data.getQPath().getAsString());
}
}
+ //treePrint(parent);
+
// remove from NODES
- boolean removed = nodesRoot.removeChild(makeNodeFqn(data.getIdentifier()));
+ if (!nodesRoot.removeChild(makeNodeFqn(data.getIdentifier())))
+ {
+ LOG.warn("Node was not deleted " + data.getQPath().getAsString());
+ }
}
/**
@@ -301,12 +325,13 @@
InvalidItemStateException, IllegalStateException
{
startBatch();
-
+ // propsRoot.getChild(makePropFqn(data.getIdentifier()))
// check if parent is cached
Node<Serializable, Object> parent = nodesRoot.getChild(makeNodeFqn(data.getParentIdentifier()));
if (parent == null)
{
- throw new RepositoryException("Property's parent doesn't exist " + data.getQPath().getAsString());
+ throw new InvalidItemStateException("Property's parent doesn't exist or removed by another Session "
+ + data.getQPath().getAsString());
}
if (data.getType() == PropertyType.REFERENCE)
@@ -355,7 +380,6 @@
}
}
}
-
}
// remove from parent's properties attr
@@ -367,7 +391,10 @@
}
// remove from PROPERTIES
- boolean removed = propsRoot.removeChild(makePropFqn(data.getIdentifier()));
+ if (!propsRoot.removeChild(makePropFqn(data.getIdentifier())))
+ {
+ LOG.warn("Property want not deleted " + data.getQPath().getAsString());
+ }
}
/**
@@ -771,26 +798,55 @@
throw new InvalidItemStateException("Node was updated previously or removed " + data.getQPath().getAsString());
}
- if (data.getParentIdentifier() != null)
+ // check if parent is cached
+ Node<Serializable, Object> parent = nodesRoot.getChild(makeNodeFqn(data.getParentIdentifier()));
+ if (parent == null)
{
- // check if parent is cached
- Node<Serializable, Object> parent = nodesRoot.getChild(makeNodeFqn(data.getParentIdentifier()));
- if (parent == null)
+ throw new RepositoryException("FATAL Node's parent not found " + data.getQPath().getAsString());
+ }
+
+ // update child on Parent
+ NodeData prevData = (NodeData)node.get(ITEM_DATA);
+ if (prevData != null)
+ {
+ // TODO (new logic) get previously cached NodeData and using its name remove child on the parent
+ Fqn<String> prevPath =
+ makeChildNodeFqn(prevData.getQPath().getEntries()[prevData.getQPath().getEntries().length - 1]);
+ Node<Serializable, Object> prevNameNode = parent.getChild(prevPath);
+ if (prevNameNode != null)
{
- throw new RepositoryException("FATAL Node's parent not found " + data.getQPath().getAsString());
- }
+ String prevNameNodeId = (String)prevNameNode.get(ITEM_ID);
+ if (prevNameNodeId != null)
+ {
+ if (prevNameNodeId.equals(data.getIdentifier()))
+ {
+ // it's same-name siblings re-ordering, delete previous child
+ if (!parent.removeChild(prevPath))
+ {
+ throw new RepositoryException("FATAL Node not extists as child but update asked "
+ + data.getQPath().getAsString());
+ }
+ } // else ok
+ }
+ else
+ {
+ throw new RepositoryException("FATAL Child Node extists but ITEM_ID is empty " + prevNameNode.getFqn()
+ + ". Update of " + data.getQPath().getAsString());
+ }
+ } // else ok
+ }
+ else
+ {
+ throw new RepositoryException("FATAL Node's current data not found " + data.getQPath().getAsString());
+ }
- // update child on Parent
- // TODO (wrong logic) get previously cached NodeData and using its name remove child on the parent
- //boolean removed =
- // parent.removeChild(makeChildNodeFqn(prevPath.getEntries()[prevPath.getEntries().length - 1]));
+ Node<Serializable, Object> childNode =
+ parent.addChild(makeChildNodeFqn(data.getQPath().getEntries()[data.getQPath().getEntries().length - 1]));
- Node<Serializable, Object> childNode =
- parent.addChild(makeChildNodeFqn(data.getQPath().getEntries()[data.getQPath().getEntries().length - 1]));
+ // set child id attr
+ childNode.put(ITEM_ID, data.getIdentifier());
- // set child id attr
- childNode.put(ITEM_ID, data.getIdentifier());
- }
+ //treePrint(parent);
// update in NODES
node.put(ITEM_DATA, data);
Modified: jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java 2009-11-20 16:39:32 UTC (rev 798)
+++ jcr/branches/1.12.0-JBC/component/core/src/main/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoader.java 2009-11-20 17:01:06 UTC (rev 799)
@@ -230,6 +230,10 @@
conn.deleteProperty(identifier);
}
}
+ else
+ {
+ // remove of child node, we're not interested in such info for persistence
+ }
}
/**
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnectionTest.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnectionTest.java 2009-11-20 16:39:32 UTC (rev 798)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheStorageConnectionTest.java 2009-11-20 17:01:06 UTC (rev 799)
@@ -272,9 +272,9 @@
treePrint(nodes);
// get /snsNode:1 from childs of root /
- checkChildNode(rootNode, node1id, node2path);
- checkChildNode(rootNode, node2id, node1path);
- checkChildNode(rootNode, node3id, node3path);
+ checkChildNode(rootNode, node1id, node2path, newNode1OrderNumb, newNode1version);
+ checkChildNode(rootNode, node2id, node1path, newNode2OrderNumb, newNode2version);
+ checkChildNode(rootNode, node3id, node3path, newNode3OrderNumb, newNode3version);
// Node<Serializable, Object> childNode1 =
// rootNode.getChild(Fqn
@@ -317,6 +317,78 @@
// assertEquals("Node order number wrong", nodeOrderNumb, ((NodeData)dataObject).getOrderNumber());
}
+ public void testDeleteUpdateNode() throws Exception
+ {
+ // add root (/)
+ conn.add(new TransientNodeData(Constants.ROOT_PATH, Constants.ROOT_UUID, 1, Constants.NT_UNSTRUCTURED,
+ new InternalQName[0], 0, null, new AccessControlList()));
+
+ // add node (/node)
+ String node1id = "1";
+ QPath node1path = QPath.parse("[]:1[]snsNode:1");
+ int node1OrderNumb = 0;
+ int node1version = 1;
+ conn.add(new TransientNodeData(node1path, node1id, node1version, Constants.NT_UNSTRUCTURED, new InternalQName[0],
+ node1OrderNumb, Constants.ROOT_UUID, new AccessControlList()));
+
+ String node2id = "2";
+ QPath node2path = QPath.parse("[]:1[]snsNode:2");
+ int node2OrderNumb = 1;
+ conn.add(new TransientNodeData(node2path, node2id, 1, Constants.NT_UNSTRUCTURED, new InternalQName[0],
+ node2OrderNumb, Constants.ROOT_UUID, new AccessControlList()));
+
+ String node3id = "3";
+ QPath node3path = QPath.parse("[]:1[]snsNode:3");
+ int node3OrderNumb = 2;
+ conn.add(new TransientNodeData(node3path, node3id, 1, Constants.NT_BASE, new InternalQName[0], node3OrderNumb,
+ Constants.ROOT_UUID, new AccessControlList()));
+
+ // get root node ([]:1)
+ Node<Serializable, Object> rootNode = nodes.getChild(Fqn.fromElements(Constants.ROOT_UUID));
+
+ // before
+ treePrint(nodes);
+
+ // do /snsNode:1 delete,
+ // update /snsNode:2 -> /snsNode:1, /snsNode:3 -> /snsNode:2 (order number, version and index)
+ conn.delete(new TransientNodeData(node1path, node1id, node1version, Constants.NT_UNSTRUCTURED,
+ new InternalQName[0], node1OrderNumb, Constants.ROOT_UUID, new AccessControlList()));
+
+ // update /snsNode:2 (order number, version and index) to /snsNode:1
+ QPath newNode2path = QPath.parse("[]:1[]snsNode:1");
+ int newNode2OrderNumb = 0;
+ int newNode2version = 2;
+ conn.update(new TransientNodeData(newNode2path, node2id, newNode2version, Constants.NT_UNSTRUCTURED,
+ new InternalQName[0], newNode2OrderNumb, Constants.ROOT_UUID, new AccessControlList()));
+
+ // update /snsNode:3 (order number, version and index) to /snsNode:2
+ QPath newNode3path = QPath.parse("[]:1[]snsNode:2");
+ int newNode3OrderNumb = 1;
+ int newNode3version = 2;
+ conn.update(new TransientNodeData(newNode3path, node3id, newNode3version, Constants.NT_BASE,
+ new InternalQName[0], newNode3OrderNumb, Constants.ROOT_UUID, new AccessControlList()));
+
+ // after
+ treePrint(nodes);
+
+ // check
+
+ // /snsNode:1 exists
+ assertEquals("Childs expected", 2, rootNode.getChildren().size());
+ assertNull("Child Node should be deleted", rootNode.getChild(Fqn.fromElements(node3path.getEntries()[node3path
+ .getEntries().length - 1].getAsString(true))));
+ assertNotNull("Child Node should exists", rootNode.getChild(Fqn.fromElements(node1path.getEntries()[node1path
+ .getEntries().length - 1].getAsString(true))));
+ assertNotNull("Child Node should exists", rootNode.getChild(Fqn.fromElements(node1path.getEntries()[node2path
+ .getEntries().length - 1].getAsString(true))));
+
+ // /snsNode:2 -> /snsNode:1
+ checkChildNode(rootNode, node2id, node1path, newNode2OrderNumb, newNode2version);
+
+ // /snsNode:3 -> /snsNode:2
+ checkChildNode(rootNode, node3id, node2path, newNode3OrderNumb, newNode3version);
+ }
+
public void testUpdateProperty() throws Exception
{
// add root (/)
@@ -646,13 +718,15 @@
new InternalQName[0], 0, Constants.ROOT_UUID, new AccessControlList()));
conn.commit();
-
+
fail("The node jcr:system should not be save");
- } catch (ItemExistsException e) {
+ }
+ catch (ItemExistsException e)
+ {
//ok
}
}
-
+
public void testAddPropertyFail() throws Exception
{
// add root (/)
@@ -667,77 +741,84 @@
propData1.setValue(new TransientValueData(propValue1));
conn.add(propData1);
-
-
- try {
+ try
+ {
// add property (/jcr:primaryType) twice
conn.add(propData1);
-
+
conn.commit();
-
+
fail("The property (/jcr:primaryType) should not be save");
- } catch (ItemExistsException e) {
+ }
+ catch (ItemExistsException e)
+ {
//ok
}
}
-
+
public void testDeleteNodeFail() throws Exception
{
// add root (/)
conn.add(new TransientNodeData(Constants.ROOT_PATH, Constants.ROOT_UUID, 1, Constants.NT_UNSTRUCTURED,
- new InternalQName[0], 0, null, new AccessControlList()));
+ new InternalQName[0], 0, null, new AccessControlList()));
// add node (/node)
String node1id = "1";
QPath node1path = QPath.parse("[]:1[]node:1");
conn.add(new TransientNodeData(node1path, node1id, 1, Constants.NT_UNSTRUCTURED, new InternalQName[0], 0,
- Constants.ROOT_UUID, new AccessControlList()));
+ Constants.ROOT_UUID, new AccessControlList()));
// add /jcr:system
conn.add(new TransientNodeData(Constants.JCR_SYSTEM_PATH, Constants.SYSTEM_UUID, 1, Constants.NT_UNSTRUCTURED,
- new InternalQName[0], 0, Constants.ROOT_UUID, new AccessControlList()));
+ new InternalQName[0], 0, Constants.ROOT_UUID, new AccessControlList()));
// delete /node
conn.delete(new TransientNodeData(node1path, node1id, 1, Constants.NT_UNSTRUCTURED, new InternalQName[0], 0,
- Constants.ROOT_UUID, new AccessControlList()));
-
- try {
+ Constants.ROOT_UUID, new AccessControlList()));
+
+ try
+ {
// delete node /node twice
conn.delete(new TransientNodeData(node1path, node1id, 1, Constants.NT_UNSTRUCTURED, new InternalQName[0], 0,
- Constants.ROOT_UUID, new AccessControlList()));
-
+ Constants.ROOT_UUID, new AccessControlList()));
+
conn.commit();
-
+
fail("The node (/node) should not be delete");
- } catch (InvalidItemStateException e) {
+ }
+ catch (InvalidItemStateException e)
+ {
//ok
}
}
-
+
public void testDeletePropertyFail() throws Exception
{
// add root (/)
conn.add(new TransientNodeData(Constants.ROOT_PATH, Constants.ROOT_UUID, 1, Constants.NT_UNSTRUCTURED,
- new InternalQName[0], 0, null, new AccessControlList()));
+ new InternalQName[0], 0, null, new AccessControlList()));
// add property (/jcr:primaryType)
String propId1 = "1";
conn.add(new TransientPropertyData(QPath.makeChildPath(Constants.ROOT_PATH, Constants.JCR_PRIMARYTYPE), propId1,
- 1, 1, Constants.ROOT_UUID, false));
+ 1, 1, Constants.ROOT_UUID, false));
// delete /jcr:primaryType
conn.delete(new TransientPropertyData(QPath.makeChildPath(Constants.ROOT_PATH, Constants.JCR_PRIMARYTYPE),
- propId1, 1, 1, Constants.ROOT_UUID, false));
+ propId1, 1, 1, Constants.ROOT_UUID, false));
- try {
+ try
+ {
// delete /jcr:primaryType twice
conn.delete(new TransientPropertyData(QPath.makeChildPath(Constants.ROOT_PATH, Constants.JCR_PRIMARYTYPE),
- propId1, 1, 1, Constants.ROOT_UUID, false));
-
+ propId1, 1, 1, Constants.ROOT_UUID, false));
+
conn.commit();
-
+
fail("The property (/jcr:primaryType) should not be delete");
- } catch (InvalidItemStateException e) {
+ }
+ catch (InvalidItemStateException e)
+ {
//ok
}
}
16 years, 8 months