Author: julien_viet
Date: 2009-12-17 08:55:28 -0500 (Thu, 17 Dec 2009)
New Revision: 1048
Added:
portal/trunk/component/common/src/main/java/conf/
portal/trunk/component/common/src/main/java/conf/configuration-jboss.properties
portal/trunk/component/common/src/main/java/conf/configuration.properties
portal/trunk/component/common/src/main/java/conf/configuration.xml
Modified:
portal/trunk/examples/extension/war/src/main/webapp/WEB-INF/conf/sample-ext/jcr/repository-configuration.xml
portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/conf/sample-portal/jcr/repository-configuration.xml
portal/trunk/packaging/pkg/pom.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/database/database-configuration.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.tmpl.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml
Log:
GTNPORTAL-400 : Store portal data in a relocatable and runtime dependent directory
Added: portal/trunk/component/common/src/main/java/conf/configuration-jboss.properties
===================================================================
--- portal/trunk/component/common/src/main/java/conf/configuration-jboss.properties
(rev 0)
+++
portal/trunk/component/common/src/main/java/conf/configuration-jboss.properties 2009-12-17
13:55:28 UTC (rev 1048)
@@ -0,0 +1,27 @@
+#
+# Copyright (C) 2009 eXo Platform SAS.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+#
+
+# Data
+gatein.data.dir=${jboss.server.data.dir}/gatein
+
+# DB
+gatein.db.data.dir=${gatein.data.dir}/db
+
+# JCR
+gatein.jcr.data.dir=${gatein.data.dir}/jcr
Added: portal/trunk/component/common/src/main/java/conf/configuration.properties
===================================================================
--- portal/trunk/component/common/src/main/java/conf/configuration.properties
(rev 0)
+++ portal/trunk/component/common/src/main/java/conf/configuration.properties 2009-12-17
13:55:28 UTC (rev 1048)
@@ -0,0 +1,27 @@
+#
+# Copyright (C) 2009 eXo Platform SAS.
+#
+# This is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as
+# published by the Free Software Foundation; either version 2.1 of
+# the License, or (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this software; if not, write to the Free
+# Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+# 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+#
+
+# Data
+gatein.data.dir=../temp
+
+# DB
+gatein.db.data.dir=${gatein.data.dir}/db
+
+# JCR
+gatein.jcr.data.dir=${gatein.data.dir}/jcr
Copied: portal/trunk/component/common/src/main/java/conf/configuration.xml (from rev 1031,
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/configuration.xml)
===================================================================
--- portal/trunk/component/common/src/main/java/conf/configuration.xml
(rev 0)
+++ portal/trunk/component/common/src/main/java/conf/configuration.xml 2009-12-17 13:55:28
UTC (rev 1048)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+
+-->
+
+<configuration
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd
http://www.exoplaform.org/xml/ns/kernel_1_1.xsd"
+
xmlns="http://www.exoplaform.org/xml/ns/kernel_1_1.xsd">
+
+ <component>
+ <key>org.exoplatform.container.PropertyConfigurator</key>
+ <type>org.exoplatform.container.PropertyConfigurator</type>
+ <init-params>
+ <value-param>
+ <name>properties.url</name>
+ <value>jar:/conf/configuration.properties</value>
+ </value-param>
+ <value-param profiles="jboss">
+ <name>properties.url</name>
+ <value>jar:/conf/configuration-jboss.properties</value>
+ </value-param>
+ </init-params>
+ </component>
+
+</configuration>
Modified:
portal/trunk/examples/extension/war/src/main/webapp/WEB-INF/conf/sample-ext/jcr/repository-configuration.xml
===================================================================
---
portal/trunk/examples/extension/war/src/main/webapp/WEB-INF/conf/sample-ext/jcr/repository-configuration.xml 2009-12-17
13:08:13 UTC (rev 1047)
+++
portal/trunk/examples/extension/war/src/main/webapp/WEB-INF/conf/sample-ext/jcr/repository-configuration.xml 2009-12-17
13:55:28 UTC (rev 1048)
@@ -34,12 +34,12 @@
<property name="multi-db" value="false" />
<property name="update-storage" value="true" />
<property name="max-buffer-size" value="204800" />
- <property name="swap-directory"
value="../temp/swap/sample-ws${container.name.suffix}" />
+ <property name="swap-directory"
value="${gatein.jcr.data.dir}/swap/sample-ws${container.name.suffix}" />
</properties>
<value-storages>
<value-storage id="sample-ws"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path"
value="../temp/values/sample-ws${container.name.suffix}" />
+ <property name="path"
value="${gatein.jcr.data.dir}/values/sample-ws${container.name.suffix}" />
</properties>
<filters>
<filter property-type="Binary" />
@@ -62,14 +62,14 @@
</cache>
<query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir"
value="../temp/jcrlucenedb/sample-ws${container.name.suffix}" />
+ <property name="index-dir"
value="${gatein.jcr.data.dir}/jcrlucenedb/sample-ws${container.name.suffix}"
/>
</properties>
</query-handler>
<lock-manager>
<time-out>15m</time-out><!-- 15min -->
<persister
class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
<properties>
- <property name="path"
value="../temp/lock/sample-ws${container.name.suffix}" />
+ <property name="path"
value="${gatein.jcr.data.dir}/lock/sample-ws${container.name.suffix}" />
</properties>
</persister>
</lock-manager>
Modified:
portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/conf/sample-portal/jcr/repository-configuration.xml
===================================================================
---
portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/conf/sample-portal/jcr/repository-configuration.xml 2009-12-17
13:08:13 UTC (rev 1047)
+++
portal/trunk/examples/portal/war/src/main/webapp/WEB-INF/conf/sample-portal/jcr/repository-configuration.xml 2009-12-17
13:55:28 UTC (rev 1048)
@@ -34,12 +34,12 @@
<property name="multi-db" value="false" />
<property name="update-storage" value="true" />
<property name="max-buffer-size" value="204800" />
- <property name="swap-directory"
value="../temp/swap/sample-ws${container.name.suffix}" />
+ <property name="swap-directory"
value="${gatein.jcr.data.dir}/swap/sample-ws${container.name.suffix}" />
</properties>
<value-storages>
<value-storage id="sample-ws"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path"
value="../temp/values/sample-ws${container.name.suffix}" />
+ <property name="path"
value="${gatein.jcr.data.dir}/values/sample-ws${container.name.suffix}" />
</properties>
<filters>
<filter property-type="Binary" />
@@ -62,14 +62,14 @@
</cache>
<query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir"
value="../temp/jcrlucenedb/sample-ws${container.name.suffix}" />
+ <property name="index-dir"
value="${gatein.jcr.data.dir}/jcrlucenedb/sample-ws${container.name.suffix}"
/>
</properties>
</query-handler>
<lock-manager>
<time-out>15m</time-out><!-- 15min -->
<persister
class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
<properties>
- <property name="path"
value="../temp/lock/sample-ws${container.name.suffix}" />
+ <property name="path"
value="${gatein.jcr.data.dir}/lock/sample-ws${container.name.suffix}" />
</properties>
</persister>
</lock-manager>
Modified: portal/trunk/packaging/pkg/pom.xml
===================================================================
--- portal/trunk/packaging/pkg/pom.xml 2009-12-17 13:08:13 UTC (rev 1047)
+++ portal/trunk/packaging/pkg/pom.xml 2009-12-17 13:55:28 UTC (rev 1048)
@@ -37,7 +37,7 @@
<groupId>org.gatein.tools</groupId>
<artifactId>packager</artifactId>
<type>zip</type>
- <version>1.0.0-Beta02</version>
+ <version>1.0.0-Beta04</version>
</dependency>
<dependency>
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/database/database-configuration.xml
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/database/database-configuration.xml 2009-12-17
13:08:13 UTC (rev 1047)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/database/database-configuration.xml 2009-12-17
13:55:28 UTC (rev 1048)
@@ -39,11 +39,8 @@
<!--CHANGEME HashtableCacheProvider shold not be used in production env-->
<property name="hibernate.cache.provider_class"
value="org.hibernate.cache.HashtableCacheProvider"/>
<property name="hibernate.cglib.use_reflection_optimizer"
value="true"/>
- <property name="hibernate.connection.url"
value="jdbc:hsqldb:file:../temp/data/exodb${container.name.suffix}"/>
- <property name="hibernate.connection.driver_class"
value="org.hsqldb.jdbcDriver"/>
+ <property name="hibernate.connection.datasource"
value="jdbcexo${container.name.suffix}"/>
<property name="hibernate.connection.autocommit"
value="true"/>
- <property name="hibernate.connection.username"
value="sa"/>
- <property name="hibernate.connection.password"
value=""/>
<property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
<property name="hibernate.c3p0.min_size" value="5"/>
<property name="hibernate.c3p0.max_size" value="20"/>
@@ -76,7 +73,7 @@
<name>ref-addresses</name>
<description>ref-addresses</description>
<property name="driverClassName"
value="org.hsqldb.jdbcDriver"/>
- <property name="url"
value="jdbc:hsqldb:file:../temp/data/exodb${container.name.suffix}"/>
+ <property name="url"
value="jdbc:hsqldb:file:${gatein.db.data.dir}/data/exodb${container.name.suffix}"/>
<property name="username" value="sa"/>
<property name="password" value=""/>
</properties-param>
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.tmpl.xml
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.tmpl.xml 2009-12-17
13:08:13 UTC (rev 1047)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.tmpl.xml 2009-12-17
13:55:28 UTC (rev 1048)
@@ -36,12 +36,12 @@
<property name="multi-db" value="false"/>
<property name="update-storage" value="true"/>
<property name="max-buffer-size"
value="204800"/>
- <property name="swap-directory"
value="../temp/swap/system${container.name.suffix}"/>
+ <property name="swap-directory"
value="${gatein.jcr.data.dir}/swap/system${container.name.suffix}"/>
</properties>
<value-storages>
<value-storage id="system"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path"
value="../temp/values/system${container.name.suffix}"/>
+ <property name="path"
value="${gatein.jcr.data.dir}/values/system${container.name.suffix}"/>
</properties>
<filters>
<filter property-type="Binary"/>
@@ -63,14 +63,14 @@
</cache>
<query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir"
value="../temp/jcrlucenedb/system${container.name.suffix}"/>
+ <property name="index-dir"
value="${gatein.jcr.data.dir}/jcrlucenedb/system${container.name.suffix}"/>
</properties>
</query-handler>
<lock-manager>
<time-out>15m</time-out><!-- 15min -->
<persister
class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
<properties>
- <property name="path"
value="../temp/lock/system${container.name.suffix}"/>
+ <property name="path"
value="${gatein.jcr.data.dir}/lock/system${container.name.suffix}"/>
</properties>
</persister>
</lock-manager>
@@ -85,12 +85,12 @@
<property name="multi-db" value="false"/>
<property name="update-storage" value="true"/>
<property name="max-buffer-size"
value="204800"/>
- <property name="swap-directory"
value="../temp/swap/portal-system${container.name.suffix}"/>
+ <property name="swap-directory"
value="${gatein.jcr.data.dir}/swap/portal-system${container.name.suffix}"/>
</properties>
<value-storages>
<value-storage id="portal-system"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path"
value="../temp/values/portal-system${container.name.suffix}"/>
+ <property name="path"
value="${gatein.jcr.data.dir}/values/portal-system${container.name.suffix}"/>
</properties>
<filters>
<filter property-type="Binary"/>
@@ -112,14 +112,14 @@
</cache>
<query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir"
value="../temp/jcrlucenedb/portal-system${container.name.suffix}"/>
+ <property name="index-dir"
value="${gatein.jcr.data.dir}/jcrlucenedb/portal-system${container.name.suffix}"/>
</properties>
</query-handler>
<lock-manager>
<time-out>15m</time-out><!-- 15min -->
<persister
class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
<properties>
- <property name="path"
value="../temp/lock/portal-system${container.name.suffix}"/>
+ <property name="path"
value="${gatein.jcr.data.dir}/lock/portal-system${container.name.suffix}"/>
</properties>
</persister>
</lock-manager>
@@ -134,12 +134,12 @@
<property name="multi-db" value="false"/>
<property name="update-storage" value="true"/>
<property name="max-buffer-size"
value="204800"/>
- <property name="swap-directory"
value="../temp/swap/portal-work${container.name.suffix}"/>
+ <property name="swap-directory"
value="${gatein.jcr.data.dir}/swap/portal-work${container.name.suffix}"/>
</properties>
<value-storages>
<value-storage id="portal-work"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path"
value="../temp/values/portal-work${container.name.suffix}"/>
+ <property name="path"
value="${gatein.jcr.data.dir}/values/portal-work${container.name.suffix}"/>
</properties>
<filters>
<filter property-type="Binary"/>
@@ -161,14 +161,14 @@
</cache>
<query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir"
value="../temp/jcrlucenedb/portal-work${container.name.suffix}"/>
+ <property name="index-dir"
value="${gatein.jcr.data.dir}/jcrlucenedb/portal-work${container.name.suffix}"/>
</properties>
</query-handler>
<lock-manager>
<time-out>15m</time-out><!-- 15min -->
<persister
class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
<properties>
- <property name="path"
value="../temp/lock/portal-work${container.name.suffix}"/>
+ <property name="path"
value="${gatein.jcr.data.dir}/lock/portal-work${container.name.suffix}"/>
</properties>
</persister>
</lock-manager>
Modified:
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml
===================================================================
---
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml 2009-12-17
13:08:13 UTC (rev 1047)
+++
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/jcr/repository-configuration.xml 2009-12-17
13:55:28 UTC (rev 1048)
@@ -36,12 +36,12 @@
<property name="multi-db" value="false"/>
<property name="update-storage" value="true"/>
<property name="max-buffer-size"
value="204800"/>
- <property name="swap-directory"
value="../temp/swap/system${container.name.suffix}"/>
+ <property name="swap-directory"
value="${gatein.jcr.data.dir}/system${container.name.suffix}"/>
</properties>
<value-storages>
<value-storage id="system"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path"
value="../temp/values/system${container.name.suffix}"/>
+ <property name="path"
value="${gatein.jcr.data.dir}/values/system${container.name.suffix}"/>
</properties>
<filters>
<filter property-type="Binary"/>
@@ -63,14 +63,14 @@
</cache>
<query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir"
value="../temp/jcrlucenedb/system${container.name.suffix}"/>
+ <property name="index-dir"
value="${gatein.jcr.data.dir}/jcrlucenedb/system${container.name.suffix}"/>
</properties>
</query-handler>
<lock-manager>
<time-out>15m</time-out><!-- 15min -->
<persister
class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
<properties>
- <property name="path"
value="../temp/lock/system${container.name.suffix}"/>
+ <property name="path"
value="${gatein.jcr.data.dir}/lock/system${container.name.suffix}"/>
</properties>
</persister>
</lock-manager>
@@ -85,12 +85,12 @@
<property name="multi-db" value="false"/>
<property name="update-storage" value="true"/>
<property name="max-buffer-size"
value="204800"/>
- <property name="swap-directory"
value="../temp/swap/portal-system${container.name.suffix}"/>
+ <property name="swap-directory"
value="${gatein.jcr.data.dir}/swap/portal-system${container.name.suffix}"/>
</properties>
<value-storages>
<value-storage id="portal-system"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path"
value="../temp/values/portal-system${container.name.suffix}"/>
+ <property name="path"
value="${gatein.jcr.data.dir}/values/portal-system${container.name.suffix}"/>
</properties>
<filters>
<filter property-type="Binary"/>
@@ -112,14 +112,14 @@
</cache>
<query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir"
value="../temp/jcrlucenedb/portal-system${container.name.suffix}"/>
+ <property name="index-dir"
value="${gatein.jcr.data.dir}/jcrlucenedb/portal-system${container.name.suffix}"/>
</properties>
</query-handler>
<lock-manager>
<time-out>15m</time-out><!-- 15min -->
<persister
class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
<properties>
- <property name="path"
value="../temp/lock/portal-system${container.name.suffix}"/>
+ <property name="path"
value="${gatein.jcr.data.dir}/lock/portal-system${container.name.suffix}"/>
</properties>
</persister>
</lock-manager>
@@ -134,12 +134,12 @@
<property name="multi-db" value="false"/>
<property name="update-storage" value="true"/>
<property name="max-buffer-size"
value="204800"/>
- <property name="swap-directory"
value="../temp/swap/portal-work${container.name.suffix}"/>
+ <property name="swap-directory"
value="${gatein.jcr.data.dir}/swap/portal-work${container.name.suffix}"/>
</properties>
<value-storages>
<value-storage id="portal-work"
class="org.exoplatform.services.jcr.impl.storage.value.fs.TreeFileValueStorage">
<properties>
- <property name="path"
value="../temp/values/portal-work${container.name.suffix}"/>
+ <property name="path"
value="${gatein.jcr.data.dir}/values/portal-work${container.name.suffix}"/>
</properties>
<filters>
<filter property-type="Binary"/>
@@ -161,14 +161,14 @@
</cache>
<query-handler
class="org.exoplatform.services.jcr.impl.core.query.lucene.SearchIndex">
<properties>
- <property name="index-dir"
value="../temp/jcrlucenedb/portal-work${container.name.suffix}"/>
+ <property name="index-dir"
value="${gatein.jcr.data.dir}/jcrlucenedb/portal-work${container.name.suffix}"/>
</properties>
</query-handler>
<lock-manager>
<time-out>15m</time-out><!-- 15min -->
<persister
class="org.exoplatform.services.jcr.impl.core.lock.FileSystemLockPersister">
<properties>
- <property name="path"
value="../temp/lock/portal-work${container.name.suffix}"/>
+ <property name="path"
value="${gatein.jcr.data.dir}/lock/portal-work${container.name.suffix}"/>
</properties>
</persister>
</lock-manager>