From do-not-reply at jboss.org Wed Nov 30 05:16:18 2011 Content-Type: multipart/mixed; boundary="===============6779256956563974062==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: exo-jcr-commits at lists.jboss.org Subject: [exo-jcr-commits] exo-jcr SVN: r5245 - in jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules: jcr/configuration and 1 other directory. Date: Wed, 30 Nov 2011 05:16:17 -0500 Message-ID: <201111301016.pAUAGH6p016813@svn01.web.mwc.hst.phx2.redhat.com> --===============6779256956563974062== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: dkuleshov Date: 2011-11-30 05:16:17 -0500 (Wed, 30 Nov 2011) New Revision: 5245 Added: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/= modules/jcr/configuration/multi-db-schema-support.xml Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/= modules/jcr.xml Log: EXOJCR-1648: added doc Added: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en= -US/modules/jcr/configuration/multi-db-schema-support.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US= /modules/jcr/configuration/multi-db-schema-support.xml = (rev 0) +++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US= /modules/jcr/configuration/multi-db-schema-support.xml 2011-11-30 10:16:17 = UTC (rev 5245) @@ -0,0 +1,92 @@ + + + + + + JBossCache configuration for Multi DB Schema support + +
+ Concepts + + This feature allows us to use the same database instance for sev= eral + JCR instances just by using different schemas/users. It is possible + because database queries are to be launched in the scope of current + schema. +
+ +
+ LockManager configuration + + To enable the feature you need to mention + org.exoplatform.services.jcr.impl.core.lock.jbosscache.JDBCCacheLoader + instead of org.jboss.cache.loader.JDBCCacheLoader in JBossCache + configuration file. + + Here is an example of this very part of the configuration: + + <jbosscache xmlns:xsi=3D"http://ww= w.w3.org/2001/XMLSchema-instance" xmlns=3D"urn:jboss:jbosscache-core:config= :3.1"> + + <locking useLockStriping=3D"false" concurrencyLevel=3D"500" lockPare= ntForChildInsertRemove=3D"false" + lockAcquisitionTimeout=3D"20000" /> + + <clustering mode=3D"replication" clusterName=3D"${jbosscache-cluster= -name}"> + <stateRetrieval timeout=3D"20000" fetchInMemoryState=3D"false" /&= gt; + <sync /> + </clustering> + + <loaders passivation=3D"false" shared=3D"true"> + <!-- All the data of the JCR locks needs to be loaded at startup = --> + <preload> + <node fqn=3D"/" /> + </preload> = + <!-- + For another cache-loader class you should use another template with + cache-loader specific parameters + --> + <loader class=3D"org.exoplatform.services= .jcr.impl.core.lock.jbosscache.JDBCCacheLoader" async=3D"false" = fetchPersistentState=3D"false" + ignoreModifications=3D"false" purgeOnStartup=3D"false"> + <properties> + cache.jdbc.table.name=3D${jbosscache-cl-cache.jdbc.table.name} + cache.jdbc.table.create=3D${jbosscache-cl-cache.jdbc.table.cre= ate} + cache.jdbc.table.drop=3D${jbosscache-cl-cache.jdbc.table.drop} + cache.jdbc.table.primarykey=3D${jbosscache-cl-cache.jdbc.table= .primarykey} + cache.jdbc.fqn.column=3D${jbosscache-cl-cache.jdbc.fqn.column} + cache.jdbc.fqn.type=3D${jbosscache-cl-cache.jdbc.fqn.type} + cache.jdbc.node.column=3D${jbosscache-cl-cache.jdbc.node.colum= n} + cache.jdbc.node.type=3D${jbosscache-cl-cache.jdbc.node.type} + cache.jdbc.parent.column=3D${jbosscache-cl-cache.jdbc.parent.c= olumn} + cache.jdbc.datasource=3D${jbosscache-cl-cache.jdbc.datasource} + </properties> + </loader> + </loaders> +</jbosscache> + + You can also obtain file exmaple from s= vn. +
+ +
+ HibernateService configuration + + If you use HibernateService for JDBC connections management you = also + may specify default schema by setting "hibernate.default_schema" prope= rty + in the configuration of HibernateService. + + Here is an example: + + <component> + <key>org.exoplatform.services.database.HibernateService</key&= gt; + <jmx-name>database:type=3DHibernateService</jmx-name> + <type>org.exoplatform.services.database.impl.HibernateServiceImp= l</type> + <init-params> + <properties-param> + <name>hibernate.properties</name> + <description>Default Hibernate Service</description> + ........... + <property name=3D"hibernate.default_sch= ema" value=3D"${gatein.idm.datasource.schema:}"/> + </properties-param> + </init-params> +</component> +
+
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook= /en-US/modules/jcr.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US= /modules/jcr.xml 2011-11-30 10:09:02 UTC (rev 5244) +++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US= /modules/jcr.xml 2011-11-30 10:16:17 UTC (rev 5245) @@ -50,7 +50,10 @@ = - + = + + = = --===============6779256956563974062==--