[exo-jcr-commits] exo-jcr SVN: r4618 - in jcr/trunk: exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache and 4 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Tue Jul 12 10:49:46 EDT 2011
Author: tolusha
Date: 2011-07-12 10:49:45 -0400 (Tue, 12 Jul 2011)
New Revision: 4618
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration-jbc.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-jbc.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc-jbc.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/jndi-naming.xml
Log:
EXOJCR-1416: Get rid of any call to InitialContextInitializer.recall()
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java 2011-07-12 14:45:41 UTC (rev 4617)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java 2011-07-12 14:49:45 UTC (rev 4618)
@@ -117,9 +117,6 @@
configureJDBCCacheLoader(config.getLockManager());
cache = factory.createCache("L" + config.getUniqueName().replace("_", ""), config.getLockManager());
-
- // Context recall is a workaround of JDBCCacheLoader starting.
- context.recall();
}
else
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2011-07-12 14:45:41 UTC (rev 4617)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2011-07-12 14:49:45 UTC (rev 4618)
@@ -212,9 +212,6 @@
}
createStructuredNode(lockRoot);
-
- // Context recall is a workaround of JDBCCacheLoader starting.
- context.recall();
}
else
{
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2011-07-12 14:45:41 UTC (rev 4617)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/JDBCWorkspaceDataContainer.java 2011-07-12 14:49:45 UTC (rev 4618)
@@ -63,6 +63,7 @@
import org.exoplatform.services.jcr.storage.WorkspaceStorageConnection;
import org.exoplatform.services.jcr.storage.value.ValueStoragePluginProvider;
import org.exoplatform.services.jdbc.DataSourceProvider;
+import org.exoplatform.services.jdbc.impl.ManagedDataSource;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import org.exoplatform.services.naming.InitialContextInitializer;
@@ -255,11 +256,6 @@
FileCleanerHolder fileCleanerHolder, DataSourceProvider dsProvider) throws RepositoryConfigurationException, NamingException,
RepositoryException, IOException
{
-
- // This recall is workaround for tenants creation. There is a trouble in visibility datasource
- // binded in one tomcat context from another tomcat context.
- contextInit.recall();
-
checkIntegrity(wsConfig, repConfig);
this.wsConfig = wsConfig;
this.containerName = wsConfig.getName();
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration-jbc.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration-jbc.xml 2011-07-12 14:45:41 UTC (rev 4617)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration-jbc.xml 2011-07-12 14:49:45 UTC (rev 4618)
@@ -379,6 +379,7 @@
<property name="url" value="jdbc:hsqldb:file:target/temp/data/jcrtest"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
+ <property name="maxActive" value="100" />
</properties-param>
</init-params>
</component-plugin>
@@ -622,6 +623,7 @@
<property name="url" value="jdbc:hsqldb:file:target/temp/data/testdbcleaner"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
+ <property name="maxActive" value="20" />
</properties-param>
</init-params>
</component-plugin>
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration.xml 2011-07-12 14:45:41 UTC (rev 4617)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-configuration.xml 2011-07-12 14:49:45 UTC (rev 4618)
@@ -379,6 +379,7 @@
<property name="url" value="jdbc:hsqldb:file:target/temp/data/jcrtest"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
+ <property name="maxActive" value="100" />
</properties-param>
</init-params>
</component-plugin>
@@ -622,6 +623,7 @@
<property name="url" value="jdbc:hsqldb:file:target/temp/data/testdbcleaner"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
+ <property name="maxActive" value="20" />
</properties-param>
</init-params>
</component-plugin>
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-jbc.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-jbc.xml 2011-07-12 14:45:41 UTC (rev 4617)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-jbc.xml 2011-07-12 14:49:45 UTC (rev 4618)
@@ -360,7 +360,8 @@
<property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
<property name="url" value="jdbc:hsqldb:file:target/temp/data/jcrtest"/>
<property name="username" value="sa"/>
- <property name="password" value=""/>
+ <property name="password" value=""/>
+ <property name="maxActive" value="100" />
</properties-param>
</init-params>
</component-plugin>
@@ -604,6 +605,7 @@
<property name="url" value="jdbc:hsqldb:file:target/temp/data/testdbcleaner"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
+ <property name="maxActive" value="20" />
</properties-param>
</init-params>
</component-plugin>
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc-jbc.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc-jbc.xml 2011-07-12 14:45:41 UTC (rev 4617)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc-jbc.xml 2011-07-12 14:49:45 UTC (rev 4618)
@@ -280,6 +280,7 @@
<property name="url" value="jdbc:hsqldb:file:target/temp/data/jcrtest"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
+ <property name="maxActive" value="100" />
</properties-param>
</init-params>
</component-plugin>
@@ -442,6 +443,7 @@
<property name="url" value="jdbc:hsqldb:file:target/temp/data/testdbcleaner"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
+ <property name="maxActive" value="20" />
</properties-param>
</init-params>
</component-plugin>
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml 2011-07-12 14:45:41 UTC (rev 4617)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml 2011-07-12 14:49:45 UTC (rev 4618)
@@ -280,6 +280,7 @@
<property name="url" value="jdbc:hsqldb:file:target/temp/data/jcrtest"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
+ <property name="maxActive" value="100" />
</properties-param>
</init-params>
</component-plugin>
@@ -442,6 +443,7 @@
<property name="url" value="jdbc:hsqldb:file:target/temp/data/testdbcleaner"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
+ <property name="maxActive" value="20" />
</properties-param>
</init-params>
</component-plugin>
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml 2011-07-12 14:45:41 UTC (rev 4617)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml 2011-07-12 14:49:45 UTC (rev 4618)
@@ -361,6 +361,7 @@
<property name="url" value="jdbc:hsqldb:file:target/temp/data/jcrtest"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
+ <property name="maxActive" value="100" />
</properties-param>
</init-params>
</component-plugin>
@@ -604,6 +605,7 @@
<property name="url" value="jdbc:hsqldb:file:target/temp/data/testdbcleaner"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
+ <property name="maxActive" value="20" />
</properties-param>
</init-params>
</component-plugin>
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/jndi-naming.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/jndi-naming.xml 2011-07-12 14:45:41 UTC (rev 4617)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/kernel/jndi-naming.xml 2011-07-12 14:49:45 UTC (rev 4618)
@@ -121,6 +121,14 @@
<programlisting language="xml"> <component>
<type>org.exoplatform.services.naming.InitialContextInitializer</type>
<init-params>
+ <value-param>.
+ <name>bindings-store-path</name>.
+ <value>bind-references.xml</value>.
+ </value-param>.
+ <value-param>
+ <name>overload-context-factory</name>
+ <value>true</value>
+ </value-param>
<properties-param>
<name>default-properties</name>
<description>Default initial context properties</description>
@@ -131,10 +139,6 @@
<description>Mandatory initial context properties</description>
<property name="java.naming.provider.url" value="rmi://localhost:9999"/>
</properties-param>
- <value-param>.
- <name>bindings-store-path</name>.
- <value>bind-references.xml</value>.
- </value-param>.
</init-params>
</component></programlisting>
@@ -143,6 +147,13 @@
<para><emphasis role="bold">binding-store-path</emphasis> is file path
which stores binded datasources in runtime</para>
+ <para><emphasis role="bold">overload-context-factory</emphasis> allows to
+ overload the default initial context factory by a context factory that is
+ ExoContainer aware and that is able to delegate to the original initial
+ context factory if it detects that it is not in the eXo scope. By default
+ the feature is disabled since it is only required on AS that don't share
+ the objects by default like tomcat but unlike JBoss AS</para>
+
<para>The <envar>BindReferencePlugin</envar> component plugin
configuration example (for JDBC datasource):</para>
More information about the exo-jcr-commits
mailing list