exo-jcr SVN: r3528 - jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-11-24 03:14:43 -0500 (Wed, 24 Nov 2010)
New Revision: 3528
Modified:
jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone/test-configuration.xml
Log:
EXOJCR-929: fix config
Modified: jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone/test-configuration.xml 2010-11-24 07:15:34 UTC (rev 3527)
+++ jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone/test-configuration.xml 2010-11-24 08:14:43 UTC (rev 3528)
@@ -390,7 +390,7 @@
<properties-param>
<name>db-creation</name>
<description>database creation properties</description>
- <property name="scriptPath" value="target/test-classes/test.sql" />
+ <property name="scriptPath" value="src/test/resources/test.sql" />
<property name="username" value="sa" />
<property name="password" value="" />
</properties-param>
13 years, 6 months
exo-jcr SVN: r3527 - jcr/trunk/exo.jcr.framework.ftpclient/src/test/resources.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-11-24 02:15:34 -0500 (Wed, 24 Nov 2010)
New Revision: 3527
Added:
jcr/trunk/exo.jcr.framework.ftpclient/src/test/resources/test.policy
Log:
EXOJCR-986: add missed file
Added: jcr/trunk/exo.jcr.framework.ftpclient/src/test/resources/test.policy
===================================================================
--- jcr/trunk/exo.jcr.framework.ftpclient/src/test/resources/test.policy (rev 0)
+++ jcr/trunk/exo.jcr.framework.ftpclient/src/test/resources/test.policy 2010-11-24 07:15:34 UTC (rev 3527)
@@ -0,0 +1,13 @@
+grant codeBase "@MAVEN_REPO@-"{
+ permission java.security.AllPermission;
+};
+
+grant codeBase "@MAIN_CLASSES@-"{
+ permission java.security.AllPermission;
+};
+
+grant codeBase "@TEST_CLASSES@-"{
+};
+
+
+
13 years, 6 months
exo-jcr SVN: r3526 - in jcr/trunk/exo.jcr.framework.command/src/main/resources/conf: standalone and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-11-24 02:11:58 -0500 (Wed, 24 Nov 2010)
New Revision: 3526
Added:
jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/portal/configuration.xml
jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/standalone/test-configuration.xml
jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/standalone/test-multi-configuration.xml
Log:
EXOJCR-1071: Move JCR framework commands list configuration to it right place
Added: jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/portal/configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/portal/configuration.xml (rev 0)
+++ jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/portal/configuration.xml 2010-11-24 07:11:58 UTC (rev 3526)
@@ -0,0 +1,40 @@
+<?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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.command.impl.CommandService</target-component>
+ <component-plugin>
+ <name>config.catalog</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
+ <init-params>
+ <value-param>
+ <name>config-file</name>
+ <value>jar:/conf/custom-commands.xml</value>
+ </value-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
Added: jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/standalone/test-configuration.xml (rev 0)
+++ jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/standalone/test-configuration.xml 2010-11-24 07:11:58 UTC (rev 3526)
@@ -0,0 +1,37 @@
+<?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>
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.command.impl.CommandService</target-component>
+ <component-plugin>
+ <name>config.catalog</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
+ <init-params>
+ <value-param>
+ <name>config-file</name>
+ <value>conf/test-commands.xml</value>
+ </value-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+</configuration>
Added: jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/standalone/test-multi-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/standalone/test-multi-configuration.xml (rev 0)
+++ jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/standalone/test-multi-configuration.xml 2010-11-24 07:11:58 UTC (rev 3526)
@@ -0,0 +1,61 @@
+<?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>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.command.impl.CommandService</target-component>
+ <component-plugin>
+ <name>config.catalog</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
+ <init-params>
+ <value-param>
+ <name>config-file</name>
+ <value>conf/test-commands.xml</value>
+ </value-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>config.catalog</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
+ <init-params>
+ <value-param>
+ <name>config-file</name>
+ <value>conf/test-commands2.xml</value>
+ </value-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>config.catalog</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
+ <init-params>
+ <value-param>
+ <name>config-file</name>
+ <value>conf/test-commands3.xml</value>
+ </value-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
13 years, 6 months
exo-jcr SVN: r3525 - jcr/trunk/exo.jcr.framework.command/src/main/resources/conf.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-11-23 10:31:36 -0500 (Tue, 23 Nov 2010)
New Revision: 3525
Added:
jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/custom-commands.xml
jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/portal/
jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/standalone/
jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/test-commands.xml
jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/test-commands2.xml
jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/test-commands3.xml
Log:
EXOJCR-1071: Move JCR framework commands list configuration to it right place
Added: jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/custom-commands.xml
===================================================================
--- jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/custom-commands.xml (rev 0)
+++ jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/custom-commands.xml 2010-11-23 15:31:36 UTC (rev 3525)
@@ -0,0 +1,42 @@
+<!--
+
+ 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.
+
+-->
+<catalog>
+ <command name="addNode" className="org.exoplatform.frameworks.jcr.command.core.AddNodeCommand" />
+ <command name="save" className="org.exoplatform.frameworks.jcr.command.core.SaveCommand" />
+ <command name="filterNodesByTypes" className="org.exoplatform.frameworks.jcr.command.ext.FilterNodesByTypesCommand" />
+ <command name="addResourceFile" className="org.exoplatform.frameworks.jcr.command.ext.AddResourceFileCommand" />
+ <command name="displayResource" className="org.exoplatform.frameworks.jcr.command.web.DisplayResourceCommand" />
+ <command name="getNode" className="org.exoplatform.frameworks.jcr.command.core.GetNodeCommand" />
+
+
+ <!-- chain name="displayResource">
+ <command id="1" className="org.exoplatform.frameworks.jcr.command.core.GetNodeCommand" />
+ <command id="2" className="org.exoplatform.frameworks.jcr.command.web.DisplayResourceCommand" />
+ </chain -->
+
+ <!-- FCKEditor -->
+ <command name="GetFolders" className="org.exoplatform.frameworks.jcr.command.web.fckeditor.GetFoldersOrFilesCommand" />
+ <command name="GetFiles" className="org.exoplatform.frameworks.jcr.command.web.fckeditor.GetFoldersOrFilesCommand" />
+ <command name="GetFoldersAndFiles" className="org.exoplatform.frameworks.jcr.command.web.fckeditor.GetFoldersOrFilesCommand" />
+ <command name="FileUpload" className="org.exoplatform.frameworks.jcr.command.web.fckeditor.UploadFileCommand" />
+ <command name="CreateFolder" className="org.exoplatform.frameworks.jcr.command.web.fckeditor.CreateFolderCommand" />
+
+</catalog>
Added: jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/test-commands.xml
===================================================================
--- jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/test-commands.xml (rev 0)
+++ jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/test-commands.xml 2010-11-23 15:31:36 UTC (rev 3525)
@@ -0,0 +1,32 @@
+<!--
+
+ 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.
+
+-->
+<catalog>
+
+ <!-- Single command "chains" from CatalogBaseTestCase -->
+ <command name="Command1" className="org.exoplatform.services.command.TestCommand1" />
+
+ <!-- Chains with nested commands -->
+ <chain name="Execute2">
+ <command id="1" className="org.exoplatform.services.command.TestCommand1" />
+ <command id="2" className="org.exoplatform.services.command.TestCommand1" />
+ </chain>
+
+</catalog>
Added: jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/test-commands2.xml
===================================================================
--- jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/test-commands2.xml (rev 0)
+++ jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/test-commands2.xml 2010-11-23 15:31:36 UTC (rev 3525)
@@ -0,0 +1,28 @@
+<!--
+
+ 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.
+
+-->
+<catalog>
+
+ <!-- Single command "chains" from CatalogBaseTestCase -->
+ <command name="Command2" className="org.exoplatform.services.command.TestCommand1" />
+
+ <command name="Command3" className="org.exoplatform.services.command.TestCommand1" />
+
+</catalog>
Added: jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/test-commands3.xml
===================================================================
--- jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/test-commands3.xml (rev 0)
+++ jcr/trunk/exo.jcr.framework.command/src/main/resources/conf/test-commands3.xml 2010-11-23 15:31:36 UTC (rev 3525)
@@ -0,0 +1,28 @@
+<!--
+
+ 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.
+
+-->
+<catalog name="catalog1">
+
+ <!-- Single command "chains" from CatalogBaseTestCase -->
+ <command name="Command2" className="org.exoplatform.services.command.TestCommand1" />
+
+ <command name="Command3" className="org.exoplatform.services.command.TestCommand1" />
+
+</catalog>
13 years, 6 months
exo-jcr SVN: r3524 - in kernel/trunk/exo.kernel.component.command/src/main/resources/conf: portal and 1 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-11-23 10:21:34 -0500 (Tue, 23 Nov 2010)
New Revision: 3524
Removed:
kernel/trunk/exo.kernel.component.command/src/main/resources/conf/custom-commands.xml
kernel/trunk/exo.kernel.component.command/src/main/resources/conf/test-commands.xml
kernel/trunk/exo.kernel.component.command/src/main/resources/conf/test-commands2.xml
kernel/trunk/exo.kernel.component.command/src/main/resources/conf/test-commands3.xml
Modified:
kernel/trunk/exo.kernel.component.command/src/main/resources/conf/portal/configuration.xml
kernel/trunk/exo.kernel.component.command/src/main/resources/conf/standalone/test-configuration.xml
kernel/trunk/exo.kernel.component.command/src/main/resources/conf/standalone/test-multi-configuration.xml
Log:
EXOJCR-1071: Move JCR framework commands list configuration to it right place
Deleted: kernel/trunk/exo.kernel.component.command/src/main/resources/conf/custom-commands.xml
===================================================================
--- kernel/trunk/exo.kernel.component.command/src/main/resources/conf/custom-commands.xml 2010-11-23 13:51:50 UTC (rev 3523)
+++ kernel/trunk/exo.kernel.component.command/src/main/resources/conf/custom-commands.xml 2010-11-23 15:21:34 UTC (rev 3524)
@@ -1,42 +0,0 @@
-<!--
-
- 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.
-
--->
-<catalog>
- <command name="addNode" className="org.exoplatform.frameworks.jcr.command.core.AddNodeCommand" />
- <command name="save" className="org.exoplatform.frameworks.jcr.command.core.SaveCommand" />
- <command name="filterNodesByTypes" className="org.exoplatform.frameworks.jcr.command.ext.FilterNodesByTypesCommand" />
- <command name="addResourceFile" className="org.exoplatform.frameworks.jcr.command.ext.AddResourceFileCommand" />
- <command name="displayResource" className="org.exoplatform.frameworks.jcr.command.web.DisplayResourceCommand" />
- <command name="getNode" className="org.exoplatform.frameworks.jcr.command.core.GetNodeCommand" />
-
-
- <!-- chain name="displayResource">
- <command id="1" className="org.exoplatform.frameworks.jcr.command.core.GetNodeCommand" />
- <command id="2" className="org.exoplatform.frameworks.jcr.command.web.DisplayResourceCommand" />
- </chain -->
-
- <!-- FCKEditor -->
- <command name="GetFolders" className="org.exoplatform.frameworks.jcr.command.web.fckeditor.GetFoldersOrFilesCommand" />
- <command name="GetFiles" className="org.exoplatform.frameworks.jcr.command.web.fckeditor.GetFoldersOrFilesCommand" />
- <command name="GetFoldersAndFiles" className="org.exoplatform.frameworks.jcr.command.web.fckeditor.GetFoldersOrFilesCommand" />
- <command name="FileUpload" className="org.exoplatform.frameworks.jcr.command.web.fckeditor.UploadFileCommand" />
- <command name="CreateFolder" className="org.exoplatform.frameworks.jcr.command.web.fckeditor.CreateFolderCommand" />
-
-</catalog>
Modified: kernel/trunk/exo.kernel.component.command/src/main/resources/conf/portal/configuration.xml
===================================================================
--- kernel/trunk/exo.kernel.component.command/src/main/resources/conf/portal/configuration.xml 2010-11-23 13:51:50 UTC (rev 3523)
+++ kernel/trunk/exo.kernel.component.command/src/main/resources/conf/portal/configuration.xml 2010-11-23 15:21:34 UTC (rev 3524)
@@ -25,19 +25,6 @@
<component>
<key>org.exoplatform.services.command.impl.CommandService</key>
<type>org.exoplatform.services.command.impl.CommandService</type>
- <component-plugins>
- <component-plugin>
- <name>config.catalog</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
- <init-params>
- <value-param>
- <name>config-file</name>
- <value>jar:/conf/custom-commands.xml</value>
- </value-param>
- </init-params>
- </component-plugin>
- </component-plugins>
</component>
</configuration>
Modified: kernel/trunk/exo.kernel.component.command/src/main/resources/conf/standalone/test-configuration.xml
===================================================================
--- kernel/trunk/exo.kernel.component.command/src/main/resources/conf/standalone/test-configuration.xml 2010-11-23 13:51:50 UTC (rev 3523)
+++ kernel/trunk/exo.kernel.component.command/src/main/resources/conf/standalone/test-configuration.xml 2010-11-23 15:21:34 UTC (rev 3524)
@@ -24,19 +24,6 @@
<component>
<key>org.exoplatform.services.command.impl.CommandService</key>
<type>org.exoplatform.services.command.impl.CommandService</type>
- <component-plugins>
- <component-plugin>
- <name>config.catalog</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
- <init-params>
- <value-param>
- <name>config-file</name>
- <value>conf/test-commands.xml</value>
- </value-param>
- </init-params>
- </component-plugin>
- </component-plugins>
</component>
<component>
Modified: kernel/trunk/exo.kernel.component.command/src/main/resources/conf/standalone/test-multi-configuration.xml
===================================================================
--- kernel/trunk/exo.kernel.component.command/src/main/resources/conf/standalone/test-multi-configuration.xml 2010-11-23 13:51:50 UTC (rev 3523)
+++ kernel/trunk/exo.kernel.component.command/src/main/resources/conf/standalone/test-multi-configuration.xml 2010-11-23 15:21:34 UTC (rev 3524)
@@ -24,41 +24,6 @@
<component>
<key>org.exoplatform.services.command.impl.CommandService</key>
<type>org.exoplatform.services.command.impl.CommandService</type>
- <component-plugins>
- <component-plugin>
- <name>config.catalog</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
- <init-params>
- <value-param>
- <name>config-file</name>
- <value>conf/test-commands.xml</value>
- </value-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>config.catalog</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
- <init-params>
- <value-param>
- <name>config-file</name>
- <value>conf/test-commands2.xml</value>
- </value-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>config.catalog</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.command.impl.CommonsXMLConfigurationPlugin</type>
- <init-params>
- <value-param>
- <name>config-file</name>
- <value>conf/test-commands3.xml</value>
- </value-param>
- </init-params>
- </component-plugin>
- </component-plugins>
</component>
</configuration>
Deleted: kernel/trunk/exo.kernel.component.command/src/main/resources/conf/test-commands.xml
===================================================================
--- kernel/trunk/exo.kernel.component.command/src/main/resources/conf/test-commands.xml 2010-11-23 13:51:50 UTC (rev 3523)
+++ kernel/trunk/exo.kernel.component.command/src/main/resources/conf/test-commands.xml 2010-11-23 15:21:34 UTC (rev 3524)
@@ -1,32 +0,0 @@
-<!--
-
- 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.
-
--->
-<catalog>
-
- <!-- Single command "chains" from CatalogBaseTestCase -->
- <command name="Command1" className="org.exoplatform.services.command.TestCommand1" />
-
- <!-- Chains with nested commands -->
- <chain name="Execute2">
- <command id="1" className="org.exoplatform.services.command.TestCommand1" />
- <command id="2" className="org.exoplatform.services.command.TestCommand1" />
- </chain>
-
-</catalog>
Deleted: kernel/trunk/exo.kernel.component.command/src/main/resources/conf/test-commands2.xml
===================================================================
--- kernel/trunk/exo.kernel.component.command/src/main/resources/conf/test-commands2.xml 2010-11-23 13:51:50 UTC (rev 3523)
+++ kernel/trunk/exo.kernel.component.command/src/main/resources/conf/test-commands2.xml 2010-11-23 15:21:34 UTC (rev 3524)
@@ -1,28 +0,0 @@
-<!--
-
- 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.
-
--->
-<catalog>
-
- <!-- Single command "chains" from CatalogBaseTestCase -->
- <command name="Command2" className="org.exoplatform.services.command.TestCommand1" />
-
- <command name="Command3" className="org.exoplatform.services.command.TestCommand1" />
-
-</catalog>
Deleted: kernel/trunk/exo.kernel.component.command/src/main/resources/conf/test-commands3.xml
===================================================================
--- kernel/trunk/exo.kernel.component.command/src/main/resources/conf/test-commands3.xml 2010-11-23 13:51:50 UTC (rev 3523)
+++ kernel/trunk/exo.kernel.component.command/src/main/resources/conf/test-commands3.xml 2010-11-23 15:21:34 UTC (rev 3524)
@@ -1,28 +0,0 @@
-<!--
-
- 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.
-
--->
-<catalog name="catalog1">
-
- <!-- Single command "chains" from CatalogBaseTestCase -->
- <command name="Command2" className="org.exoplatform.services.command.TestCommand1" />
-
- <command name="Command3" className="org.exoplatform.services.command.TestCommand1" />
-
-</catalog>
13 years, 6 months
exo-jcr SVN: r3523 - in core/trunk: exo.core.component.database and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-11-23 08:51:50 -0500 (Tue, 23 Nov 2010)
New Revision: 3523
Modified:
core/trunk/exo.core.component.database/pom.xml
core/trunk/pom.xml
Log:
EXOJCR-1070: Remove dependency on pull-parser artifact as redundant
Modified: core/trunk/exo.core.component.database/pom.xml
===================================================================
--- core/trunk/exo.core.component.database/pom.xml 2010-11-23 13:08:47 UTC (rev 3522)
+++ core/trunk/exo.core.component.database/pom.xml 2010-11-23 13:51:50 UTC (rev 3523)
@@ -74,10 +74,6 @@
<artifactId>jta</artifactId>
</dependency>
<dependency>
- <groupId>pull-parser</groupId>
- <artifactId>pull-parser</artifactId>
- </dependency>
- <dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<scope>runtime</scope>
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2010-11-23 13:08:47 UTC (rev 3522)
+++ core/trunk/pom.xml 2010-11-23 13:51:50 UTC (rev 3523)
@@ -166,12 +166,6 @@
<dependency>
- <groupId>pull-parser</groupId>
- <artifactId>pull-parser</artifactId>
- <version>2</version>
- </dependency>
-
- <dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
13 years, 6 months
exo-jcr SVN: r3522 - in jcr/trunk/exo.jcr.component.ext/src: test/java/org/exoplatform/services/jcr/ext/repository and 3 other directories.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-11-23 08:08:47 -0500 (Tue, 23 Nov 2010)
New Revision: 3522
Added:
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/repository/creation/
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/repository/creation/TestRepositoryCreationService.java
jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone/udp-mux.xml
jcr/trunk/exo.jcr.component.ext/src/test/resources/test.sql
Modified:
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/creation/RepositoryCreationServiceImpl.java
jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone/test-configuration.xml
jcr/trunk/exo.jcr.component.ext/src/test/resources/test.policy
Log:
EXOJCR-929: TestRepositoryCreationService added, RepositoryCreationServiceImpl updated
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/creation/RepositoryCreationServiceImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/creation/RepositoryCreationServiceImpl.java 2010-11-23 09:32:11 UTC (rev 3521)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/repository/creation/RepositoryCreationServiceImpl.java 2010-11-23 13:08:47 UTC (rev 3522)
@@ -32,6 +32,7 @@
import org.exoplatform.services.log.Log;
import org.exoplatform.services.naming.InitialContextInitializer;
import org.exoplatform.services.rpc.RPCService;
+import org.jboss.cache.util.concurrent.ConcurrentHashSet;
import java.io.File;
import java.io.FileNotFoundException;
@@ -73,8 +74,10 @@
private final InitialContextInitializer initialContextInitializer;
- private final Set<String> pendingRepositories = new HashSet<String>();
+ private final Set<String> pendingRepositories = new ConcurrentHashSet<String>();
+ private final Set<String> namesUnderNegotiation = new ConcurrentHashSet<String>();
+
public RepositoryCreationServiceImpl(RepositoryService repositoryService, BackupManager backupManager,
DBCreator dbCreator, InitialContextInitializer initialContextInitializer, final RPCService rpcService)
{
@@ -91,7 +94,17 @@
public void createRepository(String backupId, RepositoryEntry rEntry) throws RepositoryConfigurationException,
RepositoryCreationException
{
- // TODO Auto-generated method stub
+ reserveRepositoryName(rEntry.getName());
+ // 1. check possibility to create repository locally
+ // - check existing, pending repository and datasources with same names
+
+ // 2. reserve name and put additional information (ex. ip and port of current machine)
+ // 3. check possibility to create repository on others nodes
+ // - sending to all cluster nodes information about new repository and waiting for answers
+ // - all cluster nodes receive information and check possibility to create repository locally
+ // - send response
+ // 4. reserve name on all nodes of cluster
+
}
/**
@@ -228,8 +241,56 @@
*/
public String reserveRepositoryName(String repositoryName) throws RepositoryCreationException
{
+ // 1. check possibility to create repository locally
+ // - check existing, pending repository and datasources with same names
+
+ for (int i = 0; i < repositoryService.getConfig().getRepositoryConfigurations().size(); i++)
+ {
+ RepositoryEntry conf = repositoryService.getConfig().getRepositoryConfigurations().get(i);
+ if (conf.getName().equals(repositoryName))
+ {
+ throw new RepositoryCreationException("Repository " + repositoryName + " already exists.");
+ }
+
+ }
+
+ // try
+ // {
+ // ManageableRepository repo = repositoryService.getRepository(repositoryName);
+ // if (repo != null)
+ // {
+ // throw new RepositoryCreationException("Repository " + repositoryName + " already exists.");
+ // }
+ // }
+ // catch (RepositoryException e)
+ // {
+ // throw new RepositoryCreationException(e.getMessage(), e);
+ // }
+ // catch (RepositoryConfigurationException e)
+ // {
+ // throw new RepositoryCreationException(e.getMessage(), e);
+ // }
+
+ if (namesUnderNegotiation.contains(repositoryName) || pendingRepositories.contains(repositoryName))
+ {
+ throw new RepositoryCreationException("Repository name " + repositoryName + " already reserved.");
+ }
+
+ // 2. reserve name and put additional information (ex. ip and port of current machine)
+ namesUnderNegotiation.add(repositoryName);
+
+ // TODO ask other nodes does thay have pending repositories
+
pendingRepositories.add(repositoryName);
- //TODO notify all cluster-nodes that repositoryName is reserved
+ namesUnderNegotiation.remove(repositoryName);
+ // TODO register repositoryName on other nodes
+
+ // 3. check possibility to create repository on others nodes
+ // - sending to all cluster nodes information about new repository and waiting for answers
+ // - all cluster nodes receive information and check possibility to create repository locally
+ // - send response
+ // 4. reserve name on all nodes of cluster
+
return repositoryName;
}
Added: jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/repository/creation/TestRepositoryCreationService.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/repository/creation/TestRepositoryCreationService.java (rev 0)
+++ jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/repository/creation/TestRepositoryCreationService.java 2010-11-23 13:08:47 UTC (rev 3522)
@@ -0,0 +1,120 @@
+/*
+ * Copyright (C) 2003-2010 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.ext.repository.creation;
+
+import org.exoplatform.services.jcr.RepositoryService;
+import org.exoplatform.services.jcr.config.RepositoryEntry;
+import org.exoplatform.services.jcr.core.ManageableRepository;
+import org.exoplatform.services.jcr.ext.backup.AbstractBackupTestCase;
+import org.exoplatform.services.jcr.ext.backup.BackupManager;
+import org.exoplatform.services.jcr.ext.backup.RepositoryBackupChain;
+import org.exoplatform.services.jcr.ext.backup.RepositoryBackupConfig;
+import org.exoplatform.services.jcr.impl.core.SessionImpl;
+
+import java.io.File;
+
+import javax.jcr.Node;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: TestRepositoryCreationService.java 111 2008-11-11 11:11:11Z serg $
+ */
+public class TestRepositoryCreationService extends AbstractBackupTestCase
+{
+
+ public void testCreateRepository() throws Exception
+ {
+
+ // backup
+ File backDir = new File("target/backup");
+ backDir.mkdirs();
+
+ RepositoryBackupConfig config = new RepositoryBackupConfig();
+ config.setRepository(repository.getName());
+ config.setBackupType(BackupManager.FULL_BACKUP_ONLY);
+ config.setBackupDir(backDir);
+
+ backup.startBackup(config);
+
+ RepositoryBackupChain bch = backup.findRepositoryBackup(repository.getName());
+
+ backup.getRepositoryBackupsLogs();
+
+ // wait till full backup will be stopped
+ while (bch.getState() != RepositoryBackupChain.FINISHED)
+ {
+ Thread.yield();
+ Thread.sleep(50);
+ }
+
+ // stop fullBackup
+
+ if (bch != null)
+ backup.stopBackup(bch);
+ else
+ fail("Can't get fullBackup chain");
+
+ // restore with RepositoryCreatorService
+ RepositoryCreationService creatorService =
+ (RepositoryCreationService)container.getComponentInstanceOfType(RepositoryCreationService.class);
+
+ String tenantName = "new_repository";
+
+ String repoToken = creatorService.reserveRepositoryName(tenantName);
+
+ // restore
+ RepositoryEntry baseRE =
+ (RepositoryEntry)ws1Session.getContainer().getComponentInstanceOfType(RepositoryEntry.class);
+
+ RepositoryEntry rEntry = makeRepositoryEntry(tenantName, baseRE, "source", null);
+
+ creatorService.createRepository(bch.getBackupId(), rEntry, repoToken);
+
+ // check
+ ManageableRepository restoredRepository = repositoryService.getRepository(tenantName);
+ assertNotNull(restoredRepository);
+
+ for (String wsName : restoredRepository.getWorkspaceNames())
+ {
+ SessionImpl back = null;
+ try
+ {
+ back = (SessionImpl)restoredRepository.login(credentials, wsName);
+ Node ws1backTestRoot = back.getRootNode().getNode("backupTest");
+ assertEquals("Restored content should be same", "property-5", ws1backTestRoot.getNode("node_5")
+ .getProperty("exo:data").getString());
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ fail(e.getMessage());
+ }
+ finally
+ {
+ if (back != null)
+ back.logout();
+ }
+ }
+ //check repositoryConfiguration
+ RepositoryService repoService = (RepositoryService)this.container.getComponentInstance(RepositoryService.class);
+ assertNotNull(repoService.getConfig().getRepositoryConfiguration(tenantName));
+ }
+}
Modified: jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone/test-configuration.xml 2010-11-23 09:32:11 UTC (rev 3521)
+++ jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone/test-configuration.xml 2010-11-23 13:08:47 UTC (rev 3522)
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
+<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
Copyright (C) 2009 eXo Platform SAS.
@@ -19,2105 +19,2159 @@
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_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
- xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
-
- <component>
- <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
- <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
- <init-params>
- <value-param>
- <name>logger</name>
- <value>org.exoplatform.services.log.impl.BufferedLog4JLogger</value>
- </value-param>
- <value-param>
- <name>configurator</name>
- <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
- </value-param>
- <properties-param>
- <name>properties</name>
- <description>Log4J properties</description>
- <property name="log4j.rootLogger" value="INFO, stdout, file" />
-
- <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender" />
- <property name="log4j.appender.stdout.threshold" value="INFO" />
-
- <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout" />
- <property name="log4j.appender.stdout.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n" />
-
- <property name="log4j.appender.file" value="org.apache.log4j.FileAppender" />
- <property name="log4j.appender.file.File" value="target/jcr.log" />
-
- <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout" />
- <property name="log4j.appender.file.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n" />
-
- <!-- property name="log4j.category.ext.BackupScheduler" value="DEBUG"/>
- <property name="log4j.category.ext.BackupManagerImpl" value="DEBUG"/ -->
- <property name="log4j.category.jcr.ext.RestRepositoryService" value="DEBUG"/>
-
- </properties-param>
- </init-params>
- </component>
-
- <component>
- <key>org.exoplatform.services.jcr.RepositoryService</key>
- <type>org.exoplatform.services.jcr.impl.RepositoryServiceImpl</type>
- <component-plugins>
- <!-- component-plugin>
- <name>register.listener</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.RepositoryChangesListenerRegisterPlugin</type>
- <init-params>
- <value-param>
- <name>repository-name</name>
- <value>db1</value>
- </value-param>
- <value-param>
- <name>workspaces</name>
- <value>ws,ws3,ws4,ws5</value>
- </value-param>
- <value-param>
- <name>component-class-name</name>
- <value>org.exoplatform.services.jcr.ext.replication.async.AsyncStartChangesListener</value>
- </value-param>
- </init-params>
- </component-plugin -->
- <component-plugin>
- <name>add.namespaces</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
- <init-params>
- <properties-param>
- <name>namespaces</name>
- <property name="dc" value="http://purl.org/dc/elements/1.1/" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>add.nodeType</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
- <init-params>
- <values-param>
- <name>autoCreatedInNewRepository</name>
- <description>Node types configuration file</description>
- <value>jar:/conf/ext-nodetypes-config.xml</value>
- <value>jar:/conf/test/nodetypes-ext-test.xml</value>
- </values-param>
- </init-params>
- </component-plugin>
- </component-plugins>
- </component>
-
- <component>
- <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
- <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
- <init-params>
- <value-param>
- <name>conf-path</name>
- <description>JCR configuration file</description>
- <value>jar:/conf/standalone/test-jcr-ext-config.xml</value>
- </value-param>
- </init-params>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.ext.repository.RestRepositoryService</type>
- </component>
-
- <!-- backup -->
- <component>
- <key>org.exoplatform.services.jcr.ext.backup.BackupManager</key>
- <type>org.exoplatform.services.jcr.ext.backup.impl.BackupManagerImpl</type>
- <init-params>
- <properties-param>
- <name>backup-properties</name>
- <property name="default-incremental-job-period" value="3600" /><!-- set default incremental periond = 60 minutes -->
- <property name="full-backup-type" value="org.exoplatform.services.jcr.ext.backup.impl.fs.FullBackupJob" />
- <property name="incremental-backup-type" value="org.exoplatform.services.jcr.ext.backup.impl.fs.IncrementalBackupJob" />
- <property name="backup-dir" value="target/backup" />
- </properties-param>
- </init-params>
- </component>
-
- <!-- REST -->
- <component>
- <type>org.exoplatform.services.jcr.ext.registry.RESTRegistryService</type>
- </component>
-
- <!-- HTTPBackupAgent -->
- <component>
- <type>org.exoplatform.services.jcr.ext.backup.server.HTTPBackupAgent</type>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.ext.app.ThreadLocalSessionProviderService</type>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
- <component-plugins>
- <component-plugin>
- <name>appConfig</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.ext.registry.RegistryInitializationEntryPlugin</type>
- <init-params>
- <value-param>
- <name>GroovyEditor</name>
- <value>
- <![CDATA[<GroovyEditor><context>portal/rest</context><repository>repository</repository><workspace>collaboration</workspace></GroovyEditor>]]>
- </value>
- </value-param>
- </init-params>
- </component-plugin>
- </component-plugins>
- <init-params>
- <properties-param>
- <name>locations</name>
- <property name="db1" value="ws2" />
- </properties-param>
- </init-params>
- </component>
-
- <!-- component>
- <key>org.exoplatform.services.jcr.ext.audit.AuditService</key>
- <type>org.exoplatform.services.jcr.ext.audit.AuditServiceImpl</type>
- <init-params>
- <value-param>
- <name>adminIdentity</name>
- <value>root;john</value>
- </value-param>
- </init-params>
- </component -->
-
- <!--component>
- <type>org.exoplatform.services.organization.impl.mock.DummyOrganizationService</type>
- </component-->
-
- <component>
- <key>org.exoplatform.services.security.Authenticator</key>
- <type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.ext.resource.NodeRepresentationService</type>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.ext.resource.XMLViewNodeRepresentationRenderer</type>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.ext.resource.jcr.Handler</type>
- </component>
-
- <component>
- <type>org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader</type>
- <init-params>
- <object-param>
- <name>observation.config</name>
- <object type="org.exoplatform.services.jcr.ext.script.groovy.ObservationListenerConfiguration">
- <field name="repository">
- <string>db1</string>
- </field>
- <field name="workspaces">
- <collection type="java.util.ArrayList">
- <value>
- <string>ws</string>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component>
-
- <!-- component>
- <type>org.exoplatform.services.jcr.ext.replication.async.AsyncReplication</type>
- <component-plugins>
-
- <component-plugin>
- <name>async-workspace-config</name>
- <set-method>addAsyncWorkspaceConfig</set-method>
- <type>org.exoplatform.services.jcr.ext.replication.async.config.AsyncWorkspaceConfig</type>
- <description>async replication config per workspace</description>
- <init-params>
- <properties-param>
- <name>async-workspace-config</name>
- <property name="repository-name" value="db1" />
- <property name="workspace-name" value="ws" />
- <property name="priority" value="80" />
- <property name="other-participants-priority" value="100,50" />
- <property name="bind-ip-address" value="127.0.0.1" />
- <property name="channel-config"
- value="TCP(start_port=7700;oob_thread_pool.queue_max_size=100;thread_naming_pattern=cl;use_concurrent_stack=true;oob_thread_pool.rejection_policy=Run;discard_incompatible_packets=true;thread_pool.max_threads=40;oob_thread_pool.enabled=true;oob_thread_pool.max_threads=20;loopback=false;oob_thread_pool.keep_alive_time=5000;thread_pool.queue_enabled=false;oob_thread_pool.queue_enabled=false;max_bundle_size=64000;thread_pool.queue_max_size=100;thread_pool.enabled=true;enable_diagnostics=true;max_bundle_timeout=30;oob_thread_pool.min_threads=8;use_incoming_packet_handler=true;thread_pool.rejection_policy=Run;bind_addr=$bind-ip-address;thread_pool.min_threads=8;thread_pool.keep_alive_time=5000;enable_bundling=true):MPING(timeout=2000;num_initial_members=8;mcast_port=35526;mcast_addr=224.0.0.1):FD(timeout=2000;max_tries=5;shun=true):FD_SOCK:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(max_xmit_size=60000;print_stability_history_on_failed_xmit=true;use_mcast_xmit!
=false;gc_lag=0;discard_delivered_msgs=true;retransmit_timeout=300,600,1200,2400,4800):pbcast.STABLE(stability_delay=1000;desired_avg_gossip=50000;max_bytes=8000000):pbcast.GMS(print_local_addr=true;join_timeout=3000;view_bundling=true;join_retry_timeout=2000;shun=true;merge_leader=true;reject_join_from_existing_member=true)" />
- <property name="channel-name" value="AsyncRepCh" />
- <property name="storage-dir" value="target/asyncreplication/db1/ws" />
- <property name="wait-all-members" value="15" />
- </properties-param>
- </init-params>
- </component-plugin>
-
- <component-plugin>
- <name>async-workspace-config</name>
- <set-method>addAsyncWorkspaceConfig</set-method>
- <type>org.exoplatform.services.jcr.ext.replication.async.config.AsyncWorkspaceConfig</type>
- <description>async replication config per workspace</description>
- <init-params>
- <properties-param>
- <name>async-workspce-config</name>
- <property name="repository-name" value="db1" />
- <property name="workspace-name" value="ws1" />
- <property name="priority" value="80" />
- <property name="other-participants-priority" value="100,50" />
- <property name="bind-ip-address" value="127.0.0.1" />
- <property name="channel-config"
- value="TCP(start_port=7700;oob_thread_pool.queue_max_size=100;thread_naming_pattern=cl;use_concurrent_stack=true;oob_thread_pool.rejection_policy=Run;discard_incompatible_packets=true;thread_pool.max_threads=40;oob_thread_pool.enabled=true;oob_thread_pool.max_threads=20;loopback=false;oob_thread_pool.keep_alive_time=5000;thread_pool.queue_enabled=false;oob_thread_pool.queue_enabled=false;max_bundle_size=64000;thread_pool.queue_max_size=100;thread_pool.enabled=true;enable_diagnostics=true;max_bundle_timeout=30;oob_thread_pool.min_threads=8;use_incoming_packet_handler=true;thread_pool.rejection_policy=Run;bind_addr=$bind-ip-address;thread_pool.min_threads=8;thread_pool.keep_alive_time=5000;enable_bundling=true):MPING(timeout=2000;num_initial_members=8;mcast_port=35526;mcast_addr=224.0.0.1):FD(timeout=2000;max_tries=5;shun=true):FD_SOCK:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(max_xmit_size=60000;print_stability_history_on_failed_xmit=true;use_mcast_xmit!
=false;gc_lag=0;discard_delivered_msgs=true;retransmit_timeout=300,600,1200,2400,4800):pbcast.STABLE(stability_delay=1000;desired_avg_gossip=50000;max_bytes=8000000):pbcast.GMS(print_local_addr=true;join_timeout=3000;view_bundling=true;join_retry_timeout=2000;shun=true;merge_leader=true;reject_join_from_existing_member=true)" />
- <property name="channel-name" value="AsyncRepCh" />
- <property name="storage-dir" value="target/asyncreplication/db1/ws1" />
- <property name="wait-all-members" value="15" />
- </properties-param>
- </init-params>
- </component-plugin>
-
- </component-plugins>
- </component -->
-
- <!-- component>
- <type>org.exoplatform.services.jcr.ext.replication.async.executor.AsyncReplicationExecutor</type>
- <init-params>
- <object-param>
- <name>async-replication-executor-configuration</name>
- <description>async replication nodes</description>
- <object type="org.exoplatform.services.jcr.ext.replication.async.executor.AsyncReplicationExecutor$ExecutorConf">
- <field name="members">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.jcr.ext.replication.async.executor.Member">
- <field name="url">
- <string>http://root:exo@192.168.0.15:8080</string>
- </field>
- <field name="realmName">
- <string>eXo REST services</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.jcr.ext.replication.async.executor.Member">
- <field name="url">
- <string>http://root:exo@192.168.0.15:8090</string>
- </field>
- <field name="realmName">
- <string>eXo REST services</string>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component -->
-
- <!-- component>
- <key>org.exoplatform.services.organization.OrganizationService</key>
- <type>org.exoplatform.services.jcr.ext.organization.JCROrganizationServiceImpl</type>
- <init-params>
- <value-param>
- <name>storage-workspace</name>
- <description>Workspace in default repository where organization storage will be created</description>
- <value>ws</value>
- </value-param>
- </init-params>
- </component -->
-
+<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd http://www.exoplaform.org/xml/ns/kernel_1_0.xsd"
+ xmlns="http://www.exoplaform.org/xml/ns/kernel_1_0.xsd">
+
<component>
+ <key>org.exoplatform.services.log.LogConfigurationInitializer</key>
+ <type>org.exoplatform.services.log.LogConfigurationInitializer</type>
+ <init-params>
+ <value-param>
+ <name>logger</name>
+ <value>org.exoplatform.services.log.impl.BufferedLog4JLogger</value>
+ </value-param>
+ <value-param>
+ <name>configurator</name>
+ <value>org.exoplatform.services.log.impl.Log4JConfigurator</value>
+ </value-param>
+ <properties-param>
+ <name>properties</name>
+ <description>Log4J properties</description>
+ <property name="log4j.rootLogger" value="INFO, stdout, file" />
+
+ <property name="log4j.appender.stdout" value="org.apache.log4j.ConsoleAppender" />
+ <property name="log4j.appender.stdout.threshold" value="INFO" />
+
+ <property name="log4j.appender.stdout.layout" value="org.apache.log4j.PatternLayout" />
+ <property name="log4j.appender.stdout.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n" />
+
+ <property name="log4j.appender.file" value="org.apache.log4j.FileAppender" />
+ <property name="log4j.appender.file.File" value="target/jcr.log" />
+
+ <property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout" />
+ <property name="log4j.appender.file.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n" />
+
+ <!-- property name="log4j.category.ext.BackupScheduler" value="DEBUG"/>
+ <property name="log4j.category.ext.BackupManagerImpl" value="DEBUG"/ -->
+ <property name="log4j.category.jcr.ext.RestRepositoryService" value="DEBUG"/>
+
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.jcr.RepositoryService</key>
+ <type>org.exoplatform.services.jcr.impl.RepositoryServiceImpl</type>
+ <component-plugins>
+ <!-- component-plugin>
+ <name>register.listener</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.RepositoryChangesListenerRegisterPlugin</type>
+ <init-params>
+ <value-param>
+ <name>repository-name</name>
+ <value>db1</value>
+ </value-param>
+ <value-param>
+ <name>workspaces</name>
+ <value>ws,ws3,ws4,ws5</value>
+ </value-param>
+ <value-param>
+ <name>component-class-name</name>
+ <value>org.exoplatform.services.jcr.ext.replication.async.AsyncStartChangesListener</value>
+ </value-param>
+ </init-params>
+ </component-plugin -->
+ <component-plugin>
+ <name>add.namespaces</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.AddNamespacesPlugin</type>
+ <init-params>
+ <properties-param>
+ <name>namespaces</name>
+ <property name="dc" value="http://purl.org/dc/elements/1.1/" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>add.nodeType</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.AddNodeTypePlugin</type>
+ <init-params>
+ <values-param>
+ <name>autoCreatedInNewRepository</name>
+ <description>Node types configuration file</description>
+ <value>jar:/conf/ext-nodetypes-config.xml</value>
+ <value>jar:/conf/test/nodetypes-ext-test.xml</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.jcr.config.RepositoryServiceConfiguration</key>
+ <type>org.exoplatform.services.jcr.impl.config.RepositoryServiceConfigurationImpl</type>
+ <init-params>
+ <value-param>
+ <name>conf-path</name>
+ <description>JCR configuration file</description>
+ <value>jar:/conf/standalone/test-jcr-ext-config.xml</value>
+ </value-param>
+ <properties-param>
+ <name>working-conf</name>
+ <description>working-conf</description>
+ <property name="persister-class-name"
+ value="org.exoplatform.services.jcr.impl.config.JDBCConfigurationPersister" />
+ <property name="source-name" value="jdbcjcr" />
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.ext.repository.RestRepositoryService</type>
+ </component>
+
+ <!-- backup -->
+ <component>
+ <key>org.exoplatform.services.jcr.ext.backup.BackupManager</key>
+ <type>org.exoplatform.services.jcr.ext.backup.impl.BackupManagerImpl</type>
+ <init-params>
+ <properties-param>
+ <name>backup-properties</name>
+ <property name="default-incremental-job-period" value="3600" /><!-- set default incremental periond = 60 minutes -->
+ <property name="full-backup-type" value="org.exoplatform.services.jcr.ext.backup.impl.fs.FullBackupJob" />
+ <property name="incremental-backup-type" value="org.exoplatform.services.jcr.ext.backup.impl.fs.IncrementalBackupJob" />
+ <property name="backup-dir" value="target/backup" />
+ </properties-param>
+ </init-params>
+ </component>
+
+ <!-- REST -->
+ <component>
+ <type>org.exoplatform.services.jcr.ext.registry.RESTRegistryService</type>
+ </component>
+
+ <!-- HTTPBackupAgent -->
+ <component>
+ <type>org.exoplatform.services.jcr.ext.backup.server.HTTPBackupAgent</type>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.ext.app.ThreadLocalSessionProviderService</type>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.ext.registry.RegistryService</type>
+ <component-plugins>
+ <component-plugin>
+ <name>appConfig</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.ext.registry.RegistryInitializationEntryPlugin</type>
+ <init-params>
+ <value-param>
+ <name>GroovyEditor</name>
+ <value>
+ <![CDATA[<GroovyEditor><context>portal/rest</context><repository>repository</repository><workspace>collaboration</workspace></GroovyEditor>]]>
+ </value>
+ </value-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ <init-params>
+ <properties-param>
+ <name>locations</name>
+ <property name="db1" value="ws2" />
+ </properties-param>
+ </init-params>
+ </component>
+
+ <!-- component>
+ <key>org.exoplatform.services.jcr.ext.audit.AuditService</key>
+ <type>org.exoplatform.services.jcr.ext.audit.AuditServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>adminIdentity</name>
+ <value>root;john</value>
+ </value-param>
+ </init-params>
+ </component -->
+
+ <!--component>
<type>org.exoplatform.services.organization.impl.mock.DummyOrganizationService</type>
- </component>
-
+ </component-->
+
<component>
<key>org.exoplatform.services.security.Authenticator</key>
<type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
</component>
<component>
+ <type>org.exoplatform.services.jcr.ext.resource.NodeRepresentationService</type>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.ext.resource.XMLViewNodeRepresentationRenderer</type>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.ext.resource.jcr.Handler</type>
+ </component>
+
+ <component>
+ <type>org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader</type>
+ <init-params>
+ <object-param>
+ <name>observation.config</name>
+ <object type="org.exoplatform.services.jcr.ext.script.groovy.ObservationListenerConfiguration">
+ <field name="repository">
+ <string>db1</string>
+ </field>
+ <field name="workspaces">
+ <collection type="java.util.ArrayList">
+ <value>
+ <string>ws</string>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component>
+
+ <!-- component>
+ <type>org.exoplatform.services.jcr.ext.replication.async.AsyncReplication</type>
+ <component-plugins>
+
+ <component-plugin>
+ <name>async-workspace-config</name>
+ <set-method>addAsyncWorkspaceConfig</set-method>
+ <type>org.exoplatform.services.jcr.ext.replication.async.config.AsyncWorkspaceConfig</type>
+ <description>async replication config per workspace</description>
+ <init-params>
+ <properties-param>
+ <name>async-workspace-config</name>
+ <property name="repository-name" value="db1" />
+ <property name="workspace-name" value="ws" />
+ <property name="priority" value="80" />
+ <property name="other-participants-priority" value="100,50" />
+ <property name="bind-ip-address" value="127.0.0.1" />
+ <property name="channel-config"
+ value="TCP(start_port=7700;oob_thread_pool.queue_max_size=100;thread_naming_pattern=cl;use_concurrent_stack=true;oob_thread_pool.rejection_policy=Run;discard_incompatible_packets=true;thread_pool.max_threads=40;oob_thread_pool.enabled=true;oob_thread_pool.max_threads=20;loopback=false;oob_thread_pool.keep_alive_time=5000;thread_pool.queue_enabled=false;oob_thread_pool.queue_enabled=false;max_bundle_size=64000;thread_pool.queue_max_size=100;thread_pool.enabled=true;enable_diagnostics=true;max_bundle_timeout=30;oob_thread_pool.min_threads=8;use_incoming_packet_handler=true;thread_pool.rejection_policy=Run;bind_addr=$bind-ip-address;thread_pool.min_threads=8;thread_pool.keep_alive_time=5000;enable_bundling=true):MPING(timeout=2000;num_initial_members=8;mcast_port=35526;mcast_addr=224.0.0.1):FD(timeout=2000;max_tries=5;shun=true):FD_SOCK:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(max_xmit_size=60000;print_stability_history_on_failed_xmit=true;use_mcast_xmit!
=false;gc_lag=0;discard_delivered_msgs=true;retransmit_timeout=300,600,1200,2400,4800):pbcast.STABLE(stability_delay=1000;desired_avg_gossip=50000;max_bytes=8000000):pbcast.GMS(print_local_addr=true;join_timeout=3000;view_bundling=true;join_retry_timeout=2000;shun=true;merge_leader=true;reject_join_from_existing_member=true)" />
+ <property name="channel-name" value="AsyncRepCh" />
+ <property name="storage-dir" value="target/asyncreplication/db1/ws" />
+ <property name="wait-all-members" value="15" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+
+ <component-plugin>
+ <name>async-workspace-config</name>
+ <set-method>addAsyncWorkspaceConfig</set-method>
+ <type>org.exoplatform.services.jcr.ext.replication.async.config.AsyncWorkspaceConfig</type>
+ <description>async replication config per workspace</description>
+ <init-params>
+ <properties-param>
+ <name>async-workspce-config</name>
+ <property name="repository-name" value="db1" />
+ <property name="workspace-name" value="ws1" />
+ <property name="priority" value="80" />
+ <property name="other-participants-priority" value="100,50" />
+ <property name="bind-ip-address" value="127.0.0.1" />
+ <property name="channel-config"
+ value="TCP(start_port=7700;oob_thread_pool.queue_max_size=100;thread_naming_pattern=cl;use_concurrent_stack=true;oob_thread_pool.rejection_policy=Run;discard_incompatible_packets=true;thread_pool.max_threads=40;oob_thread_pool.enabled=true;oob_thread_pool.max_threads=20;loopback=false;oob_thread_pool.keep_alive_time=5000;thread_pool.queue_enabled=false;oob_thread_pool.queue_enabled=false;max_bundle_size=64000;thread_pool.queue_max_size=100;thread_pool.enabled=true;enable_diagnostics=true;max_bundle_timeout=30;oob_thread_pool.min_threads=8;use_incoming_packet_handler=true;thread_pool.rejection_policy=Run;bind_addr=$bind-ip-address;thread_pool.min_threads=8;thread_pool.keep_alive_time=5000;enable_bundling=true):MPING(timeout=2000;num_initial_members=8;mcast_port=35526;mcast_addr=224.0.0.1):FD(timeout=2000;max_tries=5;shun=true):FD_SOCK:VERIFY_SUSPECT(timeout=1500):pbcast.NAKACK(max_xmit_size=60000;print_stability_history_on_failed_xmit=true;use_mcast_xmit!
=false;gc_lag=0;discard_delivered_msgs=true;retransmit_timeout=300,600,1200,2400,4800):pbcast.STABLE(stability_delay=1000;desired_avg_gossip=50000;max_bytes=8000000):pbcast.GMS(print_local_addr=true;join_timeout=3000;view_bundling=true;join_retry_timeout=2000;shun=true;merge_leader=true;reject_join_from_existing_member=true)" />
+ <property name="channel-name" value="AsyncRepCh" />
+ <property name="storage-dir" value="target/asyncreplication/db1/ws1" />
+ <property name="wait-all-members" value="15" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+
+ </component-plugins>
+ </component -->
+
+ <!-- component>
+ <type>org.exoplatform.services.jcr.ext.replication.async.executor.AsyncReplicationExecutor</type>
+ <init-params>
+ <object-param>
+ <name>async-replication-executor-configuration</name>
+ <description>async replication nodes</description>
+ <object type="org.exoplatform.services.jcr.ext.replication.async.executor.AsyncReplicationExecutor$ExecutorConf">
+ <field name="members">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.jcr.ext.replication.async.executor.Member">
+ <field name="url">
+ <string>http://root:exo@192.168.0.15:8080</string>
+ </field>
+ <field name="realmName">
+ <string>eXo REST services</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.jcr.ext.replication.async.executor.Member">
+ <field name="url">
+ <string>http://root:exo@192.168.0.15:8090</string>
+ </field>
+ <field name="realmName">
+ <string>eXo REST services</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component -->
+
+ <!-- component>
+ <key>org.exoplatform.services.organization.OrganizationService</key>
+ <type>org.exoplatform.services.jcr.ext.organization.JCROrganizationServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>storage-workspace</name>
+ <description>Workspace in default repository where organization storage will be created</description>
+ <value>ws</value>
+ </value-param>
+ </init-params>
+ </component -->
+
+ <component>
+ <type>org.exoplatform.services.organization.impl.mock.DummyOrganizationService</type>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.security.Authenticator</key>
+ <type>org.exoplatform.services.organization.auth.OrganizationAuthenticatorImpl</type>
+ </component>
+
+ <component>
<type>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</type>
</component>
-
- <!-- component>
- <key>org.exoplatform.services.database.HibernateService</key>
- <jmx-name>database:type=HibernateService</jmx-name>
- <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
- <init-params>
- <properties-param>
- <name>hibernate.properties</name>
- <description>Default Hibernate Service</description>
- <property name="hibernate.show_sql" value="false" />
- <property name="hibernate.cglib.use_reflection_optimizer" value="true" />
- <property name="hibernate.connection.url" value="jdbc:hsqldb:file:../temp/data/exodb" />
- <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
- <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" />
- <property name="hibernate.c3p0.timeout" value="1800" />
- <property name="hibernate.c3p0.max_statements" value="50" />
- </properties-param>
- </init-params>
- </component -->
-
- <!-- component>
- <key>org.exoplatform.services.organization.OrganizationService</key>
- <type>org.exoplatform.services.organization.hibernate.OrganizationServiceImpl</type>
- </component>
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.database.HibernateService</target-component>
- <component-plugin>
- <name>add.hibernate.mapping</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
- <init-params>
- <values-param>
- <name>hibernate.mapping</name>
- <value>org/exoplatform/services/organization/impl/UserImpl.hbm.xml</value>
- <value>org/exoplatform/services/organization/impl/MembershipImpl.hbm.xml</value>
- <value>org/exoplatform/services/organization/impl/GroupImpl.hbm.xml</value>
- <value>org/exoplatform/services/organization/impl/MembershipTypeImpl.hbm.xml</value>
- <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins -->
-
- <!-- org service initializer, copied from ECM portal.war -->
- <!-- external-component-plugins>
- <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
- <component-plugin>
- <name>init.service.listener</name>
- <set-method>addListenerPlugin</set-method>
- <type>org.exoplatform.services.organization.OrganizationDatabaseInitializer</type>
- <description>this listener populate organization data for the first launch</description>
- <init-params>
- <value-param>
- <name>checkDatabaseAlgorithm</name>
- <description>check database</description>
- <value>entry</value>
- </value-param>
- <value-param>
- <name>printInformation</name>
- <description>Print information init database</description>
- <value>false</value>
- </value-param>
- <object-param>
- <name>configuration</name>
- <description>description</description>
- <object type="org.exoplatform.services.organization.OrganizationConfig">
- <field name="membershipType">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type">
- <string>manager</string>
- </field>
- <field name="description">
- <string>manager membership type</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type">
- <string>member</string>
- </field>
- <field name="description">
- <string>member membership type</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
- <field name="type">
- <string>validator</string>
- </field>
- <field name="description">
- <string>validator membership type</string>
- </field>
- </object>
- </value>
- </collection>
- </field>
-
- <field name="group">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>platform</string>
- </field>
- <field name="parentId">
- <string></string>
- </field>
- <field name="description">
- <string>the /platform group</string>
- </field>
- <field name="label">
- <string>Platform</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>administrators</string>
- </field>
- <field name="parentId">
- <string>/platform</string>
- </field>
- <field name="description">
- <string>the /platform/administrators group</string>
- </field>
- <field name="label">
- <string>Administrators</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>users</string>
- </field>
- <field name="parentId">
- <string>/platform</string>
- </field>
- <field name="description">
- <string>the /platform/users group</string>
- </field>
- <field name="label">
- <string>Users</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>guests</string>
- </field>
- <field name="parentId">
- <string>/platform</string>
- </field>
- <field name="description">
- <string>the /platform/guests group</string>
- </field>
- <field name="label">
- <string>Guests</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>organization</string>
- </field>
- <field name="parentId">
- <string></string>
- </field>
- <field name="description">
- <string>the organization group</string>
- </field>
- <field name="label">
- <string>Organization</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>management</string>
- </field>
- <field name="parentId">
- <string>/organization</string>
- </field>
- <field name="description">
- <string>the /organization/management group</string>
- </field>
- <field name="label">
- <string>Management</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>executive-board</string>
- </field>
- <field name="parentId">
- <string>/organization/management</string>
- </field>
- <field name="description">
- <string>the /organization/management/executive-board group</string>
- </field>
- <field name="label">
- <string>Executive Board</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>human-resources</string>
- </field>
- <field name="parentId">
- <string>/organization/management</string>
- </field>
- <field name="description">
- <string>the /organization/management/human-resource group</string>
- </field>
- <field name="label">
- <string>Human Resources</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>communication</string>
- </field>
- <field name="parentId">
- <string>/organization</string>
- </field>
- <field name="description">
- <string>the /organization/communication group</string>
- </field>
- <field name="label">
- <string>Communication</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>marketing</string>
- </field>
- <field name="parentId">
- <string>/organization/communication</string>
- </field>
- <field name="description">
- <string>the /organization/communication/marketing group</string>
- </field>
- <field name="label">
- <string>Marketing</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>press-and-media</string>
- </field>
- <field name="parentId">
- <string>/organization/communication</string>
- </field>
- <field name="description">
- <string>the /organization/communication/press-and-media group</string>
- </field>
- <field name="label">
- <string>Press and Media</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>operations</string>
- </field>
- <field name="parentId">
- <string>/organization</string>
- </field>
- <field name="description">
- <string>the /organization/operations and media group</string>
- </field>
- <field name="label">
- <string>Operations</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>sales</string>
- </field>
- <field name="parentId">
- <string>/organization/operations</string>
- </field>
- <field name="description">
- <string>the /organization/operations/sales group</string>
- </field>
- <field name="label">
- <string>Sales</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>finances</string>
- </field>
- <field name="parentId">
- <string>/organization/operations</string>
- </field>
- <field name="description">
- <string>the /organization/operations/finances group</string>
- </field>
- <field name="label">
- <string>Finances</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>customers</string>
- </field>
- <field name="parentId">
- <string></string>
- </field>
- <field name="description">
- <string>the /customers group</string>
- </field>
- <field name="label">
- <string>Customers</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
- <field name="name">
- <string>partners</string>
- </field>
- <field name="parentId">
- <string></string>
- </field>
- <field name="description">
- <string>the /partners group</string>
- </field>
- <field name="label">
- <string>Partners</string>
- </field>
- </object>
- </value>
- </collection>
- </field>
-
- <field name="user">
- <collection type="java.util.ArrayList">
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName">
- <string>root</string>
- </field>
- <field name="password">
- <string>exo</string>
- </field>
- <field name="firstName">
- <string>Root</string>
- </field>
- <field name="lastName">
- <string>Root</string>
- </field>
- <field name="email">
- <string>root@localhost</string>
- </field>
- <field name="groups">
- <string>
- *:/platform/administrators,*:/platform/users,
- member:/organization/management/executive-board
- </string>
- </field>
- </object>
- </value>
-
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName">
- <string>john</string>
- </field>
- <field name="password">
- <string>exo</string>
- </field>
- <field name="firstName">
- <string>John</string>
- </field>
- <field name="lastName">
- <string>Anthony</string>
- </field>
- <field name="email">
- <string>john@localhost</string>
- </field>
- <field name="groups">
- <string>
- validator:/platform/administrators,manager:/platform/users,
- *:/organization/management/executive-board,
- manager:/organization/management/executive-board, validator:/organization/management/executive-board
- </string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName">
- <string>marry</string>
- </field>
- <field name="password">
- <string>exo</string>
- </field>
- <field name="firstName">
- <string>Marry</string>
- </field>
- <field name="lastName">
- <string>Kelly</string>
- </field>
- <field name="email">
- <string>marry@localhost</string>
- </field>
- <field name="groups">
- <string>member:/platform/users</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName">
- <string>demo</string>
- </field>
- <field name="password">
- <string>exo</string>
- </field>
- <field name="firstName">
- <string>Demo</string>
- </field>
- <field name="lastName">
- <string>exo</string>
- </field>
- <field name="email">
- <string>demo@localhost</string>
- </field>
- <field name="groups">
- <string>member:/platform/users</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.organization.OrganizationConfig$User">
- <field name="userName">
- <string>james</string>
- </field>
- <field name="password">
- <string>exo</string>
- </field>
- <field name="firstName">
- <string>James</string>
- </field>
- <field name="lastName">
- <string>Anderson</string>
- </field>
- <field name="email">
- <string>james@localhost</string>
- </field>
- <field name="groups">
- <string>*:/organization/management/human-resources,member:/platform/users</string>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </external-component-plugins -->
-
- <component>
- <type>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</type>
- <component-plugins>
- <component-plugin>
- <name>addActions</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.impl.ext.action.AddActionsPlugin</type>
- <description>add actions plugin</description>
- <init-params>
- <object-param>
- <name>actions</name>
- <object type="org.exoplatform.services.jcr.impl.ext.action.AddActionsPlugin$ActionsConfig">
- <field name="actions">
- <collection type="java.util.ArrayList">
- <!-- an example
- <value>
- <object type="org.exoplatform.services.jcr.impl.ext.action.ActionConfiguration">
- <field name="eventTypes">
- <string>addNode</string>
- </field>
- <field name="path">
- <string>/test</string>
- </field>
- <field name="isDeep">
- <boolean>true</boolean>
- </field>
- <field name="nodeTypes">
- <string>nt:unstructured</string>
- </field>
- <field name="workspace">
- <string>production</string>
- </field>
- <field name="actionClassName">
- <string>org.exoplatform.services.jcr.ext.DummyAction</string>
- </field>
- </object>
- </value>
- -->
- <value>
- <object type="org.exoplatform.services.jcr.impl.ext.action.ActionConfiguration">
- <field name="eventTypes">
- <string>addProperty,changeProperty</string>
- </field>
- <field name="path">
- <string>/MetaDataActionTest/testAddContent</string>
- </field>
- <field name="isDeep">
- <boolean>true</boolean>
- </field>
- <field name="nodeTypes">
- <string>nt:resource</string>
- </field>
- <field name="actionClassName">
- <string>org.exoplatform.services.jcr.ext.metadata.AddMetadataAction</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.jcr.impl.ext.action.ActionConfiguration">
- <field name="eventTypes">
- <string>addNode</string>
- </field>
- <field name="path">
- <string>/MetaDataActionTest/testSetMetaData</string>
- </field>
- <field name="isDeep">
- <boolean>false</boolean>
- </field>
- <field name="actionClassName">
- <string>org.exoplatform.services.jcr.ext.metadata.SetDCMetadataAction</string>
- </field>
- </object>
- </value>
- <value>
- <object type="org.exoplatform.services.jcr.impl.ext.action.ActionConfiguration">
- <field name="eventTypes">
- <string>addNode</string>
- </field>
- <field name="path">
- <string>/test</string>
- </field>
- <field name="isDeep">
- <boolean>true</boolean>
- </field>
- <field name="actionClassName">
- <string>org.exoplatform.services.jcr.ext.owner.AddOwneableAction</string>
- </field>
- </object>
- </value>
- </collection>
- </field>
- </object>
- </object-param>
- </init-params>
- </component-plugin>
- </component-plugins>
- </component>
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader</target-component>
- <component-plugin>
- <name>add groovy repo</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.jcr.ext.script.groovy.GroovyScriptAddRepoPlugin</type>
- <init-params>
- <properties-param>
- <name>repo1</name>
- <property name="repository" value="db1"/>
- <property name="workspace" value="ws"/>
- <property name="path" value="/repo"/>
- </properties-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
- <external-component-plugins>
- <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/portal" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr1</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr2" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_backup_only_use_1</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_1" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_backup_only_use_2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_2" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_backup_only_use_3</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_3" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_backup_only_use_5</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_4" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_backup_only_use_6</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_6" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_backup_only_use_7</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_7" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_backup_only_use_8</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_8" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr3</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr3" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr4</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr4" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr5</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr5" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr6</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr6" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr7</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr7" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr8</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr8" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr9</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr9" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr10</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr10" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr11</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr11" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr12</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr12" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr13</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr13" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr14</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr14" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr15</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr15" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr16</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr16" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr17</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr17" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr18</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr18" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr19</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr19" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr77</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr77" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr20</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr20" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr21</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr21" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr22</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr22" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr23</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr23" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr24</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr24" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr25</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr25" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr26</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr26" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
-
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr27</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr27" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_to_rest_repo_1</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_rest_repo_1" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_to_rest_repo_2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_rest_repo_2" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_to_repository_restore_1</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_repository_restore_1" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_to_repository_restore_2</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_repository_restore_2" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_to_repository_restore_3</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_repository_restore_3" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_to_repository_restore_4</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_repository_restore_4" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- <component-plugin>
- <name>bind.datasource</name>
- <set-method>addPlugin</set-method>
- <type>org.exoplatform.services.naming.BindReferencePlugin</type>
- <init-params>
- <value-param>
- <name>bind-name</name>
- <value>jdbcjcr_to_repository_restore_5</value>
- </value-param>
- <value-param>
- <name>class-name</name>
- <value>javax.sql.DataSource</value>
- </value-param>
- <value-param>
- <name>factory</name>
- <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
- </value-param>
- <properties-param>
- <name>ref-addresses</name>
- <description>ref-addresses</description>
- <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
- <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_repository_restore_5" />
- <property name="username" value="sa" />
- <property name="password" value="" />
- </properties-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>
-
-</configuration>
+
+ <!-- component>
+ <key>org.exoplatform.services.database.HibernateService</key>
+ <jmx-name>database:type=HibernateService</jmx-name>
+ <type>org.exoplatform.services.database.impl.HibernateServiceImpl</type>
+ <init-params>
+ <properties-param>
+ <name>hibernate.properties</name>
+ <description>Default Hibernate Service</description>
+ <property name="hibernate.show_sql" value="false" />
+ <property name="hibernate.cglib.use_reflection_optimizer" value="true" />
+ <property name="hibernate.connection.url" value="jdbc:hsqldb:file:../temp/data/exodb" />
+ <property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
+ <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" />
+ <property name="hibernate.c3p0.timeout" value="1800" />
+ <property name="hibernate.c3p0.max_statements" value="50" />
+ </properties-param>
+ </init-params>
+ </component -->
+
+ <component>
+ <key>org.exoplatform.services.database.creator.DBCreator</key>
+ <type>org.exoplatform.services.database.creator.DBCreator</type>
+ <init-params>
+ <properties-param>
+ <name>db-connection</name>
+ <description>database connection properties</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ <properties-param>
+ <name>db-creation</name>
+ <description>database creation properties</description>
+ <property name="scriptPath" value="target/test-classes/test.sql" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.rpc.RPCService</key>
+ <type>org.exoplatform.services.rpc.impl.RPCServiceImpl</type>
+ <init-params>
+ <value-param>
+ <name>jgroups-configuration</name>
+ <value>jar:/conf/standalone/udp-mux.xml</value>
+ </value-param>
+ <value-param>
+ <name>jgroups-cluster-name</name>
+ <value>RPCService-Cluster</value>
+ </value-param>
+ <value-param>
+ <name>jgroups-default-timeout</name>
+ <value>0</value>
+ </value-param>
+ </init-params>
+ </component>
+
+ <component>
+ <key>org.exoplatform.services.jcr.ext.repository.creation.RepositoryCreationService</key>
+ <type>org.exoplatform.services.jcr.ext.repository.creation.RepositoryCreationServiceImpl</type>
+ </component>
+
+ <!-- component>
+ <key>org.exoplatform.services.organization.OrganizationService</key>
+ <type>org.exoplatform.services.organization.hibernate.OrganizationServiceImpl</type>
+ </component>
+
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.database.HibernateService</target-component>
+ <component-plugin>
+ <name>add.hibernate.mapping</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.database.impl.AddHibernateMappingPlugin</type>
+ <init-params>
+ <values-param>
+ <name>hibernate.mapping</name>
+ <value>org/exoplatform/services/organization/impl/UserImpl.hbm.xml</value>
+ <value>org/exoplatform/services/organization/impl/MembershipImpl.hbm.xml</value>
+ <value>org/exoplatform/services/organization/impl/GroupImpl.hbm.xml</value>
+ <value>org/exoplatform/services/organization/impl/MembershipTypeImpl.hbm.xml</value>
+ <value>org/exoplatform/services/organization/impl/UserProfileData.hbm.xml</value>
+ </values-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins -->
+
+ <!-- org service initializer, copied from ECM portal.war -->
+ <!-- external-component-plugins>
+ <target-component>org.exoplatform.services.organization.OrganizationService</target-component>
+ <component-plugin>
+ <name>init.service.listener</name>
+ <set-method>addListenerPlugin</set-method>
+ <type>org.exoplatform.services.organization.OrganizationDatabaseInitializer</type>
+ <description>this listener populate organization data for the first launch</description>
+ <init-params>
+ <value-param>
+ <name>checkDatabaseAlgorithm</name>
+ <description>check database</description>
+ <value>entry</value>
+ </value-param>
+ <value-param>
+ <name>printInformation</name>
+ <description>Print information init database</description>
+ <value>false</value>
+ </value-param>
+ <object-param>
+ <name>configuration</name>
+ <description>description</description>
+ <object type="org.exoplatform.services.organization.OrganizationConfig">
+ <field name="membershipType">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type">
+ <string>manager</string>
+ </field>
+ <field name="description">
+ <string>manager membership type</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type">
+ <string>member</string>
+ </field>
+ <field name="description">
+ <string>member membership type</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$MembershipType">
+ <field name="type">
+ <string>validator</string>
+ </field>
+ <field name="description">
+ <string>validator membership type</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+
+ <field name="group">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>platform</string>
+ </field>
+ <field name="parentId">
+ <string></string>
+ </field>
+ <field name="description">
+ <string>the /platform group</string>
+ </field>
+ <field name="label">
+ <string>Platform</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>administrators</string>
+ </field>
+ <field name="parentId">
+ <string>/platform</string>
+ </field>
+ <field name="description">
+ <string>the /platform/administrators group</string>
+ </field>
+ <field name="label">
+ <string>Administrators</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>users</string>
+ </field>
+ <field name="parentId">
+ <string>/platform</string>
+ </field>
+ <field name="description">
+ <string>the /platform/users group</string>
+ </field>
+ <field name="label">
+ <string>Users</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>guests</string>
+ </field>
+ <field name="parentId">
+ <string>/platform</string>
+ </field>
+ <field name="description">
+ <string>the /platform/guests group</string>
+ </field>
+ <field name="label">
+ <string>Guests</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>organization</string>
+ </field>
+ <field name="parentId">
+ <string></string>
+ </field>
+ <field name="description">
+ <string>the organization group</string>
+ </field>
+ <field name="label">
+ <string>Organization</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>management</string>
+ </field>
+ <field name="parentId">
+ <string>/organization</string>
+ </field>
+ <field name="description">
+ <string>the /organization/management group</string>
+ </field>
+ <field name="label">
+ <string>Management</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>executive-board</string>
+ </field>
+ <field name="parentId">
+ <string>/organization/management</string>
+ </field>
+ <field name="description">
+ <string>the /organization/management/executive-board group</string>
+ </field>
+ <field name="label">
+ <string>Executive Board</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>human-resources</string>
+ </field>
+ <field name="parentId">
+ <string>/organization/management</string>
+ </field>
+ <field name="description">
+ <string>the /organization/management/human-resource group</string>
+ </field>
+ <field name="label">
+ <string>Human Resources</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>communication</string>
+ </field>
+ <field name="parentId">
+ <string>/organization</string>
+ </field>
+ <field name="description">
+ <string>the /organization/communication group</string>
+ </field>
+ <field name="label">
+ <string>Communication</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>marketing</string>
+ </field>
+ <field name="parentId">
+ <string>/organization/communication</string>
+ </field>
+ <field name="description">
+ <string>the /organization/communication/marketing group</string>
+ </field>
+ <field name="label">
+ <string>Marketing</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>press-and-media</string>
+ </field>
+ <field name="parentId">
+ <string>/organization/communication</string>
+ </field>
+ <field name="description">
+ <string>the /organization/communication/press-and-media group</string>
+ </field>
+ <field name="label">
+ <string>Press and Media</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>operations</string>
+ </field>
+ <field name="parentId">
+ <string>/organization</string>
+ </field>
+ <field name="description">
+ <string>the /organization/operations and media group</string>
+ </field>
+ <field name="label">
+ <string>Operations</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>sales</string>
+ </field>
+ <field name="parentId">
+ <string>/organization/operations</string>
+ </field>
+ <field name="description">
+ <string>the /organization/operations/sales group</string>
+ </field>
+ <field name="label">
+ <string>Sales</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>finances</string>
+ </field>
+ <field name="parentId">
+ <string>/organization/operations</string>
+ </field>
+ <field name="description">
+ <string>the /organization/operations/finances group</string>
+ </field>
+ <field name="label">
+ <string>Finances</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>customers</string>
+ </field>
+ <field name="parentId">
+ <string></string>
+ </field>
+ <field name="description">
+ <string>the /customers group</string>
+ </field>
+ <field name="label">
+ <string>Customers</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$Group">
+ <field name="name">
+ <string>partners</string>
+ </field>
+ <field name="parentId">
+ <string></string>
+ </field>
+ <field name="description">
+ <string>the /partners group</string>
+ </field>
+ <field name="label">
+ <string>Partners</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+
+ <field name="user">
+ <collection type="java.util.ArrayList">
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName">
+ <string>root</string>
+ </field>
+ <field name="password">
+ <string>exo</string>
+ </field>
+ <field name="firstName">
+ <string>Root</string>
+ </field>
+ <field name="lastName">
+ <string>Root</string>
+ </field>
+ <field name="email">
+ <string>root@localhost</string>
+ </field>
+ <field name="groups">
+ <string>
+ *:/platform/administrators,*:/platform/users,
+ member:/organization/management/executive-board
+ </string>
+ </field>
+ </object>
+ </value>
+
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName">
+ <string>john</string>
+ </field>
+ <field name="password">
+ <string>exo</string>
+ </field>
+ <field name="firstName">
+ <string>John</string>
+ </field>
+ <field name="lastName">
+ <string>Anthony</string>
+ </field>
+ <field name="email">
+ <string>john@localhost</string>
+ </field>
+ <field name="groups">
+ <string>
+ validator:/platform/administrators,manager:/platform/users,
+ *:/organization/management/executive-board,
+ manager:/organization/management/executive-board, validator:/organization/management/executive-board
+ </string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName">
+ <string>marry</string>
+ </field>
+ <field name="password">
+ <string>exo</string>
+ </field>
+ <field name="firstName">
+ <string>Marry</string>
+ </field>
+ <field name="lastName">
+ <string>Kelly</string>
+ </field>
+ <field name="email">
+ <string>marry@localhost</string>
+ </field>
+ <field name="groups">
+ <string>member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName">
+ <string>demo</string>
+ </field>
+ <field name="password">
+ <string>exo</string>
+ </field>
+ <field name="firstName">
+ <string>Demo</string>
+ </field>
+ <field name="lastName">
+ <string>exo</string>
+ </field>
+ <field name="email">
+ <string>demo@localhost</string>
+ </field>
+ <field name="groups">
+ <string>member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.organization.OrganizationConfig$User">
+ <field name="userName">
+ <string>james</string>
+ </field>
+ <field name="password">
+ <string>exo</string>
+ </field>
+ <field name="firstName">
+ <string>James</string>
+ </field>
+ <field name="lastName">
+ <string>Anderson</string>
+ </field>
+ <field name="email">
+ <string>james@localhost</string>
+ </field>
+ <field name="groups">
+ <string>*:/organization/management/human-resources,member:/platform/users</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins -->
+
+ <component>
+ <type>org.exoplatform.services.jcr.impl.ext.action.SessionActionCatalog</type>
+ <component-plugins>
+ <component-plugin>
+ <name>addActions</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.impl.ext.action.AddActionsPlugin</type>
+ <description>add actions plugin</description>
+ <init-params>
+ <object-param>
+ <name>actions</name>
+ <object type="org.exoplatform.services.jcr.impl.ext.action.AddActionsPlugin$ActionsConfig">
+ <field name="actions">
+ <collection type="java.util.ArrayList">
+ <!-- an example
+ <value>
+ <object type="org.exoplatform.services.jcr.impl.ext.action.ActionConfiguration">
+ <field name="eventTypes">
+ <string>addNode</string>
+ </field>
+ <field name="path">
+ <string>/test</string>
+ </field>
+ <field name="isDeep">
+ <boolean>true</boolean>
+ </field>
+ <field name="nodeTypes">
+ <string>nt:unstructured</string>
+ </field>
+ <field name="workspace">
+ <string>production</string>
+ </field>
+ <field name="actionClassName">
+ <string>org.exoplatform.services.jcr.ext.DummyAction</string>
+ </field>
+ </object>
+ </value>
+ -->
+ <value>
+ <object type="org.exoplatform.services.jcr.impl.ext.action.ActionConfiguration">
+ <field name="eventTypes">
+ <string>addProperty,changeProperty</string>
+ </field>
+ <field name="path">
+ <string>/MetaDataActionTest/testAddContent</string>
+ </field>
+ <field name="isDeep">
+ <boolean>true</boolean>
+ </field>
+ <field name="nodeTypes">
+ <string>nt:resource</string>
+ </field>
+ <field name="actionClassName">
+ <string>org.exoplatform.services.jcr.ext.metadata.AddMetadataAction</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.jcr.impl.ext.action.ActionConfiguration">
+ <field name="eventTypes">
+ <string>addNode</string>
+ </field>
+ <field name="path">
+ <string>/MetaDataActionTest/testSetMetaData</string>
+ </field>
+ <field name="isDeep">
+ <boolean>false</boolean>
+ </field>
+ <field name="actionClassName">
+ <string>org.exoplatform.services.jcr.ext.metadata.SetDCMetadataAction</string>
+ </field>
+ </object>
+ </value>
+ <value>
+ <object type="org.exoplatform.services.jcr.impl.ext.action.ActionConfiguration">
+ <field name="eventTypes">
+ <string>addNode</string>
+ </field>
+ <field name="path">
+ <string>/test</string>
+ </field>
+ <field name="isDeep">
+ <boolean>true</boolean>
+ </field>
+ <field name="actionClassName">
+ <string>org.exoplatform.services.jcr.ext.owner.AddOwneableAction</string>
+ </field>
+ </object>
+ </value>
+ </collection>
+ </field>
+ </object>
+ </object-param>
+ </init-params>
+ </component-plugin>
+ </component-plugins>
+ </component>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.jcr.ext.script.groovy.GroovyScript2RestLoader</target-component>
+ <component-plugin>
+ <name>add groovy repo</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.jcr.ext.script.groovy.GroovyScriptAddRepoPlugin</type>
+ <init-params>
+ <properties-param>
+ <name>repo1</name>
+ <property name="repository" value="db1"/>
+ <property name="workspace" value="ws"/>
+ <property name="path" value="/repo"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+ <external-component-plugins>
+ <target-component>org.exoplatform.services.naming.InitialContextInitializer</target-component>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/portal" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr1</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr2" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_backup_only_use_1</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_1" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_backup_only_use_2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_2" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_backup_only_use_3</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_3" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_backup_only_use_5</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_4" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_backup_only_use_6</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_6" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_backup_only_use_7</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_7" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_backup_only_use_8</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_backup_only_use_8" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr3</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr3" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr4</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr4" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr5</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr5" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr6</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr6" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr7</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr7" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr8</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr8" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr9</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr9" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr10</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr10" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr11</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr11" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr12</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr12" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr13</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr13" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr14</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr14" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr15</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr15" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr16</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr16" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr17</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr17" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr18</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr18" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr19</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr19" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr77</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr77" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr20</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr20" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr21</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr21" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr22</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr22" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr23</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr23" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr24</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr24" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr25</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr25" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr26</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr26" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr27</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jcr27" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_to_rest_repo_1</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_rest_repo_1" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_to_rest_repo_2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_rest_repo_2" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_to_repository_restore_1</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_repository_restore_1" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_to_repository_restore_2</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_repository_restore_2" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_to_repository_restore_3</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_repository_restore_3" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_to_repository_restore_4</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_repository_restore_4" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ <component-plugin>
+ <name>bind.datasource</name>
+ <set-method>addPlugin</set-method>
+ <type>org.exoplatform.services.naming.BindReferencePlugin</type>
+ <init-params>
+ <value-param>
+ <name>bind-name</name>
+ <value>jdbcjcr_to_repository_restore_5</value>
+ </value-param>
+ <value-param>
+ <name>class-name</name>
+ <value>javax.sql.DataSource</value>
+ </value-param>
+ <value-param>
+ <name>factory</name>
+ <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
+ </value-param>
+ <properties-param>
+ <name>ref-addresses</name>
+ <description>ref-addresses</description>
+ <property name="driverClassName" value="org.hsqldb.jdbcDriver" />
+ <property name="url" value="jdbc:hsqldb:file:target/temp/data/jdbcjcr_to_repository_restore_5" />
+ <property name="username" value="sa" />
+ <property name="password" value="" />
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins>
+
+</configuration>
Added: jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone/udp-mux.xml
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone/udp-mux.xml (rev 0)
+++ jcr/trunk/exo.jcr.component.ext/src/test/resources/conf/standalone/udp-mux.xml 2010-11-23 13:08:47 UTC (rev 3522)
@@ -0,0 +1,65 @@
+<config>
+ <UDP
+ singleton_name="JCR-cluster"
+ mcast_addr="${jgroups.udp.mcast_addr:228.10.10.10}"
+ mcast_port="${jgroups.udp.mcast_port:45588}"
+ tos="8"
+ ucast_recv_buf_size="20000000"
+ ucast_send_buf_size="640000"
+ mcast_recv_buf_size="25000000"
+ mcast_send_buf_size="640000"
+ loopback="false"
+ discard_incompatible_packets="true"
+ max_bundle_size="64000"
+ max_bundle_timeout="30"
+ use_incoming_packet_handler="true"
+ ip_ttl="${jgroups.udp.ip_ttl:2}"
+ enable_bundling="false"
+ enable_diagnostics="true"
+ thread_naming_pattern="cl"
+
+ use_concurrent_stack="true"
+
+ thread_pool.enabled="true"
+ thread_pool.min_threads="2"
+ thread_pool.max_threads="8"
+ thread_pool.keep_alive_time="5000"
+ thread_pool.queue_enabled="true"
+ thread_pool.queue_max_size="1000"
+ thread_pool.rejection_policy="discard"
+
+ 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" />
+
+ <PING timeout="2000"
+ num_initial_members="3"/>
+ <MERGE2 max_interval="30000"
+ min_interval="10000"/>
+ <FD_SOCK />
+ <FD timeout="10000" max_tries="5" shun="true" />
+ <VERIFY_SUSPECT timeout="1500" />
+ <BARRIER />
+ <pbcast.NAKACK use_stats_for_retransmission="false"
+ exponential_backoff="150"
+ use_mcast_xmit="true" gc_lag="0"
+ retransmit_timeout="50,300,600,1200"
+ discard_delivered_msgs="true"/>
+ <UNICAST timeout="300,600,1200" />
+ <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"
+ max_bytes="1000000"/>
+ <VIEW_SYNC avg_send_interval="60000" />
+ <pbcast.GMS print_local_addr="true" join_timeout="3000"
+ shun="false"
+ view_bundling="true"/>
+ <FC max_credits="500000"
+ min_threshold="0.20"/>
+ <FRAG2 frag_size="60000" />
+ <!--pbcast.STREAMING_STATE_TRANSFER /-->
+ <pbcast.STATE_TRANSFER />
+ <!-- pbcast.FLUSH /-->
+</config>
Modified: jcr/trunk/exo.jcr.component.ext/src/test/resources/test.policy
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/test/resources/test.policy 2010-11-23 09:32:11 UTC (rev 3521)
+++ jcr/trunk/exo.jcr.component.ext/src/test/resources/test.policy 2010-11-23 13:08:47 UTC (rev 3522)
@@ -1,20 +1,21 @@
-grant codeBase "@MAVEN_REPO@-"{
- permission java.security.AllPermission;
-};
-
-grant codeBase "@MAIN_CLASSES@-"{
- permission java.security.AllPermission;
-};
-
-grant codeBase "@TEST_CLASSES@-"{
- permission java.lang.RuntimePermission "createSystemSession";
- permission java.lang.RuntimePermission "manageRepository";
- permission java.lang.RuntimePermission "invokeInternalAPI";
- permission java.lang.RuntimePermission "modifyConversationState";
-};
-
-grant codeBase "@MAIN_CLASSES@../../../exo.jcr.component.core/-"{
- permission java.security.AllPermission;
-};
-
-
+grant codeBase "@MAVEN_REPO@-"{
+ permission java.security.AllPermission;
+};
+
+grant codeBase "@MAIN_CLASSES@-"{
+ permission java.security.AllPermission;
+};
+
+grant codeBase "@TEST_CLASSES@-"{
+ permission java.lang.RuntimePermission "createSystemSession";
+ permission java.lang.RuntimePermission "manageRepository";
+ permission java.lang.RuntimePermission "invokeInternalAPI";
+ permission java.lang.RuntimePermission "accessRPCService";
+ permission java.lang.RuntimePermission "modifyConversationState";
+};
+
+grant codeBase "@MAIN_CLASSES@../../../exo.jcr.component.core/-"{
+ permission java.security.AllPermission;
+};
+
+
Added: jcr/trunk/exo.jcr.component.ext/src/test/resources/test.sql
===================================================================
13 years, 6 months
exo-jcr SVN: r3521 - in jcr/trunk: applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole and 1 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-11-23 04:32:11 -0500 (Tue, 23 Nov 2010)
New Revision: 3521
Modified:
jcr/trunk/applications/exo.jcr.applications.backupconsole/pom.xml
jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java
jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupConsole.java
jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/ClientTransportImpl.java
jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml
Log:
EXOJCR-1069: Backup console throws NPE if backup agent isn't deployed on server
Modified: jcr/trunk/applications/exo.jcr.applications.backupconsole/pom.xml
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.backupconsole/pom.xml 2010-11-23 09:29:59 UTC (rev 3520)
+++ jcr/trunk/applications/exo.jcr.applications.backupconsole/pom.xml 2010-11-23 09:32:11 UTC (rev 3521)
@@ -62,6 +62,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
+ <scope>runtime</scope>
</dependency>
</dependencies>
<build>
Modified: jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java 2010-11-23 09:29:59 UTC (rev 3520)
+++ jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java 2010-11-23 09:32:11 UTC (rev 3521)
@@ -18,14 +18,6 @@
*/
package org.exoplatform.jcr.backupconsole;
-import java.io.ByteArrayInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-
-import javax.ws.rs.core.Response;
-
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.RepositoryEntry;
import org.exoplatform.services.jcr.config.RepositoryServiceConfiguration;
@@ -55,6 +47,14 @@
import org.jibx.runtime.IUnmarshallingContext;
import org.jibx.runtime.JiBXException;
+import java.io.ByteArrayInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+
+import javax.ws.rs.core.Response;
+
/**
* Created by The eXo Platform SAS. <br/>Date:
*
@@ -323,7 +323,7 @@
+ (info.getWorkspaceName().equals("") ? "" : "\t\tworkspace name : "
+ info.getWorkspaceName() + "\n")
+ "\t\tbackup type : "
- + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\tstarted time : " + info.getStartedTime()
+ "\n" + (info.getFinishedTime().equals("") ? "\n" : "\t\tfinished time : "
+ info.getFinishedTime() + "\n\n"));
@@ -349,7 +349,7 @@
+ (info.getWorkspaceName().equals("") ? "" : "\t\tworkspace name : "
+ info.getWorkspaceName() + "\n")
+ "\t\tbackup type : "
- + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\tfull backup state : " + (info
.getWorkspaceName().equals("") ? getRepositoryBackupToFullState(info.getState())
: getState(info.getState())))
@@ -613,7 +613,8 @@
String result =
"\nThe backup service information : \n" + "\tfull backup type : "
- + info.getFullBackupType() + "\n" + "\tincremetal backup type : "
+ + info.getFullBackupType()
+ + "\n" + "\tincremental backup type : "
+ info.getIncrementalBackupType() + "\n" + "\tbackup log folder : "
+ info.getBackupLogDir() + "\n" + "\tdefault incremental job period : "
+ info.getDefaultIncrementalJobPeriod() + "\n\n";
@@ -680,7 +681,7 @@
+ shortInfo.getRepositoryName()
+ "\n"
+ "\t\tbackup type : "
- + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\tfull backups state : " + getRepositoryBackupToFullState(shortInfo
.getState()))
+ "\n"
@@ -706,7 +707,7 @@
+ shortInfo.getWorkspaceName()
+ "\n"
+ "\t\tbackup type : "
- + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\tfull backup state : " + getState(shortInfo
.getState()))
+ "\n"
@@ -782,7 +783,7 @@
+ shortInfo.getRepositoryName()
+ "\n"
+ "\t\tbackup type : "
- + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\tstarted time : "
+ shortInfo.getStartedTime() + "\n" + (shortInfo.getFinishedTime().equals("") ? "\n"
: "\t\tfinished time : " + shortInfo.getFinishedTime() + "\n"));
@@ -801,7 +802,7 @@
+ shortInfo.getWorkspaceName()
+ "\n"
+ "\t\tbackup type : "
- + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\tstarted time : "
+ shortInfo.getStartedTime() + "\n" + (shortInfo.getFinishedTime().equals("") ? "\n"
: "\t\tfinished time : " + shortInfo.getFinishedTime() + "\n"));
@@ -858,7 +859,7 @@
+ info.getWorkspaceName()
+ "\n"
+ "\t\tbackup type : "
- + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\trestore state : "
+ getRestoreState(info.getState()) + "\n" + "\t\tstarted time : "
+ info.getStartedTime() + "\n" + (info.getFinishedTime().equals("") ? "\n"
@@ -906,7 +907,7 @@
+ info.getRepositoryName()
+ "\n"
+ "\t\tbackup type : "
- + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\trestore state : "
+ getRepositoryRestoreState(info.getState()) + "\n" + "\t\tstarted time : "
+ info.getStartedTime() + "\n" + (info.getFinishedTime().equals("") ? "\n"
Modified: jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupConsole.java
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupConsole.java 2010-11-23 09:29:59 UTC (rev 3520)
+++ jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupConsole.java 2010-11-23 09:32:11 UTC (rev 3521)
@@ -65,7 +65,7 @@
+ " <form auth parm> : form <method> <form path>\n"
+ " <method> : POST or GET\n"
+ " <form path> : /path/path?<paramName1>=<paramValue1>&<paramName2>=<paramValue2>...\n"
- + " Example to <url form authentication> : http://127.0.0.1:8080/portal/rest form POST /portal/login?username=root&password=gtn\n\n"
+ + " Example to <url form authentication> : http://127.0.0.1:8080/portal/rest form POST \"/portal/login?username=root&password=gtn\"\n\n"
+ " <cmd> : start <repo[/ws]> <backup_dir> [<incr>] \n"
+ " stop <backup_id> \n"
Modified: jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/ClientTransportImpl.java
===================================================================
--- jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/ClientTransportImpl.java 2010-11-23 09:29:59 UTC (rev 3520)
+++ jcr/trunk/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/ClientTransportImpl.java 2010-11-23 09:32:11 UTC (rev 3521)
@@ -18,11 +18,6 @@
*/
package org.exoplatform.jcr.backupconsole;
-import java.io.IOException;
-import java.net.URL;
-
-import javax.ws.rs.core.Response;
-
import org.exoplatform.common.http.client.AuthorizationHandler;
import org.exoplatform.common.http.client.AuthorizationInfo;
import org.exoplatform.common.http.client.CookieModule;
@@ -31,6 +26,11 @@
import org.exoplatform.common.http.client.ModuleException;
import org.exoplatform.common.http.client.NVPair;
+import java.io.IOException;
+import java.net.URL;
+
+import javax.ws.rs.core.Response;
+
/**
* Created by The eXo Platform SAS. <br/>Date:
*
@@ -61,14 +61,9 @@
private final String protocol;
/**
- * Is realm get.
- */
- private boolean isRealmGet = false;
-
- /**
* Realm to connection
*/
- private String realm;
+ private String realm = null;
/**
* Form authentication parameters.
@@ -108,7 +103,7 @@
* Get realm by URL.
*
* @param sUrl URL string.
- * @return realm name string.
+ * @return realm name or null.
* @throws IOException transport exception.
* @throws ModuleException ModuleException.
*/
@@ -127,6 +122,10 @@
HTTPResponse resp = connection.Get(url.getFile());
String authHeader = resp.getHeader("WWW-Authenticate");
+ if (authHeader == null)
+ {
+ return null;
+ }
String realm = authHeader.split("=")[1];
realm = realm.substring(1, realm.length() - 1);
@@ -190,10 +189,14 @@
else
{
// basic authorization
- if (!isRealmGet)
+ if (realm == null)
{
realm = getRealm(complURL);
- isRealmGet = true;
+ if (realm == null)
+ {
+ throw new BackupExecuteException(
+ "Can not connect to server using basic authentication. Try to use form authentication.");
+ }
}
connection.addBasicAuthorization(realm, login, password);
@@ -220,7 +223,6 @@
{
throw new BackupExecuteException(e.getMessage(), e);
}
-
}
/**
@@ -273,10 +275,14 @@
else
{
// basic authorization
- if (!isRealmGet)
+ if (realm == null)
{
realm = getRealm(complURL);
- isRealmGet = true;
+ if (realm == null)
+ {
+ throw new BackupExecuteException(
+ "Can not connect to server using basic authentication. Try to use form authentication.");
+ }
}
connection.addBasicAuthorization(realm, login, password);
Modified: jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml
===================================================================
--- jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml 2010-11-23 09:29:59 UTC (rev 3520)
+++ jcr/trunk/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml 2010-11-23 09:32:11 UTC (rev 3521)
@@ -999,7 +999,7 @@
<form auth parm> : form <method> <form path>
<method> : POST or GET
<form path> : /path/path?<paramName1>=<paramValue1>&<paramName2>=<paramValue2>...
- Example to <url form authentication> : http://127.0.0.1:8080/portal/rest form POST /portal/login?username=root&password=gtn
+ Example to <url form authentication> : http://127.0.0.1:8080/portal/rest form POST "/portal/login?username=root&password=gtn"
<cmd> : start <repo[/ws]> <backup_dir> [<incr>]
stop <backup_id>
13 years, 6 months
exo-jcr SVN: r3520 - in jcr/branches/1.12.x: applications/exo.jcr.applications.backupconsole/bin and 2 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-11-23 04:29:59 -0500 (Tue, 23 Nov 2010)
New Revision: 3520
Modified:
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/bin/test_form.sh
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/pom.xml
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupConsole.java
jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/ClientTransportImpl.java
jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml
Log:
JCR-1497: Backup console throws NPE if backup agent isn't deployed on server
Modified: jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/bin/test_form.sh
===================================================================
--- jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/bin/test_form.sh 2010-11-23 09:20:29 UTC (rev 3519)
+++ jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/bin/test_form.sh 2010-11-23 09:29:59 UTC (rev 3520)
@@ -1,6 +1,3 @@
#!/bin/sh
-./jcrbackup.sh http://127.0.0.1:8080/portal/rest form POST "/portal/login?username=root&password=gtn" info
-#!/bin/sh
-
./jcrbackup.sh http://127.0.0.1:8080/portal/rest form POST "/portal/login?username=root&password=gtn" info
\ No newline at end of file
Modified: jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/pom.xml
===================================================================
--- jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/pom.xml 2010-11-23 09:20:29 UTC (rev 3519)
+++ jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/pom.xml 2010-11-23 09:29:59 UTC (rev 3520)
@@ -61,6 +61,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
+ <scope>runtime</scope>
</dependency>
</dependencies>
<build>
Modified: jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java
===================================================================
--- jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java 2010-11-23 09:20:29 UTC (rev 3519)
+++ jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupClientImpl.java 2010-11-23 09:29:59 UTC (rev 3520)
@@ -18,14 +18,6 @@
*/
package org.exoplatform.jcr.backupconsole;
-import java.io.ByteArrayInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-
-import javax.ws.rs.core.Response;
-
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.RepositoryEntry;
import org.exoplatform.services.jcr.config.RepositoryServiceConfiguration;
@@ -55,6 +47,14 @@
import org.jibx.runtime.IUnmarshallingContext;
import org.jibx.runtime.JiBXException;
+import java.io.ByteArrayInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+
+import javax.ws.rs.core.Response;
+
/**
* Created by The eXo Platform SAS. <br/>Date:
*
@@ -323,7 +323,7 @@
+ (info.getWorkspaceName().equals("") ? "" : "\t\tworkspace name : "
+ info.getWorkspaceName() + "\n")
+ "\t\tbackup type : "
- + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\tstarted time : " + info.getStartedTime()
+ "\n" + (info.getFinishedTime().equals("") ? "\n" : "\t\tfinished time : "
+ info.getFinishedTime() + "\n\n"));
@@ -349,7 +349,7 @@
+ (info.getWorkspaceName().equals("") ? "" : "\t\tworkspace name : "
+ info.getWorkspaceName() + "\n")
+ "\t\tbackup type : "
- + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\tfull backup state : " + (info
.getWorkspaceName().equals("") ? getRepositoryBackupToFullState(info.getState())
: getState(info.getState())))
@@ -613,7 +613,8 @@
String result =
"\nThe backup service information : \n" + "\tfull backup type : "
- + info.getFullBackupType() + "\n" + "\tincremetal backup type : "
+ + info.getFullBackupType()
+ + "\n" + "\tincremental backup type : "
+ info.getIncrementalBackupType() + "\n" + "\tbackup log folder : "
+ info.getBackupLogDir() + "\n" + "\tdefault incremental job period : "
+ info.getDefaultIncrementalJobPeriod() + "\n\n";
@@ -680,7 +681,7 @@
+ shortInfo.getRepositoryName()
+ "\n"
+ "\t\tbackup type : "
- + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\tfull backups state : " + getRepositoryBackupToFullState(shortInfo
.getState()))
+ "\n"
@@ -706,7 +707,7 @@
+ shortInfo.getWorkspaceName()
+ "\n"
+ "\t\tbackup type : "
- + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\tfull backup state : " + getState(shortInfo
.getState()))
+ "\n"
@@ -782,7 +783,7 @@
+ shortInfo.getRepositoryName()
+ "\n"
+ "\t\tbackup type : "
- + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\tstarted time : "
+ shortInfo.getStartedTime() + "\n" + (shortInfo.getFinishedTime().equals("") ? "\n"
: "\t\tfinished time : " + shortInfo.getFinishedTime() + "\n"));
@@ -801,7 +802,7 @@
+ shortInfo.getWorkspaceName()
+ "\n"
+ "\t\tbackup type : "
- + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (shortInfo.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\tstarted time : "
+ shortInfo.getStartedTime() + "\n" + (shortInfo.getFinishedTime().equals("") ? "\n"
: "\t\tfinished time : " + shortInfo.getFinishedTime() + "\n"));
@@ -858,7 +859,7 @@
+ info.getWorkspaceName()
+ "\n"
+ "\t\tbackup type : "
- + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\trestore state : "
+ getRestoreState(info.getState()) + "\n" + "\t\tstarted time : "
+ info.getStartedTime() + "\n" + (info.getFinishedTime().equals("") ? "\n"
@@ -906,7 +907,7 @@
+ info.getRepositoryName()
+ "\n"
+ "\t\tbackup type : "
- + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremetal"
+ + (configBean.getBackupType() == BackupManager.FULL_AND_INCREMENTAL ? "full + incremental"
: "full only") + "\n" + "\t\trestore state : "
+ getRepositoryRestoreState(info.getState()) + "\n" + "\t\tstarted time : "
+ info.getStartedTime() + "\n" + (info.getFinishedTime().equals("") ? "\n"
Modified: jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupConsole.java
===================================================================
--- jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupConsole.java 2010-11-23 09:20:29 UTC (rev 3519)
+++ jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/BackupConsole.java 2010-11-23 09:29:59 UTC (rev 3520)
@@ -65,7 +65,7 @@
+ " <form auth parm> : form <method> <form path>\n"
+ " <method> : POST or GET\n"
+ " <form path> : /path/path?<paramName1>=<paramValue1>&<paramName2>=<paramValue2>...\n"
- + " Example to <url form authentication> : http://127.0.0.1:8080/portal/rest form POST /portal/login?username=root&password=gtn\n\n"
+ + " Example to <url form authentication> : http://127.0.0.1:8080/portal/rest form POST \"/portal/login?username=root&password=gtn\"\n\n"
+ " <cmd> : start <repo[/ws]> <backup_dir> [<incr>] \n"
+ " stop <backup_id> \n"
Modified: jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/ClientTransportImpl.java
===================================================================
--- jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/ClientTransportImpl.java 2010-11-23 09:20:29 UTC (rev 3519)
+++ jcr/branches/1.12.x/applications/exo.jcr.applications.backupconsole/src/main/java/org/exoplatform/jcr/backupconsole/ClientTransportImpl.java 2010-11-23 09:29:59 UTC (rev 3520)
@@ -18,11 +18,6 @@
*/
package org.exoplatform.jcr.backupconsole;
-import java.io.IOException;
-import java.net.URL;
-
-import javax.ws.rs.core.Response;
-
import org.exoplatform.common.http.client.AuthorizationHandler;
import org.exoplatform.common.http.client.AuthorizationInfo;
import org.exoplatform.common.http.client.CookieModule;
@@ -31,6 +26,11 @@
import org.exoplatform.common.http.client.ModuleException;
import org.exoplatform.common.http.client.NVPair;
+import java.io.IOException;
+import java.net.URL;
+
+import javax.ws.rs.core.Response;
+
/**
* Created by The eXo Platform SAS. <br/>Date:
*
@@ -61,14 +61,9 @@
private final String protocol;
/**
- * Is realm get.
- */
- private boolean isRealmGet = false;
-
- /**
* Realm to connection
*/
- private String realm;
+ private String realm = null;
/**
* Form authentication parameters.
@@ -108,7 +103,7 @@
* Get realm by URL.
*
* @param sUrl URL string.
- * @return realm name string.
+ * @return realm name or null.
* @throws IOException transport exception.
* @throws ModuleException ModuleException.
*/
@@ -127,6 +122,10 @@
HTTPResponse resp = connection.Get(url.getFile());
String authHeader = resp.getHeader("WWW-Authenticate");
+ if (authHeader == null)
+ {
+ return null;
+ }
String realm = authHeader.split("=")[1];
realm = realm.substring(1, realm.length() - 1);
@@ -190,10 +189,14 @@
else
{
// basic authorization
- if (!isRealmGet)
+ if (realm == null)
{
realm = getRealm(complURL);
- isRealmGet = true;
+ if (realm == null)
+ {
+ throw new BackupExecuteException(
+ "Can not connect to server using basic authentication. Try to use form authentication.");
+ }
}
connection.addBasicAuthorization(realm, login, password);
@@ -220,7 +223,6 @@
{
throw new BackupExecuteException(e.getMessage(), e);
}
-
}
/**
@@ -273,10 +275,14 @@
else
{
// basic authorization
- if (!isRealmGet)
+ if (realm == null)
{
realm = getRealm(complURL);
- isRealmGet = true;
+ if (realm == null)
+ {
+ throw new BackupExecuteException(
+ "Can not connect to server using basic authentication. Try to use form authentication.");
+ }
}
connection.addBasicAuthorization(realm, login, password);
Modified: jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml
===================================================================
--- jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml 2010-11-23 09:20:29 UTC (rev 3519)
+++ jcr/branches/1.12.x/exo.jcr.docs/exo.jcr.docs.developer/en/src/main/docbook/en-US/modules/jcr/backup/backup-client.xml 2010-11-23 09:29:59 UTC (rev 3520)
@@ -999,7 +999,7 @@
<form auth parm> : form <method> <form path>
<method> : POST or GET
<form path> : /path/path?<paramName1>=<paramValue1>&<paramName2>=<paramValue2>...
- Example to <url form authentication> : http://127.0.0.1:8080/portal/rest form POST /portal/login?username=root&password=gtn
+ Example to <url form authentication> : http://127.0.0.1:8080/portal/rest form POST "/portal/login?username=root&password=gtn"
<cmd> : start <repo[/ws]> <backup_dir> [<incr>]
stop <backup_id>
13 years, 6 months
exo-jcr SVN: r3519 - in jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext: backup/impl and 12 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-11-23 04:20:29 -0500 (Tue, 23 Nov 2010)
New Revision: 3519
Modified:
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/BackupChainLog.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryBackupChainLog.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupScheduler.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/IndexCleanHelper.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/ValueStorageCleanHelper.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FileNameProducer.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FullBackupJob.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/bean/BackupConfigBean.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/RemoteWorkspaceInitializationService.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/RemoteWorkspaceInitializer.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/impl/RemoteReceiver.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/impl/RemoteTransmitter.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/impl/RemoteTransportImpl.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/AbstractWorkspaceDataReceiver.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ChangesFile.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/PendingBinaryFile.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ReplicationChannelManager.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ReplicationService.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataTransmitter.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/AbstractFSAccess.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/RecoveryReader.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/RecoverySynchronizer.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/RecoveryWriter.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/backup/BackupCreator.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/storage/RandomChangesFile.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/CopyMoveTestCase.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/NtFileTestCase.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/bandwidth/BandwidthAllocationTestCase.java
jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/concurrent/ConcurrentModificationTestCase.java
Log:
EXOJCR-852: wrap file operation in privileged block
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/BackupChainLog.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/BackupChainLog.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/BackupChainLog.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,17 +18,20 @@
*/
package org.exoplatform.services.jcr.ext.backup;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
+import org.exoplatform.commons.utils.SecurityHelper;
import org.exoplatform.services.jcr.impl.util.JCRDateFormat;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
@@ -101,8 +104,9 @@
try
{
this.finalized = false;
- this.log = new File(logDir.getCanonicalPath() + File.separator + (PREFIX + backupId + SUFFIX));
- this.log.createNewFile();
+ this.log =
+ new File(PrivilegedFileHelper.getCanonicalPath(logDir) + File.separator + (PREFIX + backupId + SUFFIX));
+ PrivilegedFileHelper.createNewFile(this.log);
this.backupId = backupId;
this.config = config;
this.jobEntries = new ArrayList<JobEntryInfo>();
@@ -284,7 +288,7 @@
*/
public String getLogFilePath()
{
- return log.getAbsolutePath();
+ return PrivilegedFileHelper.getAbsolutePath(log);
}
/**
@@ -328,7 +332,8 @@
this.logFile = logFile;
jobEntries = new ArrayList<JobEntryInfo>();
- reader = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream(this.logFile));
+ reader =
+ XMLInputFactory.newInstance().createXMLStreamReader(PrivilegedFileHelper.fileInputStream(this.logFile));
}
public BackupConfig getBackupConfig()
@@ -542,11 +547,44 @@
XMLStreamWriter writer;
- public LogWriter(File logFile) throws FileNotFoundException, XMLStreamException, FactoryConfigurationError
+ public LogWriter(File file) throws FileNotFoundException, XMLStreamException, FactoryConfigurationError
{
- this.logFile = logFile;
+ this.logFile = file;
- writer = XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(this.logFile));
+ try
+ {
+ writer = SecurityHelper.doPriviledgedExceptionAction(new PrivilegedExceptionAction<XMLStreamWriter>()
+ {
+ public XMLStreamWriter run() throws Exception
+ {
+ return XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(logFile));
+ }
+ });
+ }
+ catch (PrivilegedActionException pae)
+ {
+ Throwable cause = pae.getCause();
+ if (cause instanceof FileNotFoundException)
+ {
+ throw (FileNotFoundException)cause;
+ }
+ else if (cause instanceof XMLStreamException)
+ {
+ throw (XMLStreamException)cause;
+ }
+ else if (cause instanceof FactoryConfigurationError)
+ {
+ throw (FactoryConfigurationError)cause;
+ }
+ else if (cause instanceof RuntimeException)
+ {
+ throw (RuntimeException)cause;
+ }
+ else
+ {
+ throw new RuntimeException(cause);
+ }
+ };
writer.writeStartDocument();
writer.writeStartElement("backup-cain-log");
@@ -569,7 +607,7 @@
if (config.getBackupDir() != null)
{
writer.writeStartElement("backup-dir");
- writer.writeCharacters(config.getBackupDir().getAbsolutePath());
+ writer.writeCharacters(PrivilegedFileHelper.getAbsolutePath(config.getBackupDir()));
writer.writeEndElement();
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryBackupChainLog.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryBackupChainLog.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/RepositoryBackupChainLog.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -16,13 +16,20 @@
*/
package org.exoplatform.services.jcr.ext.backup;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
+import org.exoplatform.commons.utils.SecurityHelper;
+import org.exoplatform.services.jcr.impl.util.JCRDateFormat;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.List;
@@ -36,10 +43,6 @@
import javax.xml.stream.XMLStreamWriter;
import javax.xml.stream.events.StartElement;
-import org.exoplatform.services.jcr.impl.util.JCRDateFormat;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-
/**
* Created by The eXo Platform SAS.
*
@@ -59,11 +62,44 @@
XMLStreamWriter writer;
- public LogWriter(File logFile) throws FileNotFoundException, XMLStreamException, FactoryConfigurationError
+ public LogWriter(File file) throws FileNotFoundException, XMLStreamException, FactoryConfigurationError
{
- this.logFile = logFile;
+ this.logFile = file;
- writer = XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(this.logFile));
+ try
+ {
+ writer = SecurityHelper.doPriviledgedExceptionAction(new PrivilegedExceptionAction<XMLStreamWriter>()
+ {
+ public XMLStreamWriter run() throws Exception
+ {
+ return XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(logFile));
+ }
+ });
+ }
+ catch (PrivilegedActionException pae)
+ {
+ Throwable cause = pae.getCause();
+ if (cause instanceof FileNotFoundException)
+ {
+ throw (FileNotFoundException)cause;
+ }
+ else if (cause instanceof XMLStreamException)
+ {
+ throw (XMLStreamException)cause;
+ }
+ else if (cause instanceof FactoryConfigurationError)
+ {
+ throw (FactoryConfigurationError)cause;
+ }
+ else if (cause instanceof RuntimeException)
+ {
+ throw (RuntimeException)cause;
+ }
+ else
+ {
+ throw new RuntimeException(cause);
+ }
+ };
writer.writeStartDocument();
writer.writeStartElement("repository-backup-chain-log");
@@ -118,7 +154,7 @@
if (config.getBackupDir() != null)
{
writer.writeStartElement("backup-dir");
- writer.writeCharacters(config.getBackupDir().getAbsolutePath());
+ writer.writeCharacters(PrivilegedFileHelper.getAbsolutePath(config.getBackupDir()));
writer.writeEndElement();
}
@@ -172,7 +208,7 @@
public LogReader(File logFile) throws FileNotFoundException, XMLStreamException, FactoryConfigurationError
{
this.logFile = logFile;
- reader = XMLInputFactory.newInstance().createXMLStreamReader(new FileInputStream(logFile));
+ reader = XMLInputFactory.newInstance().createXMLStreamReader(PrivilegedFileHelper.fileInputStream(logFile));
}
public void readLogFile() throws XMLStreamException, MalformedURLException, ValueFormatException
@@ -432,8 +468,10 @@
try
{
this.finalized = false;
- this.log = new File(logDirectory.getCanonicalPath() + File.separator + (PREFIX + backupId + SUFFIX));
- this.log.createNewFile();
+ this.log =
+ new File(PrivilegedFileHelper.getCanonicalPath(logDirectory) + File.separator
+ + (PREFIX + backupId + SUFFIX));
+ PrivilegedFileHelper.createNewFile(this.log);
this.backupId = backupId;
this.config = config;
this.startedTime = Calendar.getInstance();
@@ -479,27 +517,32 @@
catch (FileNotFoundException e)
{
throw new BackupOperationException(
- "Can not read RepositoryBackupChainLog from file :" + log.getAbsolutePath(), e);
+"Can not read RepositoryBackupChainLog from file :"
+ + PrivilegedFileHelper.getAbsolutePath(log), e);
}
catch (XMLStreamException e)
{
throw new BackupOperationException(
- "Can not read RepositoryBackupChainLog from file :" + log.getAbsolutePath(), e);
+"Can not read RepositoryBackupChainLog from file :"
+ + PrivilegedFileHelper.getAbsolutePath(log), e);
}
catch (FactoryConfigurationError e)
{
throw new BackupOperationException(
- "Can not read RepositoryBackupChainLog from file :" + log.getAbsolutePath(), e);
+"Can not read RepositoryBackupChainLog from file :"
+ + PrivilegedFileHelper.getAbsolutePath(log), e);
}
catch (MalformedURLException e)
{
throw new BackupOperationException(
- "Can not read RepositoryBackupChainLog from file :" + log.getAbsolutePath(), e);
+"Can not read RepositoryBackupChainLog from file :"
+ + PrivilegedFileHelper.getAbsolutePath(log), e);
}
catch (ValueFormatException e)
{
throw new BackupOperationException(
- "Can not read RepositoryBackupChainLog from file :" + log.getAbsolutePath(), e);
+"Can not read RepositoryBackupChainLog from file :"
+ + PrivilegedFileHelper.getAbsolutePath(log), e);
}
}
@@ -511,7 +554,7 @@
*/
public String getLogFilePath()
{
- return log.getAbsolutePath();
+ return PrivilegedFileHelper.getAbsolutePath(log);
}
/**
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupManagerImpl.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -78,7 +78,6 @@
import java.io.EOFException;
import java.io.File;
import java.io.FileFilter;
-import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -497,7 +496,7 @@
*/
public BackupChainLog[] getBackupsLogs()
{
- File[] cfs = logsDirectory.listFiles(new BackupLogsFilter());
+ File[] cfs = PrivilegedFileHelper.listFiles(logsDirectory, new BackupLogsFilter());
List<BackupChainLog> logs = new ArrayList<BackupChainLog>();
for (int i = 0; i < cfs.length; i++)
{
@@ -510,7 +509,8 @@
}
catch (BackupOperationException e)
{
- log.warn("Log file " + cf.getAbsolutePath() + " is bussy or corrupted. Skipped. " + e, e);
+ log.warn("Log file " + PrivilegedFileHelper.getAbsolutePath(cf) + " is bussy or corrupted. Skipped. " + e,
+ e);
}
}
BackupChainLog[] ls = new BackupChainLog[logs.size()];
@@ -523,7 +523,7 @@
*/
public RepositoryBackupChainLog[] getRepositoryBackupsLogs()
{
- File[] cfs = logsDirectory.listFiles(new RepositoryBackupLogsFilter());
+ File[] cfs = PrivilegedFileHelper.listFiles(logsDirectory, new RepositoryBackupLogsFilter());
List<RepositoryBackupChainLog> logs = new ArrayList<RepositoryBackupChainLog>();
for (int i = 0; i < cfs.length; i++)
{
@@ -536,7 +536,8 @@
}
catch (BackupOperationException e)
{
- log.warn("Log file " + cf.getAbsolutePath() + " is bussy or corrupted. Skipped. " + e, e);
+ log.warn("Log file " + PrivilegedFileHelper.getAbsolutePath(cf) + " is bussy or corrupted. Skipped. " + e,
+ e);
}
}
RepositoryBackupChainLog[] ls = new RepositoryBackupChainLog[logs.size()];
@@ -826,23 +827,23 @@
}
catch (BackupSchedulerException e)
{
- log.error("Can't restore backup scheduler task from file " + task.getAbsolutePath(), e);
+ log.error("Can't restore backup scheduler task from file " + PrivilegedFileHelper.getAbsolutePath(task), e);
}
catch (BackupOperationException e)
{
- log.error("Can't restore backup scheduler task from file " + task.getAbsolutePath(), e);
+ log.error("Can't restore backup scheduler task from file " + PrivilegedFileHelper.getAbsolutePath(task), e);
}
catch (BackupConfigurationException e)
{
- log.error("Can't restore backup scheduler task from file " + task.getAbsolutePath(), e);
+ log.error("Can't restore backup scheduler task from file " + PrivilegedFileHelper.getAbsolutePath(task), e);
}
catch (RepositoryException e)
{
- log.error("Can't restore backup scheduler task from file " + task.getAbsolutePath(), e);
+ log.error("Can't restore backup scheduler task from file " + PrivilegedFileHelper.getAbsolutePath(task), e);
}
catch (RepositoryConfigurationException e)
{
- log.error("Can't restore backup scheduler task from file " + task.getAbsolutePath(), e);
+ log.error("Can't restore backup scheduler task from file " + PrivilegedFileHelper.getAbsolutePath(task), e);
}
}
}
@@ -870,7 +871,7 @@
RepositoryImpl defRep = (RepositoryImpl)repoService.getRepository(repositoryName);
- defRep.importWorkspace(workspaceEntry.getName(), new FileInputStream(pathBackupFile));
+ defRep.importWorkspace(workspaceEntry.getName(), PrivilegedFileHelper.fileInputStream(pathBackupFile));
}
private void fullRestoreOverInitializer(String pathBackupFile, String repositoryName, WorkspaceEntry workspaceEntry)
@@ -915,7 +916,7 @@
try
{
backupFile = new File(pathBackupFile);
- ois = new ObjectInputStream(new FileInputStream(backupFile));
+ ois = new ObjectInputStream(PrivilegedFileHelper.fileInputStream(backupFile));
while (true)
{
@@ -1085,7 +1086,7 @@
byte[] buf = new byte[bufferSize];
File tempFile = SpoolFile.createTempFile("" + System.currentTimeMillis(), ".stmp", tempDir);
- FileOutputStream fos = new FileOutputStream(tempFile);
+ FileOutputStream fos = PrivilegedFileHelper.fileOutputStream(tempFile);
long readBytes = fileSize;
while (readBytes > 0)
@@ -1557,7 +1558,7 @@
File dir =
new File(config.getBackupDir() + File.separator + "repository_" + config.getRepository() + "_backup_"
+ System.currentTimeMillis());
- dir.mkdir();
+ PrivilegedFileHelper.mkdirs(dir);
config.setBackupDir(dir);
RepositoryBackupChain repositoryBackupChain =
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupScheduler.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupScheduler.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/BackupScheduler.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.services.jcr.ext.backup.impl;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
+import org.exoplatform.commons.utils.SecurityHelper;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.ext.backup.BackupChain;
import org.exoplatform.services.jcr.ext.backup.BackupConfig;
@@ -36,6 +38,8 @@
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.net.MalformedURLException;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -192,7 +196,7 @@
}
}
- if (_backupLog.exists())
+ if (PrivilegedFileHelper.exists(_backupLog))
{
// this.backupLog = _backupLog;
this.startTime = _startTime;
@@ -202,23 +206,24 @@
}
else
throw new BackupSchedulerException(
- "Scheduler task skipped due to the error. Backup log file not exists " + _backupLog.getAbsolutePath()
- + ". Task file " + taskFile.getAbsolutePath());
+ "Scheduler task skipped due to the error. Backup log file not exists "
+ + PrivilegedFileHelper.getAbsolutePath(_backupLog) + ". Task file "
+ + PrivilegedFileHelper.getAbsolutePath(taskFile));
}
else
throw new BackupSchedulerException("Scheduler task skipped due to bad configured task file "
- + taskFile.getAbsolutePath() + ". File doesn't contains configuration line.");
+ + PrivilegedFileHelper.getAbsolutePath(taskFile) + ". File doesn't contains configuration line.");
}
@Deprecated
File save_old(File taskFile) throws IOException
{
- // File taskFile = new File(backupLog.getAbsolutePath() + ".task");
- if (!taskFile.exists())
+ // File taskFile = new File(PrivilegedFileHelper.getAbsolutePath(backupLog) + ".task");
+ if (!PrivilegedFileHelper.exists(taskFile))
{
FileWriter fw = new FileWriter(taskFile);
fw.append("LogPath,StartTime,StopTime,ChainPeriod,IncrPeriod\n");
- fw.append(taskFile.getAbsolutePath() + "," + datef.format(startTime) + ","
+ fw.append(PrivilegedFileHelper.getAbsolutePath(taskFile) + "," + datef.format(startTime) + ","
+ (stopTime != null ? datef.format(stopTime) : "null") + "," + chainPeriod + "," + incrPeriod);
fw.close();
return taskFile;
@@ -236,11 +241,45 @@
final XMLStreamWriter writer;
- TaskConfigWriter(File logFile) throws FileNotFoundException, XMLStreamException, FactoryConfigurationError
+ TaskConfigWriter(final File logFile) throws FileNotFoundException, XMLStreamException,
+ FactoryConfigurationError
{
- this.logFile = new FileOutputStream(logFile);
+ this.logFile = PrivilegedFileHelper.fileOutputStream(logFile);
- writer = XMLOutputFactory.newInstance().createXMLStreamWriter(this.logFile);
+ try
+ {
+ writer = SecurityHelper.doPriviledgedExceptionAction(new PrivilegedExceptionAction<XMLStreamWriter>()
+ {
+ public XMLStreamWriter run() throws Exception
+ {
+ return XMLOutputFactory.newInstance().createXMLStreamWriter(new FileOutputStream(logFile));
+ }
+ });
+ }
+ catch (PrivilegedActionException pae)
+ {
+ Throwable cause = pae.getCause();
+ if (cause instanceof FileNotFoundException)
+ {
+ throw (FileNotFoundException)cause;
+ }
+ else if (cause instanceof XMLStreamException)
+ {
+ throw (XMLStreamException)cause;
+ }
+ else if (cause instanceof FactoryConfigurationError)
+ {
+ throw (FactoryConfigurationError)cause;
+ }
+ else if (cause instanceof RuntimeException)
+ {
+ throw (RuntimeException)cause;
+ }
+ else
+ {
+ throw new RuntimeException(cause);
+ }
+ };
writer.writeStartDocument();
writer.writeStartElement("backup-task-config");
@@ -262,7 +301,7 @@
if (config.getBackupDir() != null)
{
writer.writeStartElement("backup-dir");
- writer.writeCharacters(config.getBackupDir().getAbsolutePath());
+ writer.writeCharacters(PrivilegedFileHelper.getAbsolutePath(config.getBackupDir()));
writer.writeEndElement();
}
@@ -345,7 +384,7 @@
TaskConfigReader(File logFile) throws FileNotFoundException, XMLStreamException, FactoryConfigurationError
{
- this.logFile = new FileInputStream(logFile);
+ this.logFile = PrivilegedFileHelper.fileInputStream(logFile);
this.reader = XMLInputFactory.newInstance().createXMLStreamReader(this.logFile);
}
@@ -671,13 +710,13 @@
{
// remove task file config
File taskFile =
- new File(backup.getLogsDirectory().getAbsolutePath() + File.separator + config.getRepository() + "-"
- + config.getWorkspace() + ".task");
- if (taskFile.exists())
+ new File(PrivilegedFileHelper.getAbsolutePath(backup.getLogsDirectory()) + File.separator
+ + config.getRepository() + "-" + config.getWorkspace() + ".task");
+ if (PrivilegedFileHelper.exists(taskFile))
{
- taskFile.delete();
+ PrivilegedFileHelper.delete(taskFile);
if (log.isDebugEnabled())
- log.debug("Remove scheduler task " + taskFile.getAbsolutePath());
+ log.debug("Remove scheduler task " + PrivilegedFileHelper.getAbsolutePath(taskFile));
}
}
@@ -821,6 +860,7 @@
{
Runtime.getRuntime().addShutdownHook(new Thread()
{
+ @Override
public void run()
{
timer.cancel();
@@ -876,19 +916,23 @@
}
catch (IOException e)
{
- throw new BackupSchedulerException("Can't restore scheduler from task file " + taskFile.getAbsolutePath(), e);
+ throw new BackupSchedulerException("Can't restore scheduler from task file "
+ + PrivilegedFileHelper.getAbsolutePath(taskFile), e);
}
catch (ParseException e)
{
- throw new BackupSchedulerException("Can't restore scheduler from task file " + taskFile.getAbsolutePath(), e);
+ throw new BackupSchedulerException("Can't restore scheduler from task file "
+ + PrivilegedFileHelper.getAbsolutePath(taskFile), e);
}
catch (XMLStreamException e)
{
- throw new BackupSchedulerException("Can't restore scheduler from task file " + taskFile.getAbsolutePath(), e);
+ throw new BackupSchedulerException("Can't restore scheduler from task file "
+ + PrivilegedFileHelper.getAbsolutePath(taskFile), e);
}
catch (FactoryConfigurationError e)
{
- throw new BackupSchedulerException("Can't restore scheduler from task file " + taskFile.getAbsolutePath(), e);
+ throw new BackupSchedulerException("Can't restore scheduler from task file "
+ + PrivilegedFileHelper.getAbsolutePath(taskFile), e);
}
}
@@ -1019,13 +1063,16 @@
TaskConfig tc = new TaskConfig(config, startTime, stopTime, chainPeriod, incrementalPeriod);
try
{
- // backup.getLogsDirectory().getAbsolutePath()
+ // PrivilegedFileHelper.getAbsolutePath(backup.getLogsDirectory())
File taskFile =
- new File(backup.getLogsDirectory().getAbsolutePath() + File.separator + config.getRepository() + "-"
- + config.getWorkspace() + ".task");
- if (taskFile.exists())
+ new File(PrivilegedFileHelper.getAbsolutePath(backup.getLogsDirectory()) + File.separator
+ + config.getRepository() + "-" + config.getWorkspace() + ".task");
+
+ if (PrivilegedFileHelper.exists(taskFile))
+ {
throw new BackupSchedulerException("Task for repository '" + config.getRepository() + "' workspace '"
- + config.getWorkspace() + "' already exists. File " + taskFile.getAbsolutePath());
+ + config.getWorkspace() + "' already exists. File " + PrivilegedFileHelper.getAbsolutePath(taskFile));
+ }
tc.save(taskFile); // save task config
}
catch (IOException e)
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/IndexCleanHelper.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/IndexCleanHelper.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/IndexCleanHelper.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -16,6 +16,7 @@
*/
package org.exoplatform.services.jcr.ext.backup.impl;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.config.QueryHandlerParams;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.WorkspaceEntry;
@@ -60,23 +61,23 @@
*/
private void removeFolder(File dir) throws IOException
{
- if (dir.isDirectory())
+ if (PrivilegedFileHelper.isDirectory(dir))
{
- for (File subFile : dir.listFiles())
+ for (File subFile : PrivilegedFileHelper.listFiles(dir))
{
removeFolder(subFile);
}
- if (!dir.delete())
+ if (!PrivilegedFileHelper.delete(dir))
{
- throw new IOException("Index folder was not deleted : " + dir.getCanonicalPath());
+ throw new IOException("Index folder was not deleted : " + PrivilegedFileHelper.getCanonicalPath(dir));
}
}
else
{
- if (!dir.delete())
+ if (!PrivilegedFileHelper.delete(dir))
{
- throw new IOException("Index file was not deleted : " + dir.getCanonicalPath());
+ throw new IOException("Index file was not deleted : " + PrivilegedFileHelper.getCanonicalPath(dir));
}
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/PendingChangesLog.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.backup.impl;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.commons.utils.PrivilegedSystemHelper;
import org.exoplatform.services.jcr.dataflow.ItemState;
import org.exoplatform.services.jcr.dataflow.TransactionChangesLog;
@@ -470,7 +471,7 @@
File f = SpoolFile.createTempFile("tempFile" + IdGenerator.generate(), ".tmp", tempDir);
this.getListFile().add(f);
- this.getListRandomAccessFiles().add(new RandomAccessFile(f, "rw"));
+ this.getListRandomAccessFiles().add(PrivilegedFileHelper.randomAccessFile(f, "rw"));
}
@@ -494,8 +495,10 @@
ValueData vd = (propertyData.getValues().get(listFixupStream.get(i).getValueDataId()));
// re-init the value
- propertyData.getValues().set(listFixupStream.get(i).getValueDataId(),
- new StreamPersistedValueData(vd.getOrderNumber(), new SpoolFile(listFile.get(i).getAbsolutePath())));
+ propertyData.getValues().set(
+ listFixupStream.get(i).getValueDataId(),
+ new StreamPersistedValueData(vd.getOrderNumber(), new SpoolFile(PrivilegedFileHelper
+ .getAbsolutePath(listFile.get(i)))));
}
if (listRandomAccessFile != null)
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/ValueStorageCleanHelper.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/ValueStorageCleanHelper.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/ValueStorageCleanHelper.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -16,6 +16,7 @@
*/
package org.exoplatform.services.jcr.ext.backup.impl;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.config.ContainerEntry;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.ValueStorageEntry;
@@ -64,23 +65,24 @@
*/
private void removeFolder(File dir) throws IOException
{
- if (dir.isDirectory())
+ if (PrivilegedFileHelper.isDirectory(dir))
{
- for (File subFile : dir.listFiles())
+ for (File subFile : PrivilegedFileHelper.listFiles(dir))
{
removeFolder(subFile);
}
- if (!dir.delete())
+ if (!PrivilegedFileHelper.delete(dir))
{
- throw new IOException("Value storage folder was not deleted : " + dir.getCanonicalPath());
+ throw new IOException("Value storage folder was not deleted : "
+ + PrivilegedFileHelper.getCanonicalPath(dir));
}
}
else
{
- if (!dir.delete())
+ if (!PrivilegedFileHelper.delete(dir))
{
- throw new IOException("Value storage file was not deleted : " + dir.getCanonicalPath());
+ throw new IOException("Value storage file was not deleted : " + PrivilegedFileHelper.getCanonicalPath(dir));
}
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FileNameProducer.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FileNameProducer.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FileNameProducer.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.services.jcr.ext.backup.impl.fs;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
+
import java.io.File;
import java.io.IOException;
import java.util.Calendar;
@@ -67,13 +69,15 @@
backupSetDir = new File(serviceDir + File.separator + backupSetName + sTime);
- if (!backupSetDir.exists())
- backupSetDir.mkdirs();
+ if (!PrivilegedFileHelper.exists(backupSetDir))
+ {
+ PrivilegedFileHelper.mkdirs(backupSetDir);
+ }
String sNextName = generateName();
nextFile = new File(backupSetDir.getAbsoluteFile() + File.separator + sNextName);
- nextFile.createNewFile();
+ PrivilegedFileHelper.createNewFile(nextFile);
}
catch (IOException e)
{
@@ -104,7 +108,7 @@
private String getNextSufix()
{
- String[] fileList = backupSetDir.list();
+ String[] fileList = PrivilegedFileHelper.list(backupSetDir);
int sufix = 0;
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FullBackupJob.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FullBackupJob.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/FullBackupJob.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.backup.impl.fs;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.core.ManageableRepository;
import org.exoplatform.services.jcr.ext.backup.BackupConfig;
import org.exoplatform.services.jcr.ext.backup.impl.AbstractFullBackupJob;
@@ -44,14 +45,16 @@
private String pathBackupFile;
+ @Override
protected URL createStorage() throws FileNotFoundException, IOException
{
FileNameProducer fnp =
- new FileNameProducer(config.getRepository(), config.getWorkspace(), config.getBackupDir().getAbsolutePath(),
+ new FileNameProducer(config.getRepository(), config.getWorkspace(),
+ PrivilegedFileHelper.getAbsolutePath(config.getBackupDir()),
super.timeStamp, true);
- return new URL("file:" + fnp.getNextFile().getAbsolutePath());
+ return new URL("file:" + PrivilegedFileHelper.getAbsolutePath(fnp.getNextFile()));
}
public void init(ManageableRepository repository, String workspaceName, BackupConfig config, Calendar timeStamp)
@@ -89,7 +92,7 @@
try
{
notifyListeners();
- FileOutputStream fos = new FileOutputStream(pathBackupFile);
+ FileOutputStream fos = PrivilegedFileHelper.fileOutputStream(pathBackupFile);
session.exportWorkspaceSystemView(fos, false, false);
}
finally
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/impl/fs/IncrementalBackupJob.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.backup.impl.fs;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.core.ManageableRepository;
import org.exoplatform.services.jcr.dataflow.ChangesLogIterator;
import org.exoplatform.services.jcr.dataflow.ItemStateChangesLog;
@@ -94,12 +95,12 @@
protected URL createStorage() throws FileNotFoundException, IOException
{
FileNameProducer fnp =
- new FileNameProducer(config.getRepository(), config.getWorkspace(), config.getBackupDir().getAbsolutePath(),
- super.timeStamp, false);
+ new FileNameProducer(config.getRepository(), config.getWorkspace(),
+ PrivilegedFileHelper.getAbsolutePath(config.getBackupDir()), super.timeStamp, false);
File backupFileData = fnp.getNextFile();
- oosFileData = new ObjectOutputStream(new FileOutputStream(backupFileData));
+ oosFileData = new ObjectOutputStream(PrivilegedFileHelper.fileOutputStream(backupFileData));
return new URL("file:" + backupFileData.getAbsoluteFile());
}
@@ -152,10 +153,10 @@
for (int i = 0; i < listInputList.size(); i++)
{
File tempFile = getAsFile(listInputList.get(i));
- FileInputStream fis = new FileInputStream(tempFile);
+ FileInputStream fis = PrivilegedFileHelper.fileInputStream(tempFile);
// write file size
- out.writeLong(tempFile.length());
+ out.writeLong(PrivilegedFileHelper.length(tempFile));
// write file content
writeContent(fis, out);
@@ -180,8 +181,8 @@
{
byte[] buf = new byte[1024 * 20];
- File tempFile = File.createTempFile("" + System.currentTimeMillis(), "" + System.nanoTime());
- FileOutputStream fos = new FileOutputStream(tempFile);
+ File tempFile = PrivilegedFileHelper.createTempFile("" + System.currentTimeMillis(), "" + System.nanoTime());
+ FileOutputStream fos = PrivilegedFileHelper.fileOutputStream(tempFile);
int len;
while ((len = is.read(buf)) > 0)
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/HTTPBackupAgent.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,26 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.backup.server;
-import java.io.File;
-import java.io.FilenameFilter;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.annotation.security.RolesAllowed;
-import javax.jcr.LoginException;
-import javax.jcr.NoSuchWorkspaceException;
-import javax.jcr.RepositoryException;
-import javax.jcr.Session;
-import javax.ws.rs.Consumes;
-import javax.ws.rs.GET;
-import javax.ws.rs.POST;
-import javax.ws.rs.Path;
-import javax.ws.rs.PathParam;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.CacheControl;
-import javax.ws.rs.core.MediaType;
-import javax.ws.rs.core.Response;
-
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.RepositoryService;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.RepositoryEntry;
@@ -68,6 +49,26 @@
import org.exoplatform.services.log.Log;
import org.exoplatform.services.rest.resource.ResourceContainer;
+import java.io.File;
+import java.io.FilenameFilter;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.annotation.security.RolesAllowed;
+import javax.jcr.LoginException;
+import javax.jcr.NoSuchWorkspaceException;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.CacheControl;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
/**
* Created by The eXo Platform SAS.
*
@@ -312,8 +313,9 @@
try
{
File backupDir = new File(bConfigBeen.getBackupDir());
- if (!backupDir.exists())
- throw new BackupDirNotFoundException("The backup folder not exists : " + backupDir.getAbsolutePath());
+ if (!PrivilegedFileHelper.exists(backupDir))
+ throw new BackupDirNotFoundException("The backup folder not exists : "
+ + PrivilegedFileHelper.getAbsolutePath(backupDir));
BackupConfig config = new BackupConfig();
config.setBackupType(bConfigBeen.getBackupType());
@@ -411,9 +413,10 @@
try
{
File backupDir = new File(bConfigBeen.getBackupDir());
- if (!backupDir.exists())
+ if (!PrivilegedFileHelper.exists(backupDir))
{
- throw new BackupDirNotFoundException("The backup folder not exists : " + backupDir.getAbsolutePath());
+ throw new BackupDirNotFoundException("The backup folder not exists : "
+ + PrivilegedFileHelper.getAbsolutePath(backupDir));
}
RepositoryBackupConfig config = new RepositoryBackupConfig();
@@ -876,7 +879,8 @@
{
BackupServiceInfoBean infoBeen =
new BackupServiceInfoBean(backupManager.getFullBackupType(), backupManager.getIncrementalBackupType(),
- backupManager.getBackupDirectory().getAbsolutePath(), backupManager.getDefaultIncrementalJobPeriod());
+ PrivilegedFileHelper.getAbsolutePath(backupManager.getBackupDirectory()),
+ backupManager.getDefaultIncrementalJobPeriod());
return Response.ok(infoBeen).cacheControl(noCache).build();
}
@@ -1747,7 +1751,7 @@
}
};
- File[] files = backupManager.getBackupDirectory().listFiles(backupLogsFilter);
+ File[] files = PrivilegedFileHelper.listFiles(backupManager.getBackupDirectory(), backupLogsFilter);
if (files.length != 0)
for (File f : files)
@@ -1775,7 +1779,7 @@
}
};
- File[] files = backupManager.getBackupDirectory().listFiles(backupLogsFilter);
+ File[] files = PrivilegedFileHelper.listFiles(backupManager.getBackupDirectory(), backupLogsFilter);
if (files.length != 0)
for (File f : files)
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/bean/BackupConfigBean.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/bean/BackupConfigBean.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/backup/server/bean/BackupConfigBean.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.backup.server.bean;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.ext.backup.BackupConfig;
import org.exoplatform.services.jcr.ext.backup.RepositoryBackupConfig;
import org.exoplatform.services.jcr.ext.backup.server.bean.response.BackupJobConfig;
@@ -131,7 +132,8 @@
*/
public BackupConfigBean(BackupConfig config)
{
- this(config.getBackupType(), config.getBackupDir().getAbsolutePath(), config.getIncrementalJobPeriod());
+ this(config.getBackupType(), PrivilegedFileHelper.getAbsolutePath(config.getBackupDir()), config
+ .getIncrementalJobPeriod());
this.incrementalRepetitionNumber = config.getIncrementalJobNumber();
}
@@ -143,7 +145,8 @@
*/
public BackupConfigBean(RepositoryBackupConfig config)
{
- this(config.getBackupType(), config.getBackupDir().getAbsolutePath(), config.getIncrementalJobPeriod());
+ this(config.getBackupType(), PrivilegedFileHelper.getAbsolutePath(config.getBackupDir()), config
+ .getIncrementalJobPeriod());
this.incrementalRepetitionNumber = config.getIncrementalJobNumber();
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/RemoteWorkspaceInitializationService.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/RemoteWorkspaceInitializationService.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/RemoteWorkspaceInitializationService.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.initializer;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.container.xml.PropertiesParam;
import org.exoplatform.services.jcr.RepositoryService;
@@ -193,8 +194,10 @@
String tempD = pps.getProperty("temp-dir");
tempDir = new File(tempD);
- if (!tempDir.exists())
- tempDir.mkdirs();
+ if (!PrivilegedFileHelper.exists(tempDir))
+ {
+ PrivilegedFileHelper.mkdirs(tempDir);
+ }
log.info("RemoteWorkspaceInitializerService");
}
@@ -396,6 +399,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void run()
{
try
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/RemoteWorkspaceInitializer.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/RemoteWorkspaceInitializer.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/RemoteWorkspaceInitializer.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.initializer;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.services.jcr.access.AccessManager;
@@ -73,7 +74,7 @@
throw new RepositoryException("Can not get remote workspace data :" + e.getMessage(), e);
}
- this.restorePath = f.getAbsolutePath();
+ this.restorePath = PrivilegedFileHelper.getAbsolutePath(f);
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/impl/RemoteReceiver.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/impl/RemoteReceiver.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/impl/RemoteReceiver.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.initializer.impl;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.ext.initializer.RemoteWorkspaceInitializationException;
import org.exoplatform.services.jcr.ext.replication.storage.IncomeDataContext;
import org.exoplatform.services.jcr.ext.replication.storage.Member;
@@ -117,10 +118,12 @@
RandomChangesFile changesFile;
try
{
- File subDir = new File(tempDir.getCanonicalPath() + File.separator + System.currentTimeMillis());
- subDir.mkdirs();
+ File subDir =
+ new File(PrivilegedFileHelper.getCanonicalPath(tempDir) + File.separator
+ + System.currentTimeMillis());
+ PrivilegedFileHelper.mkdirs(subDir);
- File wdFile = File.createTempFile("wdFile", ".0", subDir);
+ File wdFile = PrivilegedFileHelper.createTempFile("wdFile", ".0", subDir);
changesFile = new RandomChangesFile(wdFile, wdPacket.getCRC(), 1, new ResourcesHolder());
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/impl/RemoteTransmitter.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/impl/RemoteTransmitter.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/impl/RemoteTransmitter.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.initializer.impl;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.ext.replication.transport.AbstractPacket;
import org.exoplatform.services.jcr.ext.replication.transport.ChannelManager;
import org.exoplatform.services.jcr.ext.replication.transport.MemberAddress;
@@ -25,7 +26,6 @@
import org.exoplatform.services.log.Log;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -77,10 +77,10 @@
protected void sendChangesLogFile(MemberAddress destinationAddress, File file, byte[] checkSum) throws IOException
{
if (log.isDebugEnabled())
- log.debug("Begin send : " + file.length());
+ log.debug("Begin send : " + PrivilegedFileHelper.length(file));
- InputStream in = new FileInputStream(file);
- long totalPacketCount = getPacketCount(file.length(), AbstractPacket.MAX_PACKET_SIZE);
+ InputStream in = PrivilegedFileHelper.fileInputStream(file);
+ long totalPacketCount = getPacketCount(PrivilegedFileHelper.length(file), AbstractPacket.MAX_PACKET_SIZE);
try
{
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/impl/RemoteTransportImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/impl/RemoteTransportImpl.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/initializer/impl/RemoteTransportImpl.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.initializer.impl;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.ext.initializer.NoMemberToSendException;
import org.exoplatform.services.jcr.ext.initializer.RemoteTransport;
import org.exoplatform.services.jcr.ext.initializer.RemoteWorkspaceInitializationException;
@@ -26,7 +27,6 @@
import org.exoplatform.services.jcr.ext.replication.transport.ChannelManager;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.MessageDigest;
@@ -175,7 +175,7 @@
NoMemberToSendException
{
- if (!workspaceData.exists())
+ if (!PrivilegedFileHelper.exists(workspaceData))
throw new RemoteWorkspaceInitializationException("The file with workspace data not exists.");
byte[] crc;
@@ -241,9 +241,9 @@
private byte[] getCheckSum(File f) throws NoSuchAlgorithmException, IOException
{
MessageDigest digest = MessageDigest.getInstance("MD5");
- InputStream in = new FileInputStream(f);
+ InputStream in = PrivilegedFileHelper.fileInputStream(f);
- long length = f.length();
+ long length = PrivilegedFileHelper.length(f);
byte[] buff = new byte[BUFFER_SIZE];
for (; length >= BUFFER_SIZE; length -= BUFFER_SIZE)
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/AbstractWorkspaceDataReceiver.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/AbstractWorkspaceDataReceiver.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/AbstractWorkspaceDataReceiver.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.replication;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.dataflow.ChangesLogIterator;
import org.exoplatform.services.jcr.dataflow.ItemDataKeeper;
@@ -260,7 +261,7 @@
saveChangesLog(chf, packet.getIdentifier());
// remove
- if (!chf.getFile().delete())
+ if (!PrivilegedFileHelper.delete(chf.getFile()))
fileCleaner.addFile(chf.getFile());
mapPendingBinaryFile.remove(packet.getIdentifier());
@@ -316,11 +317,12 @@
private void saveChangesLog(ChangesFile fileDescriptor, String identifire) throws Exception
{
TransactionChangesLog transactionChangesLog =
- recoveryManager.getRecoveryReader().getChangesLog(fileDescriptor.getFile().getAbsolutePath());
+ recoveryManager.getRecoveryReader().getChangesLog(
+ PrivilegedFileHelper.getAbsolutePath(fileDescriptor.getFile()));
if (log.isDebugEnabled())
{
- log.debug("Save to JCR : " + fileDescriptor.getFile().getAbsolutePath());
+ log.debug("Save to JCR : " + PrivilegedFileHelper.getAbsolutePath(fileDescriptor.getFile()));
log.debug("SystemID : " + transactionChangesLog.getSystemId());
}
@@ -335,6 +337,6 @@
}
}
- this.receive((ItemStateChangesLog)transactionChangesLog, identifire);
+ this.receive(transactionChangesLog, identifire);
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ChangesFile.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ChangesFile.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ChangesFile.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.services.jcr.ext.replication;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
+
import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;
@@ -115,7 +117,7 @@
{
if (randomAccessFile == null)
{
- randomAccessFile = new RandomAccessFile(file, "rw");
+ randomAccessFile = PrivilegedFileHelper.randomAccessFile(file, "rw");
}
randomAccessFile.seek(offset);
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/PendingBinaryFile.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/PendingBinaryFile.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/PendingBinaryFile.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.replication;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
@@ -104,7 +105,7 @@
public ChangesFile addChangesFile(String ownerName, String fileName, String systemId, long totalPacketCount)
throws IOException
{
- File f = File.createTempFile(fileName, "");
+ File f = PrivilegedFileHelper.createTempFile(fileName, "");
ChangesFile fileDescriptor = new ChangesFile(f, systemId, totalPacketCount);
HashMap<String, ChangesFile> fileMap;
@@ -168,7 +169,7 @@
{
log.debug("\n\nList has been sorted :\n");
for (ChangesFile fd : fileDescriptorhList)
- log.debug(fd.getFile().getAbsolutePath());
+ log.debug(PrivilegedFileHelper.getAbsolutePath(fd.getFile()));
}
return fileDescriptorhList;
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ReplicationChannelManager.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ReplicationChannelManager.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ReplicationChannelManager.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.replication;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.ext.replication.transport.AbstractPacket;
import org.exoplatform.services.jcr.ext.replication.transport.ChannelManager;
import org.exoplatform.services.jcr.ext.replication.transport.MemberAddress;
@@ -72,6 +73,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public Object handle(final Message message)
{
if (isConnected())
@@ -178,9 +180,9 @@
LOG.debug("Begin send : " + filePath);
File f = new File(filePath);
- long packetCount = getPacketCount(f.length(), Packet.MAX_PACKET_SIZE);
+ long packetCount = getPacketCount(PrivilegedFileHelper.length(f), Packet.MAX_PACKET_SIZE);
- FileInputStream in = new FileInputStream(f);
+ FileInputStream in = PrivilegedFileHelper.fileInputStream(f);
byte[] buf = new byte[Packet.MAX_PACKET_SIZE];
int len;
long offset = 0;
@@ -273,6 +275,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void connect() throws ReplicationException
{
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ReplicationService.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ReplicationService.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/ReplicationService.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.replication;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.container.xml.PropertiesParam;
import org.exoplatform.container.xml.ValuesParam;
@@ -372,9 +373,9 @@
{
// create the recovery for workspace
File dir =
- new File(recoveryDir.getAbsolutePath() + File.separator + repoNamesList.get(rIndex) + "_"
- + workspaces[wIndex]);
- dir.mkdirs();
+ new File(PrivilegedFileHelper.getAbsolutePath(recoveryDir) + File.separator
+ + repoNamesList.get(rIndex) + "_" + workspaces[wIndex]);
+ PrivilegedFileHelper.mkdirs(dir);
String systemId = IdGenerator.generate();
String props = channelConfig.replaceAll(IP_ADRESS_TEMPLATE, bindIPAddress);
@@ -759,8 +760,10 @@
throw new RuntimeException("Recovery dir not specified");
recoveryDir = new File(recDir);
- if (!recoveryDir.exists())
- recoveryDir.mkdirs();
+ if (!PrivilegedFileHelper.exists(recoveryDir))
+ {
+ PrivilegedFileHelper.mkdirs(recoveryDir);
+ }
if (mode.equals(PERSISTENT_MODE))
{
@@ -834,8 +837,10 @@
else if (backupEnabled)
{
backupDir = new File(sBackupDir);
- if (!backupDir.exists())
- backupDir.mkdirs();
+ if (!PrivilegedFileHelper.exists(backupDir))
+ {
+ PrivilegedFileHelper.mkdirs(backupDir);
+ }
}
if (sDelayTime == null && backupEnabled)
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataTransmitter.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataTransmitter.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/WorkspaceDataTransmitter.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.replication;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.dataflow.ChangesLogIterator;
import org.exoplatform.services.jcr.dataflow.ItemStateChangesLog;
@@ -168,8 +169,8 @@
String identifier = IdGenerator.generate();
String fName = recoveryManager.save(isChangesLog, identifier);
- channelManager.sendBinaryFile(new File(fName).getCanonicalPath(), ownName, identifier, systemId,
- Packet.PacketType.BINARY_CHANGESLOG_PACKET);
+ channelManager.sendBinaryFile(PrivilegedFileHelper.getCanonicalPath(new File(fName)), ownName, identifier,
+ systemId, Packet.PacketType.BINARY_CHANGESLOG_PACKET);
return identifier;
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/AbstractFSAccess.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/AbstractFSAccess.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/AbstractFSAccess.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,8 @@
*/
package org.exoplatform.services.jcr.ext.replication.recovery;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
+
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
@@ -81,8 +83,8 @@
{
byte[] buf = new byte[BUFFER_1KB * BUFFER_20X];
- File tempFile = File.createTempFile("" + System.currentTimeMillis(), "" + System.nanoTime());
- FileOutputStream fos = new FileOutputStream(tempFile);
+ File tempFile = PrivilegedFileHelper.createTempFile("" + System.currentTimeMillis(), "" + System.nanoTime());
+ FileOutputStream fos = PrivilegedFileHelper.fileOutputStream(tempFile);
int len;
while ((len = is.read(buf)) > 0)
@@ -110,8 +112,8 @@
int bufferSize = BUFFER_1KB * BUFFER_8X;
byte[] buf = new byte[bufferSize];
- File tempFile = File.createTempFile("" + System.currentTimeMillis(), "" + System.nanoTime());
- FileOutputStream fos = new FileOutputStream(tempFile);
+ File tempFile = PrivilegedFileHelper.createTempFile("" + System.currentTimeMillis(), "" + System.nanoTime());
+ FileOutputStream fos = PrivilegedFileHelper.fileOutputStream(tempFile);
long readBytes = fileSize;
while (readBytes > 0)
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/RecoveryReader.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/RecoveryReader.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/RecoveryReader.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.replication.recovery;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.dataflow.TransactionChangesLog;
import org.exoplatform.services.jcr.dataflow.serialization.UnknownClassIdException;
import org.exoplatform.services.jcr.impl.dataflow.serialization.ObjectReaderImpl;
@@ -29,7 +30,6 @@
import java.io.BufferedReader;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.text.DateFormat;
@@ -107,7 +107,7 @@
public TransactionChangesLog getChangesLog(String filePath) throws IOException, ClassNotFoundException
{
- ObjectReaderImpl in = new ObjectReaderImpl(new FileInputStream(filePath));
+ ObjectReaderImpl in = new ObjectReaderImpl(PrivilegedFileHelper.fileInputStream(filePath));
TransactionChangesLogReader rdr = new TransactionChangesLogReader(fileCleaner, maxBufferSize, holder);
TransactionChangesLog tcl;
@@ -136,11 +136,11 @@
*/
public List<String> getFilePathList(Calendar timeStamp, String ownName) throws IOException
{
- File dataInfo = new File(recoveryDir.getAbsolutePath() + File.separator + ownName);
+ File dataInfo = new File(PrivilegedFileHelper.getAbsolutePath(recoveryDir) + File.separator + ownName);
List<String> list = new ArrayList<String>();
- if (dataInfo.exists())
+ if (PrivilegedFileHelper.exists(dataInfo))
{
BufferedReader br = new BufferedReader(new FileReader(dataInfo));
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/RecoverySynchronizer.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/RecoverySynchronizer.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/RecoverySynchronizer.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.replication.recovery;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.dataflow.ChangesLogIterator;
import org.exoplatform.services.jcr.dataflow.ItemDataKeeper;
import org.exoplatform.services.jcr.dataflow.ItemState;
@@ -288,7 +289,7 @@
try
{
TransactionChangesLog transactionChangesLog =
- recoveryReader.getChangesLog(fileDescriptor.getFile().getAbsolutePath());
+ recoveryReader.getChangesLog(PrivilegedFileHelper.getAbsolutePath(fileDescriptor.getFile()));
transactionChangesLog.setSystemId(fileDescriptor.getSystemId());
@@ -296,7 +297,8 @@
if (log.isDebugEnabled())
{
- log.debug("Save to JCR : " + fileDescriptor.getFile().getAbsolutePath());
+ log.debug("Save to JCR : "
+ + PrivilegedFileHelper.getAbsolutePath(fileDescriptor.getFile()));
log.debug("SystemID : " + transactionChangesLog.getSystemId());
log.debug("list size : " + fileDescriptorList.size());
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/RecoveryWriter.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/RecoveryWriter.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/RecoveryWriter.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.replication.recovery;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.dataflow.TransactionChangesLog;
import org.exoplatform.services.jcr.impl.dataflow.serialization.ObjectWriterImpl;
import org.exoplatform.services.jcr.impl.dataflow.serialization.TransactionChangesLogWriter;
@@ -30,7 +31,6 @@
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileFilter;
-import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
@@ -106,9 +106,11 @@
this.recoveryDir = recoveryDir;
this.fileNameFactory = fileNameFactory;
- recoveryDirDate = new File(this.recoveryDir.getCanonicalPath() + File.separator + DATA_DIR_NAME);
- if (!recoveryDirDate.exists())
- recoveryDirDate.mkdirs();
+ recoveryDirDate = new File(PrivilegedFileHelper.getCanonicalPath(this.recoveryDir) + File.separator + DATA_DIR_NAME);
+ if (!PrivilegedFileHelper.exists(recoveryDirDate))
+ {
+ PrivilegedFileHelper.mkdirs(recoveryDirDate);
+ }
fileRemover = new FileRemover(REMOVER_TIMEOUT, recoveryDir, fileCleaner, ownName);
fileRemover.start();
@@ -133,7 +135,7 @@
// save info
if (log.isDebugEnabled())
- log.debug("Write info : " + f.getAbsolutePath());
+ log.debug("Write info : " + PrivilegedFileHelper.getAbsolutePath(f));
writeNotConfirmationInfo(f, confirmationChengesLog.getNotConfirmationList());
@@ -161,15 +163,17 @@
String fileName = fileNameFactory.getTimeStampName(timeStamp) + "_" + identifier;
// create dir
- File dir = new File(recoveryDirDate.getCanonicalPath() + File.separator + fileNameFactory.getRandomSubPath());
- dir.mkdirs();
+ File dir =
+ new File(PrivilegedFileHelper.getCanonicalPath(recoveryDirDate) + File.separator
+ + fileNameFactory.getRandomSubPath());
+ PrivilegedFileHelper.mkdirs(dir);
- File f = new File(dir.getCanonicalPath() + File.separator + File.separator + fileName);
+ File f = new File(PrivilegedFileHelper.getCanonicalPath(dir) + File.separator + File.separator + fileName);
// save data
- this.save(f, (TransactionChangesLog)tcLog);
+ this.save(f, tcLog);
- return f.getCanonicalPath();
+ return PrivilegedFileHelper.getCanonicalPath(f);
}
/**
@@ -186,7 +190,7 @@
public String save(File f, TransactionChangesLog changesLog) throws IOException
{
// save data
- ObjectWriterImpl out = new ObjectWriterImpl(new FileOutputStream(f));
+ ObjectWriterImpl out = new ObjectWriterImpl(PrivilegedFileHelper.fileOutputStream(f));
TransactionChangesLogWriter wr = new TransactionChangesLogWriter();
wr.write(out, changesLog);
@@ -210,14 +214,16 @@
{
for (String name : participantsClusterList)
{
- File metaDataFile = new File(recoveryDir.getCanonicalPath() + File.separator + name);
+ File metaDataFile = new File(PrivilegedFileHelper.getCanonicalPath(recoveryDir) + File.separator + name);
- if (!metaDataFile.exists())
- metaDataFile.createNewFile();
+ if (!PrivilegedFileHelper.exists(metaDataFile))
+ {
+ PrivilegedFileHelper.createNewFile(metaDataFile);
+ }
- RandomAccessFile raf = new RandomAccessFile(metaDataFile, "rw");
- raf.seek(metaDataFile.length());
- raf.write((dataFile.getCanonicalPath() + "\n").getBytes());
+ RandomAccessFile raf = PrivilegedFileHelper.randomAccessFile(metaDataFile, "rw");
+ raf.seek(PrivilegedFileHelper.length(metaDataFile));
+ raf.write((PrivilegedFileHelper.getCanonicalPath(dataFile) + "\n").getBytes());
raf.close();
}
@@ -235,9 +241,9 @@
*/
public synchronized void removeChangesLog(String identifier, String ownerName) throws IOException
{
- File metaDataFile = new File(recoveryDir.getAbsolutePath() + File.separator + ownerName);
+ File metaDataFile = new File(PrivilegedFileHelper.getAbsolutePath(recoveryDir) + File.separator + ownerName);
- RandomAccessFile raf = new RandomAccessFile(metaDataFile, "rw");
+ RandomAccessFile raf = PrivilegedFileHelper.randomAccessFile(metaDataFile, "rw");
String fileName;
@@ -257,7 +263,7 @@
log.debug("remove changes log form fs : " + identifier);
}
- saveRemoveChangesLog((new File(fileName)).getCanonicalPath());
+ saveRemoveChangesLog(PrivilegedFileHelper.getCanonicalPath((new File(fileName))));
break;
}
@@ -279,9 +285,9 @@
{
long removeCounter = 0;
- File metaDataFile = new File(recoveryDir.getAbsolutePath() + File.separator + ownerName);
+ File metaDataFile = new File(PrivilegedFileHelper.getAbsolutePath(recoveryDir) + File.separator + ownerName);
- RandomAccessFile raf = new RandomAccessFile(metaDataFile, "rw");
+ RandomAccessFile raf = PrivilegedFileHelper.randomAccessFile(metaDataFile, "rw");
HashMap<String, String> fileNameMap = new HashMap<String, String>();
@@ -333,10 +339,10 @@
log.debug("Seve removable changeslogs form fs : " + filePath);
File removeDataFile =
- new File(recoveryDir.getAbsolutePath() + File.separator + DATA_DIR_NAME + File.separator
+ new File(PrivilegedFileHelper.getAbsolutePath(recoveryDir) + File.separator + DATA_DIR_NAME + File.separator
+ IdGenerator.generate() + REMOVED_SUFFIX);
- removeDataFile.createNewFile();
+ PrivilegedFileHelper.createNewFile(removeDataFile);
BufferedWriter bw = new BufferedWriter(new FileWriter(removeDataFile));
@@ -364,10 +370,10 @@
log.debug("Seve removable changeslogs form fs : " + fileNameList.size());
File removeDataFile =
- new File(recoveryDir.getAbsolutePath() + File.separator + DATA_DIR_NAME + File.separator
+ new File(PrivilegedFileHelper.getAbsolutePath(recoveryDir) + File.separator + DATA_DIR_NAME + File.separator
+ IdGenerator.generate() + REMOVED_SUFFIX);
- removeDataFile.createNewFile();
+ PrivilegedFileHelper.createNewFile(removeDataFile);
BufferedWriter bw = new BufferedWriter(new FileWriter(removeDataFile));
@@ -391,7 +397,7 @@
*/
public void removeDataFile(File f)
{
- if (!f.delete())
+ if (!PrivilegedFileHelper.delete(f))
fileCleaner.addFile(f);
}
}
@@ -466,6 +472,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void run()
{
while (true)
@@ -476,9 +483,10 @@
Thread.sleep(period);
File recoveryDataDir =
- new File(recoveryDir.getCanonicalPath() + File.separator + RecoveryWriter.DATA_DIR_NAME);
+ new File(PrivilegedFileHelper.getCanonicalPath(recoveryDir) + File.separator
+ + RecoveryWriter.DATA_DIR_NAME);
- File[] fArray = recoveryDataDir.listFiles(new RemoveFilesFilter());
+ File[] fArray = PrivilegedFileHelper.listFiles(recoveryDataDir, new RemoveFilesFilter());
if (fArray.length > 0)
{
@@ -489,12 +497,12 @@
for (String fPath : needRemoveFilesName)
{
File f = new File(fPath);
- if (f.exists() && !map.containsKey(f.getName()))
+ if (PrivilegedFileHelper.exists(f) && !map.containsKey(f.getName()))
{
fileCleaner.addFile(f);
if (log.isDebugEnabled())
- log.debug("Remove file :" + f.getCanonicalPath());
+ log.debug("Remove file :" + PrivilegedFileHelper.getCanonicalPath(f));
}
}
@@ -505,7 +513,7 @@
fileCleaner.addFile(ff);
if (log.isDebugEnabled())
- log.debug("Remove file :" + ff.getCanonicalPath());
+ log.debug("Remove file :" + PrivilegedFileHelper.getCanonicalPath(ff));
}
}
}
@@ -562,7 +570,7 @@
{
HashMap<String, String> map = new HashMap<String, String>();
- for (File f : recoveryDir.listFiles())
+ for (File f : PrivilegedFileHelper.listFiles(recoveryDir))
if (f.isFile())
for (String filePath : getFilePathList(f))
map.put(new File(filePath).getName(), filePath);
@@ -625,10 +633,16 @@
*/
private void getFiles(File f, List<File> list)
{
- if (f.isDirectory())
- for (File subFile : f.listFiles())
+ if (PrivilegedFileHelper.isDirectory(f))
+ {
+ for (File subFile : PrivilegedFileHelper.listFiles(f))
+ {
getFiles(subFile, list);
+ }
+ }
else if (f.isFile() && !(f.getName().endsWith(AbstractFSAccess.REMOVED_SUFFIX)))
+ {
list.add(f);
+ }
}
}
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/backup/BackupCreator.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/backup/BackupCreator.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/recovery/backup/BackupCreator.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,6 +18,7 @@
*/
package org.exoplatform.services.jcr.ext.replication.recovery.backup;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.core.ManageableRepository;
import org.exoplatform.services.jcr.ext.replication.recovery.FileNameFactory;
import org.exoplatform.services.jcr.impl.core.SessionImpl;
@@ -25,7 +26,6 @@
import org.exoplatform.services.log.Log;
import java.io.File;
-import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Calendar;
@@ -122,18 +122,18 @@
manageableRepository.getConfiguration().getName() + "_" + workspaceName + "_"
+ fileNameFactory.getStrDate(backupTime) + "_" + fileNameFactory.getStrTime(backupTime) + ".xml";
- File backupFile = new File(backupDir.getCanonicalPath() + File.separator + fileName);
+ File backupFile = new File(PrivilegedFileHelper.getCanonicalPath(backupDir) + File.separator + fileName);
- if (backupFile.createNewFile())
+ if (PrivilegedFileHelper.createNewFile(backupFile))
{
- session.exportWorkspaceSystemView(new FileOutputStream(backupFile), false, false);
+ session.exportWorkspaceSystemView(PrivilegedFileHelper.fileOutputStream(backupFile), false, false);
log.info("The backup has been finished : " + manageableRepository.getConfiguration().getName() + "@"
+ workspaceName);
}
else
- throw new IOException("Can't create file : " + backupFile.getCanonicalPath());
+ throw new IOException("Can't create file : " + PrivilegedFileHelper.getCanonicalPath(backupFile));
}
catch (InterruptedException ie)
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/storage/RandomChangesFile.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/storage/RandomChangesFile.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/storage/RandomChangesFile.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,11 +18,11 @@
*/
package org.exoplatform.services.jcr.ext.replication.storage;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import java.io.File;
-import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.RandomAccessFile;
@@ -117,7 +117,7 @@
{
finishWrite();
- InputStream in = new FileInputStream(file);
+ InputStream in = PrivilegedFileHelper.fileInputStream(file);
resHolder.add(in);
return in;
}
@@ -174,14 +174,14 @@
{
if (fileAccessor == null)
{
- fileAccessor = new RandomAccessFile(file, "rwd");
+ fileAccessor = PrivilegedFileHelper.randomAccessFile(file, "rwd");
resHolder.add(fileAccessor);
// if (file.length() > 0) {
// doTruncate = true;
// }
- fileAccessor.seek(file.length());
+ fileAccessor.seek(PrivilegedFileHelper.length(file));
// LOG.info("checkFileAccessor - seek on " + file.length());
}
@@ -198,7 +198,7 @@
public boolean delete() throws IOException
{
finishWrite();
- return file.delete();
+ return PrivilegedFileHelper.delete(file);
}
/**
@@ -212,9 +212,10 @@
/**
* {@inheritDoc}
*/
+ @Override
public String toString()
{
- return file.getAbsolutePath();
+ return PrivilegedFileHelper.getAbsolutePath(file);
}
/**
@@ -222,7 +223,7 @@
*/
public long getLength()
{
- return file.length();
+ return PrivilegedFileHelper.length(file);
}
/**
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/CopyMoveTestCase.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/CopyMoveTestCase.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/CopyMoveTestCase.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,12 +18,12 @@
*/
package org.exoplatform.services.jcr.ext.replication.test;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.RepositoryService;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
@@ -92,8 +92,8 @@
File tempFile = null;
try
{
- tempFile = File.createTempFile("tempF", "_");
- FileOutputStream fos = new FileOutputStream(tempFile);
+ tempFile = PrivilegedFileHelper.createTempFile("tempF", "_");
+ FileOutputStream fos = PrivilegedFileHelper.fileOutputStream(tempFile);
for (int i = 0; i < buf.length; i++)
buf[i] = (byte)(i % Byte.MAX_VALUE);
@@ -106,7 +106,7 @@
Node srcNode = addNodePath(srcRepoPath).addNode(nodeName, "nt:file");
Node contentNode = srcNode.addNode("jcr:content", "nt:resource");
contentNode.setProperty("jcr:encoding", "UTF-8");
- contentNode.setProperty("jcr:data", new FileInputStream(tempFile));
+ contentNode.setProperty("jcr:data", PrivilegedFileHelper.fileInputStream(tempFile));
contentNode.setProperty("jcr:mimeType", "application/octet-stream");
contentNode.setProperty("jcr:lastModified", session.getValueFactory().createValue(Calendar.getInstance()));
@@ -157,8 +157,8 @@
File tempFile = null;
try
{
- tempFile = File.createTempFile("tempF", "_");
- FileOutputStream fos = new FileOutputStream(tempFile);
+ tempFile = PrivilegedFileHelper.createTempFile("tempF", "_");
+ FileOutputStream fos = PrivilegedFileHelper.fileOutputStream(tempFile);
for (int i = 0; i < buf.length; i++)
buf[i] = (byte)(i % Byte.MAX_VALUE);
@@ -171,7 +171,7 @@
Node srcNode = addNodePath(srcRepoPath).addNode(nodeName, "nt:file");
Node contentNode = srcNode.addNode("jcr:content", "nt:resource");
contentNode.setProperty("jcr:encoding", "UTF-8");
- contentNode.setProperty("jcr:data", new FileInputStream(tempFile));
+ contentNode.setProperty("jcr:data", PrivilegedFileHelper.fileInputStream(tempFile));
contentNode.setProperty("jcr:mimeType", "application/octet-stream");
contentNode.setProperty("jcr:lastModified", session.getValueFactory().createValue(Calendar.getInstance()));
@@ -222,8 +222,8 @@
File tempFile = null;
try
{
- tempFile = File.createTempFile("tempF", "_");
- FileOutputStream fos = new FileOutputStream(tempFile);
+ tempFile = PrivilegedFileHelper.createTempFile("tempF", "_");
+ FileOutputStream fos = PrivilegedFileHelper.fileOutputStream(tempFile);
for (int i = 0; i < buf.length; i++)
buf[i] = (byte)(i % Byte.MAX_VALUE);
@@ -236,7 +236,7 @@
Node srcNode = addNodePath(srcRepoPath).addNode(nodeName, "nt:file");
Node contentNode = srcNode.addNode("jcr:content", "nt:resource");
contentNode.setProperty("jcr:encoding", "UTF-8");
- contentNode.setProperty("jcr:data", new FileInputStream(tempFile));
+ contentNode.setProperty("jcr:data", PrivilegedFileHelper.fileInputStream(tempFile));
contentNode.setProperty("jcr:mimeType", "application/octet-stream");
contentNode.setProperty("jcr:lastModified", session.getValueFactory().createValue(Calendar.getInstance()));
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/NtFileTestCase.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/NtFileTestCase.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/NtFileTestCase.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,12 +18,12 @@
*/
package org.exoplatform.services.jcr.ext.replication.test;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.RepositoryService;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.Calendar;
@@ -90,8 +90,8 @@
File tempFile = null;
try
{
- tempFile = File.createTempFile("tempF", "_");
- FileOutputStream fos = new FileOutputStream(tempFile);
+ tempFile = PrivilegedFileHelper.createTempFile("tempF", "_");
+ FileOutputStream fos = PrivilegedFileHelper.fileOutputStream(tempFile);
for (int i = 0; i < buf.length; i++)
buf[i] = (byte)(i % DIVIDER);
@@ -106,7 +106,7 @@
Node cool = addNodePath(repoPath).addNode(fileName, "nt:file");
Node contentNode = cool.addNode("jcr:content", "nt:resource");
contentNode.setProperty("jcr:encoding", "UTF-8");
- contentNode.setProperty("jcr:data", new FileInputStream(tempFile));
+ contentNode.setProperty("jcr:data", PrivilegedFileHelper.fileInputStream(tempFile));
contentNode.setProperty("jcr:mimeType", "application/octet-stream");
contentNode.setProperty("jcr:lastModified", session.getValueFactory().createValue(Calendar.getInstance()));
@@ -124,7 +124,7 @@
}
finally
{
- tempFile.delete();
+ PrivilegedFileHelper.delete(tempFile);
}
return sb;
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/bandwidth/BandwidthAllocationTestCase.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/bandwidth/BandwidthAllocationTestCase.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/bandwidth/BandwidthAllocationTestCase.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,13 +18,13 @@
*/
package org.exoplatform.services.jcr.ext.replication.test.bandwidth;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.RepositoryService;
import org.exoplatform.services.jcr.ext.replication.test.BaseReplicationTestCase;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileOutputStream;
import javax.jcr.Node;
@@ -209,8 +209,8 @@
File tempFile = null;
try
{
- tempFile = File.createTempFile("tempF", "_");
- FileOutputStream fos = new FileOutputStream(tempFile);
+ tempFile = PrivilegedFileHelper.createTempFile("tempF", "_");
+ FileOutputStream fos = PrivilegedFileHelper.fileOutputStream(tempFile);
for (int i = 0; i < buf.length; i++)
buf[i] = (byte)(i % BaseReplicationTestCase.DIVIDER);
@@ -225,15 +225,15 @@
{
String normalizePath = getNormalizePath(repoPath);
Node baseNode = ((Node)session.getItem(normalizePath)).getNode(nodeName);
- baseNode.setProperty("d", new FileInputStream(tempFile));
+ baseNode.setProperty("d", PrivilegedFileHelper.fileInputStream(tempFile));
session.save();
}
end = System.currentTimeMillis();
- log.info("The time of the adding of nt:file + " + iterations + "( " + tempFile.length() + " B ) : "
- + ((end - start) / BaseReplicationTestCase.ONE_SECONDS) + " sec");
+ log.info("The time of the adding of nt:file + " + iterations + "( " + PrivilegedFileHelper.length(tempFile)
+ + " B ) : " + ((end - start) / BaseReplicationTestCase.ONE_SECONDS) + " sec");
sb.append("ok");
}
@@ -244,7 +244,7 @@
}
finally
{
- tempFile.delete();
+ PrivilegedFileHelper.delete(tempFile);
}
return sb;
Modified: jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/concurrent/ConcurrentModificationTestCase.java
===================================================================
--- jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/concurrent/ConcurrentModificationTestCase.java 2010-11-23 09:11:41 UTC (rev 3518)
+++ jcr/trunk/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/replication/test/concurrent/ConcurrentModificationTestCase.java 2010-11-23 09:20:29 UTC (rev 3519)
@@ -18,13 +18,13 @@
*/
package org.exoplatform.services.jcr.ext.replication.test.concurrent;
+import org.exoplatform.commons.utils.PrivilegedFileHelper;
import org.exoplatform.services.jcr.RepositoryService;
import org.exoplatform.services.jcr.ext.replication.test.BaseReplicationTestCase;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
import java.io.File;
-import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.util.Calendar;
@@ -90,8 +90,8 @@
File tempFile = null;
try
{
- tempFile = File.createTempFile("tempF", "_");
- FileOutputStream fos = new FileOutputStream(tempFile);
+ tempFile = PrivilegedFileHelper.createTempFile("tempF", "_");
+ FileOutputStream fos = PrivilegedFileHelper.fileOutputStream(tempFile);
for (long i = 0; i < iterations; i++)
fos.write(simpleContent.getBytes());
@@ -102,7 +102,7 @@
Node cool = addNodePath(repoPath).addNode(fileName, "nt:file");
Node contentNode = cool.addNode("jcr:content", "nt:resource");
contentNode.setProperty("jcr:encoding", "UTF-8");
- contentNode.setProperty("jcr:data", new FileInputStream(tempFile));
+ contentNode.setProperty("jcr:data", PrivilegedFileHelper.fileInputStream(tempFile));
contentNode.setProperty("jcr:mimeType", "application/octet-stream");
contentNode.setProperty("jcr:lastModified", session.getValueFactory().createValue(Calendar.getInstance()));
@@ -121,7 +121,7 @@
}
finally
{
- tempFile.delete();
+ PrivilegedFileHelper.delete(tempFile);
}
return sb;
@@ -247,6 +247,7 @@
/**
* {@inheritDoc}
*/
+ @Override
public void run()
{
String destPath = null;
13 years, 6 months