exo-jcr SVN: r2816 - in kernel/trunk: exo.kernel.commons and 12 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-07-27 05:59:42 -0400 (Tue, 27 Jul 2010)
New Revision: 2816
Modified:
kernel/trunk/exo.kernel.commons.test/pom.xml
kernel/trunk/exo.kernel.commons/pom.xml
kernel/trunk/exo.kernel.component.cache/pom.xml
kernel/trunk/exo.kernel.component.command/pom.xml
kernel/trunk/exo.kernel.component.common/pom.xml
kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml
kernel/trunk/exo.kernel.container/pom.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml
kernel/trunk/exo.kernel.mc-integration/pom.xml
kernel/trunk/packaging/module/pom.xml
kernel/trunk/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: kernel/trunk/exo.kernel.commons/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.commons/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/exo.kernel.commons/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -16,7 +16,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<artifactId>exo.kernel.commons</artifactId>
Modified: kernel/trunk/exo.kernel.commons.test/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.commons.test/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/exo.kernel.commons.test/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -16,7 +16,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<artifactId>exo.kernel.commons.test</artifactId>
Modified: kernel/trunk/exo.kernel.component.cache/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.cache/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/exo.kernel.component.cache/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<artifactId>exo.kernel.component.cache</artifactId>
Modified: kernel/trunk/exo.kernel.component.command/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.command/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/exo.kernel.component.command/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<artifactId>exo.kernel.component.command</artifactId>
Modified: kernel/trunk/exo.kernel.component.common/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.common/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/exo.kernel.component.common/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<artifactId>exo.kernel.component.common</artifactId>
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -23,7 +23,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<artifactId>exo.kernel.component.ext.cache.impl.jboss.v3</artifactId>
<name>eXo Kernel :: Cache Extension :: JBoss Cache Implementation</name>
Modified: kernel/trunk/exo.kernel.container/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.container/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/exo.kernel.container/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -12,7 +12,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<artifactId>exo.kernel.container</artifactId>
<name>eXo Kernel :: Container</name>
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -6,7 +6,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>mc-integration-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<artifactId>exo.kernel.mc-int</artifactId>
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>mc-integration-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<artifactId>exo.kernel.mc-int-demo</artifactId>
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -5,7 +5,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>mc-integration-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<artifactId>exo.kernel.mc-int-tests</artifactId>
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -6,7 +6,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>mc-integration-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<artifactId>exo.kernel.mc-kernel-extras</artifactId>
Modified: kernel/trunk/exo.kernel.mc-integration/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/exo.kernel.mc-integration/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -6,7 +6,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<artifactId>mc-integration-parent</artifactId>
Modified: kernel/trunk/packaging/module/pom.xml
===================================================================
--- kernel/trunk/packaging/module/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/packaging/module/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.exoplatform.kernel</groupId>
<artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: kernel/trunk/pom.xml
===================================================================
--- kernel/trunk/pom.xml 2010-07-27 09:59:16 UTC (rev 2815)
+++ kernel/trunk/pom.xml 2010-07-27 09:59:42 UTC (rev 2816)
@@ -30,7 +30,7 @@
<groupId>org.exoplatform.kernel</groupId>
<artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01</version>
+ <version>2.3.0-CR1</version>
<packaging>pom</packaging>
<name>eXo Kernel</name>
@@ -43,9 +43,9 @@
</properties>
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/exo-jcr/kernel/tags/2.3.0-Beta01</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/exo-jcr/kernel/tags/2.3.0-Beta01</developerConnection>
- <url>http://fisheye.jboss.org/browse/exo-jcr/kernel/tags/2.3.0-Beta01</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/exo-jcr/kernel/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/exo-jcr/kernel/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/exo-jcr/kernel/trunk</url>
</scm>
<modules>
13 years, 9 months
exo-jcr SVN: r2815 - kernel/tags.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-07-27 05:59:16 -0400 (Tue, 27 Jul 2010)
New Revision: 2815
Added:
kernel/tags/2.3.0-Beta01/
Log:
[maven-scm] copy for tag 2.3.0-Beta01
Copied: kernel/tags/2.3.0-Beta01 (from rev 2814, kernel/trunk)
13 years, 9 months
exo-jcr SVN: r2814 - in kernel/trunk: exo.kernel.commons and 12 other directories.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-07-27 05:58:54 -0400 (Tue, 27 Jul 2010)
New Revision: 2814
Modified:
kernel/trunk/exo.kernel.commons.test/pom.xml
kernel/trunk/exo.kernel.commons/pom.xml
kernel/trunk/exo.kernel.component.cache/pom.xml
kernel/trunk/exo.kernel.component.command/pom.xml
kernel/trunk/exo.kernel.component.common/pom.xml
kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml
kernel/trunk/exo.kernel.container/pom.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml
kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml
kernel/trunk/exo.kernel.mc-integration/pom.xml
kernel/trunk/packaging/module/pom.xml
kernel/trunk/pom.xml
Log:
[maven-release-plugin] prepare release 2.3.0-Beta01
Modified: kernel/trunk/exo.kernel.commons/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.commons/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/exo.kernel.commons/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,74 +1,73 @@
-
- <!--
-
- 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.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
-
- <artifactId>exo.kernel.commons</artifactId>
-
- <name>eXo Kernel :: Commons Utils</name>
- <description>eXo Commons</description>
-
- <dependencies>
- <dependency>
- <groupId>xpp3</groupId>
- <artifactId>xpp3</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <scope>compile</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <scope>compile</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <argLine>-Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/test.policy</argLine>
- </configuration>
- </plugin>
- </plugins>
- <testResources>
- <testResource>
- <directory>src/test/resources</directory>
- <includes>
- <include>**/*.properties</include>
- <include>**/test.policy</include>
- </includes>
- </testResource>
- </testResources>
- </build>
-
-</project>
+
+ <!--
+
+ 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>kernel-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+
+ <artifactId>exo.kernel.commons</artifactId>
+
+ <name>eXo Kernel :: Commons Utils</name>
+ <description>eXo Commons</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>xpp3</groupId>
+ <artifactId>xpp3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <argLine>-Djava.security.manager -Djava.security.policy=${project.build.directory}/test-classes/test.policy</argLine>
+ </configuration>
+ </plugin>
+ </plugins>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <includes>
+ <include>**/*.properties</include>
+ <include>**/test.policy</include>
+ </includes>
+ </testResource>
+ </testResources>
+ </build>
+
+</project>
Modified: kernel/trunk/exo.kernel.commons.test/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.commons.test/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/exo.kernel.commons.test/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,44 +1,43 @@
-
- <!--
-
- 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.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
-
- <artifactId>exo.kernel.commons.test</artifactId>
-
- <name>eXo Kernel :: Commons :: Test Util</name>
- <description>eXo Commons Test Util</description>
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- </plugin>
- </plugins>
- </build>
-
-</project>
+ <!--
+
+ 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>kernel-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+
+ <artifactId>exo.kernel.commons.test</artifactId>
+
+ <name>eXo Kernel :: Commons :: Test Util</name>
+ <description>eXo Commons Test Util</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Modified: kernel/trunk/exo.kernel.component.cache/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.cache/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/exo.kernel.component.cache/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,54 +1,54 @@
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
-
- <artifactId>exo.kernel.component.cache</artifactId>
-
- <name>eXo Kernel :: Component :: Cache Service</name>
- <description>exoplatform Cache services implementation</description>
-
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.tool</groupId>
- <artifactId>exo.tool.framework.junit</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- </dependencies>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>kernel-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+
+ <artifactId>exo.kernel.component.cache</artifactId>
+
+ <name>eXo Kernel :: Component :: Cache Service</name>
+ <description>exoplatform Cache services implementation</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.tool</groupId>
+ <artifactId>exo.tool.framework.junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
Modified: kernel/trunk/exo.kernel.component.command/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.command/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/exo.kernel.component.command/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,78 +1,78 @@
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
-
- <artifactId>exo.kernel.component.command</artifactId>
-
- <name>eXo Kernel :: Component :: Command Service</name>
- <description>exoplatform command services implementation</description>
-
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-chain</groupId>
- <artifactId>commons-chain</artifactId>
- <exclusions>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>commons-digester</groupId>
- <artifactId>commons-digester</artifactId>
- </dependency>
- <dependency>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/CommandServiceTest.java</exclude>
- <exclude>**/MultiConfigServiceTest.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>kernel-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+
+ <artifactId>exo.kernel.component.command</artifactId>
+
+ <name>eXo Kernel :: Component :: Command Service</name>
+ <description>exoplatform command services implementation</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-chain</groupId>
+ <artifactId>commons-chain</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/CommandServiceTest.java</exclude>
+ <exclude>**/MultiConfigServiceTest.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Modified: kernel/trunk/exo.kernel.component.common/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.common/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/exo.kernel.component.common/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,111 +1,111 @@
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
-
- <artifactId>exo.kernel.component.common</artifactId>
-
- <name>eXo Kernel :: Component :: Common Service</name>
- <description>exoplatform common services implementation</description>
-
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.tool</groupId>
- <artifactId>exo.tool.framework.junit</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.activation</groupId>
- <artifactId>activation</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
- <groupId>xpp3</groupId>
- <artifactId>xpp3</artifactId>
- </dependency>
- <dependency>
- <groupId>jotm</groupId>
- <artifactId>jotm</artifactId>
- <exclusions>
- <exclusion>
- <groupId>javax.resource</groupId>
- <artifactId>connector</artifactId>
- </exclusion>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.resource</groupId>
- <artifactId>connector-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>quartz</groupId>
- <artifactId>quartz</artifactId>
- </dependency>
- <dependency>
- <groupId>picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/InitialContextTest.java</exclude>
- <exclude>**/TransactionTest.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>kernel-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+
+ <artifactId>exo.kernel.component.common</artifactId>
+
+ <name>eXo Kernel :: Component :: Common Service</name>
+ <description>exoplatform common services implementation</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.tool</groupId>
+ <artifactId>exo.tool.framework.junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xpp3</groupId>
+ <artifactId>xpp3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>jotm</groupId>
+ <artifactId>jotm</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.resource</groupId>
+ <artifactId>connector</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>javax.resource</groupId>
+ <artifactId>connector-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>quartz</groupId>
+ <artifactId>quartz</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>picocontainer</groupId>
+ <artifactId>picocontainer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/InitialContextTest.java</exclude>
+ <exclude>**/TransactionTest.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Modified: kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/exo.kernel.component.ext.cache.impl.jboss.v3/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,84 +1,84 @@
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
- <artifactId>exo.kernel.component.ext.cache.impl.jboss.v3</artifactId>
- <name>eXo Kernel :: Cache Extension :: JBoss Cache Implementation</name>
- <description>JBoss Cache Implementation for the Cache Service</description>
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.tool</groupId>
- <artifactId>exo.tool.framework.junit</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.component.cache</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <systemProperties>
- <!-- We add this system property due to some incompatibility between IPv6 and
- some JVM of Linux distributions such as Ubuntu and Fedora-->
- <property>
- <name>java.net.preferIPv4Stack</name>
- <value>true</value>
- </property>
- <!-- Avoid the firewall -->
- <property>
- <name>bind.address</name>
- <value>127.0.0.1</value>
- </property>
- <property>
- <name>jgroups.stack</name>
- <value>udp</value>
- </property>
- </systemProperties>
- </configuration>
- </plugin>
- </plugins>
- </build>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>kernel-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+ <artifactId>exo.kernel.component.ext.cache.impl.jboss.v3</artifactId>
+ <name>eXo Kernel :: Cache Extension :: JBoss Cache Implementation</name>
+ <description>JBoss Cache Implementation for the Cache Service</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.tool</groupId>
+ <artifactId>exo.tool.framework.junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.cache</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <!-- We add this system property due to some incompatibility between IPv6 and
+ some JVM of Linux distributions such as Ubuntu and Fedora-->
+ <property>
+ <name>java.net.preferIPv4Stack</name>
+ <value>true</value>
+ </property>
+ <!-- Avoid the firewall -->
+ <property>
+ <name>bind.address</name>
+ <value>127.0.0.1</value>
+ </property>
+ <property>
+ <name>jgroups.stack</name>
+ <value>udp</value>
+ </property>
+ </systemProperties>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
\ No newline at end of file
Modified: kernel/trunk/exo.kernel.container/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.container/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/exo.kernel.container/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,100 +1,100 @@
-
- <!--
- 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.
- -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
- <artifactId>exo.kernel.container</artifactId>
- <name>eXo Kernel :: Container</name>
- <description>eXo Kernel Container</description>
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.tool</groupId>
- <artifactId>exo.tool.framework.junit</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
- <dependency>
- <groupId>picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jibx</groupId>
- <artifactId>jibx-run</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>wstx-asl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jibx</groupId>
- <artifactId>jibx-bind</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.codehaus.woodstox</groupId>
- <artifactId>wstx-asl</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jibx</groupId>
- <artifactId>jibx-extras</artifactId>
- </dependency>
- <dependency>
- <groupId>xpp3</groupId>
- <artifactId>xpp3</artifactId>
- <version>1.1.3.4.O</version>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.jibx</groupId>
- <artifactId>maven-jibx-plugin</artifactId>
- <configuration>
- <directory>src/main/resources</directory>
- <includes>
- <includes>binding.xml</includes>
- </includes>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>bind</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <!--
- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>apt-maven-plugin</artifactId> <configuration>
- <factory>org.exoplatform.management.apt.ManagementAPF</factory> </configuration> </plugin>
- -->
- </plugins>
- </build>
+
+ <!--
+ 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.
+ -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>kernel-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+ <artifactId>exo.kernel.container</artifactId>
+ <name>eXo Kernel :: Container</name>
+ <description>eXo Kernel Container</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.tool</groupId>
+ <artifactId>exo.tool.framework.junit</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>picocontainer</groupId>
+ <artifactId>picocontainer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jibx</groupId>
+ <artifactId>jibx-run</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jibx</groupId>
+ <artifactId>jibx-bind</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>org.codehaus.woodstox</groupId>
+ <artifactId>wstx-asl</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jibx</groupId>
+ <artifactId>jibx-extras</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>xpp3</groupId>
+ <artifactId>xpp3</artifactId>
+ <version>1.1.3.4.O</version>
+ </dependency>
+ </dependencies>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.jibx</groupId>
+ <artifactId>maven-jibx-plugin</artifactId>
+ <configuration>
+ <directory>src/main/resources</directory>
+ <includes>
+ <includes>binding.xml</includes>
+ </includes>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>bind</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!--
+ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>apt-maven-plugin</artifactId> <configuration>
+ <factory>org.exoplatform.management.apt.ManagementAPF</factory> </configuration> </plugin>
+ -->
+ </plugins>
+ </build>
</project>
\ No newline at end of file
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,59 +1,59 @@
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>mc-integration-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
-
- <artifactId>exo.kernel.mc-int</artifactId>
-
- <name>eXo Kernel :: MC Kernel Integration :: Implementation</name>
- <description>MC Kernel Integration Implementation</description>
-
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- </dependency>
- <dependency>
- <groupId>picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-aop-mc-int</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.mc-int</groupId>
- <artifactId>jboss-mc-int-common</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.mc-int</groupId>
- <artifactId>jboss-mc-int-servlet</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.cl</groupId>
- <artifactId>jboss-classloader</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.mc-kernel-extras</artifactId>
- </dependency>
- </dependencies>
-</project>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>mc-integration-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+
+ <artifactId>exo.kernel.mc-int</artifactId>
+
+ <name>eXo Kernel :: MC Kernel Integration :: Implementation</name>
+ <description>MC Kernel Integration Implementation</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>picocontainer</groupId>
+ <artifactId>picocontainer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.mc-int</groupId>
+ <artifactId>jboss-mc-int-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.mc-int</groupId>
+ <artifactId>jboss-mc-int-servlet</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cl</groupId>
+ <artifactId>jboss-classloader</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-kernel-extras</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-demo/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,36 +1,36 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>mc-integration-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
-
- <artifactId>exo.kernel.mc-int-demo</artifactId>
-
- <name>eXo Kernel :: MC Kernel Integration :: Demo</name>
- <description>MC Kernel Integration Demo</description>
-
- <dependencies>
- <dependency>
- <groupId>picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.mc-int</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- <version>1.0.1B</version>
- </dependency>
- </dependencies>
-
-</project>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>mc-integration-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+
+ <artifactId>exo.kernel.mc-int-demo</artifactId>
+
+ <name>eXo Kernel :: MC Kernel Integration :: Demo</name>
+ <description>MC Kernel Integration Demo</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>picocontainer</groupId>
+ <artifactId>picocontainer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-int</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.0.1B</version>
+ </dependency>
+ </dependencies>
+
+</project>
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-int-tests/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,352 +1,352 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>mc-integration-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
-
- <artifactId>exo.kernel.mc-int-tests</artifactId>
- <packaging>war</packaging>
-
- <name>eXo Kernel :: MC Kernel Integration :: Tests</name>
- <description>MC Kernel Integration Tests</description>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.7</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.mc-int-demo</artifactId>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <!-- In version 2.1-alpha-1, this was incorrectly named warSourceExcludes -->
- <!--packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes-->
- <packagingIncludes>WEB-INF/lib/junit-*.jar,WEB-INF/classes/**</packagingIncludes>
- <archive>
- <manifest>
- <addClasspath>false</addClasspath>
- <!-- Doesn't seem to be working: -->
- <!--classpathPrefix>gatein.ear/lib/</classpathPrefix-->
- </manifest>
- </archive>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <profiles>
- <profile>
- <id>tests</id>
- <build>
- <finalName>eXo-kernel-integration-tests-${project.version}</finalName>
- <defaultGoal>integration-test</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/it/Test*.java</exclude>
- </excludes>
- </configuration>
- <executions>
- <execution>
- <id>integration-tests</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skip>false</skip>
- <excludes>
- <exclude>none</exclude>
- </excludes>
- <includes>
- <include>**/it/Test*.java</include>
- </includes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <id>tests-with-jboss</id>
- <build>
- <finalName>eXo-kernel-integration-tests-${project.version}</finalName>
- <defaultGoal>integration-test</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>jbossas-check-environment-ready</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireProperty>
- <property>jboss.home</property>
- <message>"You must define the property jboss.home to give the path to the package/pkg built GateIn JBoss instance"</message>
- </requireProperty>
- <requireFilesExist>
- <files>
- <file>${jboss.home}</file>
- </files>
- <message>"JBossAS directory doesn't exist : ${jboss.home}"</message>
- </requireFilesExist>
- <requireFilesExist>
- <files>
- <file>${jboss.home}/server/${jboss.conf}/deploy/gatein.ear</file>
- </files>
- <message>"JBossAS directory has no gatein.ear deployed: ${jboss.home}/server/${jboss.conf}/deploy/gatein.ear"</message>
- </requireFilesExist>
- </rules>
- <fail>true</fail>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>1.0</version>
- <configuration>
- <wait>false</wait>
- <container>
- <containerId>jboss5x</containerId>
- <type>installed</type>
- <home>${jboss.home}</home>
- <timeout>300000</timeout>
- <output>${jboss.home}/server/${jboss.conf}/log/output.log</output>
- </container>
- <configuration>
- <type>existing</type>
- <home>${jboss.home}/server/${jboss.conf}</home>
- <properties>
- <cargo.jboss.configuration>${jboss.conf}</cargo.jboss.configuration>
- <cargo.servlet.port>${jboss.port}</cargo.servlet.port>
- <cargo.rmi.port>1099</cargo.rmi.port>
- <cargo.jvmargs>-Xmx768m -XX:MaxPermSize=128m</cargo.jvmargs>
- </properties>
- <!--
- This module's artifact (.war) gets deployed automatically by cargo,
- but we don't use it for integration tests.
- We use some previously installed build of the same artifact,
- deployed under a different name as part of package/pkg build.
- It is bound to a different context than the one deployed by cargo.
- We only use cargo to start and stop jboss.
- -->
- <!--deployables>
- <deployable>
- <groupId>${project.groupId}</groupId>
- <artifactId>${project.artifactId}</artifactId>
- <type>${project.packaging}</type>
- </deployable>
- </deployables-->
- </configuration>
- </configuration>
-
- <executions>
- <execution>
- <id>start-container</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/it/Test*.java</exclude>
- </excludes>
- </configuration>
- <executions>
- <execution>
- <id>integration-tests</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skip>false</skip>
- <excludes>
- <exclude>none</exclude>
- </excludes>
- <includes>
- <include>**/it/Test*.java</include>
- </includes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <properties>
- <jboss.conf>default</jboss.conf>
- <jboss.port>8080</jboss.port>
- </properties>
- </profile>
-
- <profile>
- <id>tests-with-tomcat</id>
- <build>
- <finalName>eXo-kernel-integration-tests-${project.version}</finalName>
- <defaultGoal>integration-test</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-enforcer-plugin</artifactId>
- <executions>
- <execution>
- <id>tomcat-check-environment-ready</id>
- <goals>
- <goal>enforce</goal>
- </goals>
- <configuration>
- <rules>
- <requireProperty>
- <property>tomcat.home</property>
- <message>"You must define the property tomcat.home to give the path to the package/pkg built GateIn Tomcat instance"</message>
- </requireProperty>
- <requireFilesExist>
- <files>
- <file>${tomcat.home}</file>
- </files>
- <message>"Tomcat directory doesn't exist : ${tomcat.home}"</message>
- </requireFilesExist>
- <requireFilesExist>
- <files>
- <file>${tomcat.home}/webapps/portal.war</file>
- </files>
- <message>"Tomcat directory has no portal.war deployed: ${tomcat.home}/webapps/portal.war"</message>
- </requireFilesExist>
- </rules>
- <fail>true</fail>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>1.0</version>
- <configuration>
- <wait>false</wait>
- <container>
- <containerId>tomcat6x</containerId>
- <type>installed</type>
- <home>${tomcat.home}</home>
- <timeout>300000</timeout>
- <output>${tomcat.home}/logs/output.log</output>
- </container>
- <configuration>
- <type>existing</type>
- <home>${tomcat.home}</home>
- <properties>
- <cargo.servlet.port>${tomcat.port}</cargo.servlet.port>
- <cargo.jvmargs>-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xmx512m -XX:MaxPermSize=128m</cargo.jvmargs>
- <cargo.logging>low</cargo.logging>
- </properties>
- <!--
- This module's artifact (.war) gets deployed automatically by cargo,
- but we don't use it for integration tests.
- We use some previously installed build of the same artifact,
- deployed under a different name as part of package/pkg build.
- It is bound to a different context than the one deployed by cargo.
- We only use cargo to start and stop tomcat.
- -->
- </configuration>
- </configuration>
-
- <executions>
- <execution>
- <id>start-container</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>**/it/Test*.java</exclude>
- </excludes>
- </configuration>
- <executions>
- <execution>
- <id>integration-tests</id>
- <phase>integration-test</phase>
- <goals>
- <goal>test</goal>
- </goals>
- <configuration>
- <skip>false</skip>
- <excludes>
- <exclude>none</exclude>
- </excludes>
- <includes>
- <include>**/it/Test*.java</include>
- </includes>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <properties>
- <tomcat.port>8080</tomcat.port>
- </properties>
- </profile>
- </profiles>
-</project>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>mc-integration-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+
+ <artifactId>exo.kernel.mc-int-tests</artifactId>
+ <packaging>war</packaging>
+
+ <name>eXo Kernel :: MC Kernel Integration :: Tests</name>
+ <description>MC Kernel Integration Tests</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.7</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-int-demo</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <!-- In version 2.1-alpha-1, this was incorrectly named warSourceExcludes -->
+ <!--packagingExcludes>WEB-INF/lib/*.jar</packagingExcludes-->
+ <packagingIncludes>WEB-INF/lib/junit-*.jar,WEB-INF/classes/**</packagingIncludes>
+ <archive>
+ <manifest>
+ <addClasspath>false</addClasspath>
+ <!-- Doesn't seem to be working: -->
+ <!--classpathPrefix>gatein.ear/lib/</classpathPrefix-->
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>tests</id>
+ <build>
+ <finalName>eXo-kernel-integration-tests-${project.version}</finalName>
+ <defaultGoal>integration-test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/it/Test*.java</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-tests</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <excludes>
+ <exclude>none</exclude>
+ </excludes>
+ <includes>
+ <include>**/it/Test*.java</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>tests-with-jboss</id>
+ <build>
+ <finalName>eXo-kernel-integration-tests-${project.version}</finalName>
+ <defaultGoal>integration-test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jbossas-check-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+ <property>jboss.home</property>
+ <message>"You must define the property jboss.home to give the path to the package/pkg built GateIn JBoss instance"</message>
+ </requireProperty>
+ <requireFilesExist>
+ <files>
+ <file>${jboss.home}</file>
+ </files>
+ <message>"JBossAS directory doesn't exist : ${jboss.home}"</message>
+ </requireFilesExist>
+ <requireFilesExist>
+ <files>
+ <file>${jboss.home}/server/${jboss.conf}/deploy/gatein.ear</file>
+ </files>
+ <message>"JBossAS directory has no gatein.ear deployed: ${jboss.home}/server/${jboss.conf}/deploy/gatein.ear"</message>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>1.0</version>
+ <configuration>
+ <wait>false</wait>
+ <container>
+ <containerId>jboss5x</containerId>
+ <type>installed</type>
+ <home>${jboss.home}</home>
+ <timeout>300000</timeout>
+ <output>${jboss.home}/server/${jboss.conf}/log/output.log</output>
+ </container>
+ <configuration>
+ <type>existing</type>
+ <home>${jboss.home}/server/${jboss.conf}</home>
+ <properties>
+ <cargo.jboss.configuration>${jboss.conf}</cargo.jboss.configuration>
+ <cargo.servlet.port>${jboss.port}</cargo.servlet.port>
+ <cargo.rmi.port>1099</cargo.rmi.port>
+ <cargo.jvmargs>-Xmx768m -XX:MaxPermSize=128m</cargo.jvmargs>
+ </properties>
+ <!--
+ This module's artifact (.war) gets deployed automatically by cargo,
+ but we don't use it for integration tests.
+ We use some previously installed build of the same artifact,
+ deployed under a different name as part of package/pkg build.
+ It is bound to a different context than the one deployed by cargo.
+ We only use cargo to start and stop jboss.
+ -->
+ <!--deployables>
+ <deployable>
+ <groupId>${project.groupId}</groupId>
+ <artifactId>${project.artifactId}</artifactId>
+ <type>${project.packaging}</type>
+ </deployable>
+ </deployables-->
+ </configuration>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>start-container</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop-container</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/it/Test*.java</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-tests</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <excludes>
+ <exclude>none</exclude>
+ </excludes>
+ <includes>
+ <include>**/it/Test*.java</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <properties>
+ <jboss.conf>default</jboss.conf>
+ <jboss.port>8080</jboss.port>
+ </properties>
+ </profile>
+
+ <profile>
+ <id>tests-with-tomcat</id>
+ <build>
+ <finalName>eXo-kernel-integration-tests-${project.version}</finalName>
+ <defaultGoal>integration-test</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>tomcat-check-environment-ready</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireProperty>
+ <property>tomcat.home</property>
+ <message>"You must define the property tomcat.home to give the path to the package/pkg built GateIn Tomcat instance"</message>
+ </requireProperty>
+ <requireFilesExist>
+ <files>
+ <file>${tomcat.home}</file>
+ </files>
+ <message>"Tomcat directory doesn't exist : ${tomcat.home}"</message>
+ </requireFilesExist>
+ <requireFilesExist>
+ <files>
+ <file>${tomcat.home}/webapps/portal.war</file>
+ </files>
+ <message>"Tomcat directory has no portal.war deployed: ${tomcat.home}/webapps/portal.war"</message>
+ </requireFilesExist>
+ </rules>
+ <fail>true</fail>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>1.0</version>
+ <configuration>
+ <wait>false</wait>
+ <container>
+ <containerId>tomcat6x</containerId>
+ <type>installed</type>
+ <home>${tomcat.home}</home>
+ <timeout>300000</timeout>
+ <output>${tomcat.home}/logs/output.log</output>
+ </container>
+ <configuration>
+ <type>existing</type>
+ <home>${tomcat.home}</home>
+ <properties>
+ <cargo.servlet.port>${tomcat.port}</cargo.servlet.port>
+ <cargo.jvmargs>-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Xmx512m -XX:MaxPermSize=128m</cargo.jvmargs>
+ <cargo.logging>low</cargo.logging>
+ </properties>
+ <!--
+ This module's artifact (.war) gets deployed automatically by cargo,
+ but we don't use it for integration tests.
+ We use some previously installed build of the same artifact,
+ deployed under a different name as part of package/pkg build.
+ It is bound to a different context than the one deployed by cargo.
+ We only use cargo to start and stop tomcat.
+ -->
+ </configuration>
+ </configuration>
+
+ <executions>
+ <execution>
+ <id>start-container</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>stop-container</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/it/Test*.java</exclude>
+ </excludes>
+ </configuration>
+ <executions>
+ <execution>
+ <id>integration-tests</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <skip>false</skip>
+ <excludes>
+ <exclude>none</exclude>
+ </excludes>
+ <includes>
+ <include>**/it/Test*.java</include>
+ </includes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <properties>
+ <tomcat.port>8080</tomcat.port>
+ </properties>
+ </profile>
+ </profiles>
+</project>
Modified: kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/exo.kernel.mc-integration/exo.kernel.mc-kernel-extras/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,23 +1,23 @@
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>mc-integration-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
-
- <artifactId>exo.kernel.mc-kernel-extras</artifactId>
-
- <name>eXo Kernel :: MC Kernel Extras</name>
- <description>MC Kernel 2.2.0 classes that aren't available in mc-kernel 2.0.6.GA</description>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- </dependency>
- </dependencies>
-</project>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>mc-integration-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+
+ <artifactId>exo.kernel.mc-kernel-extras</artifactId>
+
+ <name>eXo Kernel :: MC Kernel Extras</name>
+ <description>MC Kernel 2.2.0 classes that aren't available in mc-kernel 2.0.6.GA</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Modified: kernel/trunk/exo.kernel.mc-integration/pom.xml
===================================================================
--- kernel/trunk/exo.kernel.mc-integration/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/exo.kernel.mc-integration/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,92 +1,92 @@
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
-
- <artifactId>mc-integration-parent</artifactId>
- <packaging>pom</packaging>
-
- <name>eXo Kernel :: MC Kernel Integration</name>
- <description>MC Kernel Integration</description>
-
- <properties>
- <!--version.parent>2.2.0-Beta05-SNAPSHOT</version.parent-->
- <version.jboss.mc>2.0.6.GA</version.jboss.mc>
- <version.jboss.mc-int>2.2.0.Alpha2</version.jboss.mc-int>
- <version.jboss.classloader>2.0.7.GA</version.jboss.classloader>
-
- </properties>
- <modules>
- <module>exo.kernel.mc-int</module>
- <module>exo.kernel.mc-kernel-extras</module>
- <module>exo.kernel.mc-int-demo</module>
- <module>exo.kernel.mc-int-tests</module>
- </modules>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.mc-int</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.mc-int-demo</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.mc-kernel-extras</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-dependency</artifactId>
- <version>${version.jboss.mc}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-kernel</artifactId>
- <version>${version.jboss.mc}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-aop-mc-int</artifactId>
- <version>${version.jboss.mc}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.mc-int</groupId>
- <artifactId>jboss-mc-int-common</artifactId>
- <version>${version.jboss.mc-int}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.mc-int</groupId>
- <artifactId>jboss-mc-int-servlet</artifactId>
- <version>${version.jboss.mc-int}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.cl</groupId>
- <artifactId>jboss-classloader</artifactId>
- <version>${version.jboss.classloader}</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
-</project>
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>kernel-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+
+ <artifactId>mc-integration-parent</artifactId>
+ <packaging>pom</packaging>
+
+ <name>eXo Kernel :: MC Kernel Integration</name>
+ <description>MC Kernel Integration</description>
+
+ <properties>
+ <!--version.parent>2.2.0-Beta05-SNAPSHOT</version.parent-->
+ <version.jboss.mc>2.0.6.GA</version.jboss.mc>
+ <version.jboss.mc-int>2.2.0.Alpha2</version.jboss.mc-int>
+ <version.jboss.classloader>2.0.7.GA</version.jboss.classloader>
+
+ </properties>
+ <modules>
+ <module>exo.kernel.mc-int</module>
+ <module>exo.kernel.mc-kernel-extras</module>
+ <module>exo.kernel.mc-int-demo</module>
+ <module>exo.kernel.mc-int-tests</module>
+ </modules>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-int</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-int-demo</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.mc-kernel-extras</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-dependency</artifactId>
+ <version>${version.jboss.mc}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-kernel</artifactId>
+ <version>${version.jboss.mc}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.microcontainer</groupId>
+ <artifactId>jboss-aop-mc-int</artifactId>
+ <version>${version.jboss.mc}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.mc-int</groupId>
+ <artifactId>jboss-mc-int-common</artifactId>
+ <version>${version.jboss.mc-int}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.mc-int</groupId>
+ <artifactId>jboss-mc-int-servlet</artifactId>
+ <version>${version.jboss.mc-int}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cl</groupId>
+ <artifactId>jboss-classloader</artifactId>
+ <version>${version.jboss.classloader}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+</project>
Modified: kernel/trunk/packaging/module/pom.xml
===================================================================
--- kernel/trunk/packaging/module/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/packaging/module/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,67 +1,67 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <parent>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- </parent>
-
- <modelVersion>4.0.0</modelVersion>
- <artifactId>kernel.packaging.module</artifactId>
- <packaging>pom</packaging>
- <name>eXo Kernel Build module</name>
-
- <properties>
- <exobuild.name>kernel</exobuild.name>
- <exobuild.type>module</exobuild.type>
- <enforcer.skip>true</enforcer.skip>
- </properties>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <executions>
- <execution>
- <id>prepare</id>
- <phase>package</phase>
- <goals>
- <goal>copy-resources</goal>
- </goals>
- <configuration>
- <outputDirectory>target</outputDirectory>
- <resources>
- <resource>
- <directory>src/main/javascript</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.3</version>
- <executions>
- <execution>
- <id>attach-artifacts</id>
- <phase>package</phase>
- <goals>
- <goal>attach-artifact</goal>
- </goals>
- <configuration>
- <artifacts>
- <artifact>
- <file>target/${exobuild.name}.packaging.${exobuild.type}.js</file>
- <type>js</type>
- </artifact>
- </artifacts>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>kernel-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>kernel.packaging.module</artifactId>
+ <packaging>pom</packaging>
+ <name>eXo Kernel Build module</name>
+
+ <properties>
+ <exobuild.name>kernel</exobuild.name>
+ <exobuild.type>module</exobuild.type>
+ <enforcer.skip>true</enforcer.skip>
+ </properties>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>prepare</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>target</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/javascript</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <id>attach-artifacts</id>
+ <phase>package</phase>
+ <goals>
+ <goal>attach-artifact</goal>
+ </goals>
+ <configuration>
+ <artifacts>
+ <artifact>
+ <file>target/${exobuild.name}.packaging.${exobuild.type}.js</file>
+ <type>js</type>
+ </artifact>
+ </artifacts>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Modified: kernel/trunk/pom.xml
===================================================================
--- kernel/trunk/pom.xml 2010-07-26 14:07:57 UTC (rev 2813)
+++ kernel/trunk/pom.xml 2010-07-27 09:58:54 UTC (rev 2814)
@@ -1,220 +1,220 @@
-<!--
-
- 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.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform</groupId>
- <artifactId>foundation-parent</artifactId>
- <version>7</version>
- </parent>
-
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>kernel-parent</artifactId>
- <version>2.3.0-Beta01-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <name>eXo Kernel</name>
-
- <properties>
- <exo.product.name>exo-kernel</exo.product.name>
- <exo.product.specification>2.3</exo.product.specification>
- <org.exoplatform.framework.junit.version>1.2.1-GA</org.exoplatform.framework.junit.version>
- <forkMode>always</forkMode>
- </properties>
-
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/exo-jcr/kernel/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/exo-jcr/kernel/trunk</developerConnection>
- <url>http://fisheye.jboss.org/browse/exo-jcr/kernel/trunk</url>
- </scm>
-
- <modules>
- <module>exo.kernel.container</module>
- <module>exo.kernel.commons</module>
- <module>exo.kernel.commons.test</module>
- <module>exo.kernel.component.common</module>
- <module>exo.kernel.component.cache</module>
- <module>exo.kernel.component.ext.cache.impl.jboss.v3</module>
- <module>exo.kernel.component.command</module>
- <module>exo.kernel.mc-integration</module>
- <module>packaging/module</module>
- </modules>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.tool</groupId>
- <artifactId>exo.tool.framework.junit</artifactId>
- <version>${org.exoplatform.framework.junit.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.commons.test</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.component.remote</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.component.cache</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>xpp3</groupId>
- <artifactId>xpp3</artifactId>
- <version>1.1.3.4.O</version>
- </dependency>
- <dependency>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>commons-beanutils</groupId>
- <artifactId>commons-beanutils</artifactId>
- <version>1.8.0</version>
- </dependency>
- <dependency>
- <groupId>commons-chain</groupId>
- <artifactId>commons-chain</artifactId>
- <version>1.0</version>
- </dependency>
- <dependency>
- <groupId>commons-digester</groupId>
- <artifactId>commons-digester</artifactId>
- <version>1.8.1</version>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- <version>1.5.8</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.5.8</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.14</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- <version>1.0.b2</version>
- </dependency>
- <dependency>
- <groupId>quartz</groupId>
- <artifactId>quartz</artifactId>
- <version>1.5.2</version>
- </dependency>
- <dependency>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- <version>1.4.2</version>
- </dependency>
- <dependency>
- <groupId>javax.activation</groupId>
- <artifactId>activation</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>javax.resource</groupId>
- <artifactId>connector-api</artifactId>
- <version>1.5</version>
- </dependency>
- <dependency>
- <groupId>javax.transaction</groupId>
- <artifactId>jta</artifactId>
- <version>1.0.1B</version>
- </dependency>
- <dependency>
- <groupId>picocontainer</groupId>
- <artifactId>picocontainer</artifactId>
- <version>1.1</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.5</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>jgroups</groupId>
- <artifactId>jgroups</artifactId>
- <version>2.6.13.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.cache</groupId>
- <artifactId>jbosscache-core</artifactId>
- <version>3.2.4.GA</version>
- </dependency>
- <dependency>
- <groupId>org.jibx</groupId>
- <artifactId>jibx-bind</artifactId>
- <version>${version.jibx.plugin}</version>
- </dependency>
- <dependency>
- <groupId>org.jibx</groupId>
- <artifactId>jibx-extras</artifactId>
- <version>${version.jibx.plugin}</version>
- </dependency>
- <dependency>
- <groupId>org.jibx</groupId>
- <artifactId>jibx-run</artifactId>
- <version>${version.jibx.plugin}</version>
- </dependency>
- <dependency>
- <groupId>jotm</groupId>
- <artifactId>jotm</artifactId>
- <version>2.0.10</version>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-</project>
+<!--
+
+ 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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform</groupId>
+ <artifactId>foundation-parent</artifactId>
+ <version>7</version>
+ </parent>
+
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>kernel-parent</artifactId>
+ <version>2.3.0-Beta01</version>
+ <packaging>pom</packaging>
+
+ <name>eXo Kernel</name>
+
+ <properties>
+ <exo.product.name>exo-kernel</exo.product.name>
+ <exo.product.specification>2.3</exo.product.specification>
+ <org.exoplatform.framework.junit.version>1.2.1-GA</org.exoplatform.framework.junit.version>
+ <forkMode>always</forkMode>
+ </properties>
+
+ <scm>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/exo-jcr/kernel/tags/2.3.0-Beta01</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/exo-jcr/kernel/tags/2.3.0-Beta01</developerConnection>
+ <url>http://fisheye.jboss.org/browse/exo-jcr/kernel/tags/2.3.0-Beta01</url>
+ </scm>
+
+ <modules>
+ <module>exo.kernel.container</module>
+ <module>exo.kernel.commons</module>
+ <module>exo.kernel.commons.test</module>
+ <module>exo.kernel.component.common</module>
+ <module>exo.kernel.component.cache</module>
+ <module>exo.kernel.component.ext.cache.impl.jboss.v3</module>
+ <module>exo.kernel.component.command</module>
+ <module>exo.kernel.mc-integration</module>
+ <module>packaging/module</module>
+ </modules>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.tool</groupId>
+ <artifactId>exo.tool.framework.junit</artifactId>
+ <version>${org.exoplatform.framework.junit.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons.test</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.remote</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.component.cache</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>xpp3</groupId>
+ <artifactId>xpp3</artifactId>
+ <version>1.1.3.4.O</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.8.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-chain</groupId>
+ <artifactId>commons-chain</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ <version>1.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ <version>1.5.8</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.5.8</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.14</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>xml-apis</groupId>
+ <artifactId>xml-apis</artifactId>
+ <version>1.0.b2</version>
+ </dependency>
+ <dependency>
+ <groupId>quartz</groupId>
+ <artifactId>quartz</artifactId>
+ <version>1.5.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.resource</groupId>
+ <artifactId>connector-api</artifactId>
+ <version>1.5</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.0.1B</version>
+ </dependency>
+ <dependency>
+ <groupId>picocontainer</groupId>
+ <artifactId>picocontainer</artifactId>
+ <version>1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>jgroups</groupId>
+ <artifactId>jgroups</artifactId>
+ <version>2.6.13.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-core</artifactId>
+ <version>3.2.4.GA</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jibx</groupId>
+ <artifactId>jibx-bind</artifactId>
+ <version>${version.jibx.plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jibx</groupId>
+ <artifactId>jibx-extras</artifactId>
+ <version>${version.jibx.plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jibx</groupId>
+ <artifactId>jibx-run</artifactId>
+ <version>${version.jibx.plugin}</version>
+ </dependency>
+ <dependency>
+ <groupId>jotm</groupId>
+ <artifactId>jotm</artifactId>
+ <version>2.0.10</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
13 years, 9 months
exo-jcr SVN: r2813 - in jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules: kernel and 1 other directory.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-07-26 10:07:57 -0400 (Mon, 26 Jul 2010)
New Revision: 2813
Added:
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel/listener-service.xml
Modified:
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel.xml
Log:
EXOJCR-311: Topic about asynch event broadcasting added
Added: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel/listener-service.xml
===================================================================
--- jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel/listener-service.xml (rev 0)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel/listener-service.xml 2010-07-26 14:07:57 UTC (rev 2813)
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<chapter id="ch_listener_service">
+ <?dbhtml filename="ch-listener-service.html"?>
+
+ <title>ListenerService</title>
+
+ <section>
+ <title>Asynchronous Event Broadcast</title>
+
+ <para>Basicaly, ListenerService used to store Listeners and broadcast
+ events to them.</para>
+
+ <para>ListenerService event broadcasting works in next way - it takes a
+ destination listeners and executes event on those listeners.</para>
+
+ <para>But, some events may take a lot of time, so idea to make event
+ processing asynchronous is usefull.</para>
+
+ <blockquote>
+ What do I need to make my listener asynchronous?
+ </blockquote>
+
+ <para>- It's very simple, just mark your Listener implementation as
+ <classname>@Asynchronous</classname>.</para>
+
+ <programlisting>@Asynchronous
+class AsynchListenerWithException<S,D> extends Listener<S,D>
+{
+ @Override
+ public void onEvent(Event<S,D> event) throws Exception
+ {
+ // some expensive operation
+ }
+}</programlisting>
+
+ <para>Now, our AsynchListener will be executed in separate thread by
+ <classname>ExecutorService</classname>.</para>
+
+ <para>By default, <classname>ExecutoreService</classname> configured with
+ thread pool size 1, you can change it in configuration:<programlisting> <component>
+ <key>org.exoplatform.services.listener.ListenerService</key>
+ <type>org.exoplatform.services.listener.ListenerService</type>
+
+ <init-params>
+ <value-param>
+ <name>asynchPoolSize</name>
+ <value>5</value>
+ </value-param>
+ </init-params>
+
+ </component></programlisting></para>
+ </section>
+</chapter>
Modified: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel.xml
===================================================================
--- jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel.xml 2010-07-26 13:21:09 UTC (rev 2812)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/kernel.xml 2010-07-26 14:07:57 UTC (rev 2813)
@@ -18,6 +18,9 @@
<xi:include href="kernel/transaction-service.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
+ <xi:include href="kernel/listener-service.xml"
+ xmlns:xi="http://www.w3.org/2001/XInclude" />
+
<xi:include href="kernel/jndi-naming.xml"
xmlns:xi="http://www.w3.org/2001/XInclude" />
13 years, 9 months
exo-jcr SVN: r2812 - in kernel/trunk/exo.kernel.component.common/src: test/java/org/exoplatform/services/listener and 1 other directory.
by do-not-reply@jboss.org
Author: sergiykarpenko
Date: 2010-07-26 09:21:09 -0400 (Mon, 26 Jul 2010)
New Revision: 2812
Added:
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/Asynchronous.java
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerThreadFactory.java
kernel/trunk/exo.kernel.component.common/src/test/java/org/exoplatform/services/listener/TestAsynchronousListener.java
Modified:
kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java
Log:
EXOJCR-311: Make broadcasting of events of ListenerService asynchronous - implemented, test added
Added: kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/Asynchronous.java
===================================================================
--- kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/Asynchronous.java (rev 0)
+++ kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/Asynchronous.java 2010-07-26 13:21:09 UTC (rev 2812)
@@ -0,0 +1,36 @@
+/*
+ * 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.listener;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * This marker annotation shows that Listener must be executed in asynchronous way.
+ * ListenerService will execute asynchronous-marked listener in dedicated thread.
+ *
+ * Created by The eXo Platform SAS.
+ *
+ * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: Asynchronous.java 111 2008-11-11 11:11:11Z serg $
+ */
+(a)Target(ElementType.TYPE)
+(a)Retention(RetentionPolicy.RUNTIME)
+public @interface Asynchronous {
+}
Modified: kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java
===================================================================
--- kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java 2010-07-26 12:00:42 UTC (rev 2811)
+++ kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerService.java 2010-07-26 13:21:09 UTC (rev 2812)
@@ -18,13 +18,17 @@
*/
package org.exoplatform.services.listener;
+import org.exoplatform.container.xml.InitParams;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
+import org.exoplatform.services.naming.InitialContextInitializer;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
/**
* Created by The eXo Platform SAS Author : Nhu Dinh Thuan
@@ -32,29 +36,73 @@
*/
public class ListenerService
{
+ /**
+ * This executor used for asynchronously event broadcast.
+ */
+ private final Executor executor;
+ /**
+ * Listeners by name map.
+ */
private Map<String, List<Listener>> listeners_;
private static Log log = ExoLogger.getLogger("exo.kernel.component.common.ListenerService");
-
+
/**
* Construct a listener service.
*/
public ListenerService()
{
listeners_ = new HashMap<String, List<Listener>>();
+ executor = Executors.newFixedThreadPool(1, new ListenerThreadFactory());
}
/**
+ * Construct a listener service.
+ */
+ public ListenerService(InitialContextInitializer initializer, InitParams params)
+ {
+ listeners_ = new HashMap<String, List<Listener>>();
+ int poolSize = 1;
+
+ if (params != null)
+ {
+ if (params.getValueParam("asynchPoolSize") != null)
+ {
+
+ poolSize = Integer.parseInt(params.getValueParam("asynchPoolSize").getValue());
+ }
+ }
+ executor = Executors.newFixedThreadPool(poolSize, new ListenerThreadFactory());
+ }
+
+ /**
* This method is used to register a listener with the service. The method
* should: 1. Check to see if there is a list of listener with the listener
* name, create one if the listener list doesn't exit 2. Add the new listener
- * to the listener list
+ * to the listener list.
*
* @param listener
*/
public void addListener(Listener listener)
{
+ // Check is Listener or its superclass asynchronous, if so - wrap it in AsynchronousListener.
+ Class listenerClass = listener.getClass();
+
+ do
+ {
+ if (listenerClass.isAnnotationPresent(Asynchronous.class))
+ {
+ listener = new AsynchronousListener(listener);
+ break;
+ }
+ else
+ {
+ listenerClass = listenerClass.getSuperclass();
+ }
+ }
+ while (listenerClass != null);
+
String name = listener.getName();
List<Listener> list = listeners_.get(name);
if (list == null)
@@ -101,7 +149,17 @@
{
log.debug("broadcasting event " + name + " on " + listener.getName());
}
- listener.onEvent(new Event<S, D>(name, source, data));
+
+ try
+ {
+ listener.onEvent(new Event<S, D>(name, source, data));
+ }
+ catch (Exception e)
+ {
+ // log exception and keep broadcast events
+ log.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
+ log.info("Exception occures but keep broadcast events.");
+ }
}
}
@@ -121,8 +179,98 @@
{
List<Listener> list = listeners_.get(event.getEventName());
if (list == null)
+ {
return;
+ }
for (Listener listener : list)
- listener.onEvent(event);
+ {
+ try
+ {
+ listener.onEvent(event);
+ }
+ catch (Exception e)
+ {
+ // log exception and keep broadcast events
+ log.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
+ log.info("Exception occures but keep broadcast events.");
+ }
+ }
}
+
+ /**
+ * This AsynchronousListener is a wrapper for original listener, that
+ * executes wrapped listeners onEvent() in separate thread.
+ */
+ protected class AsynchronousListener<S, D> extends Listener<S, D>
+ {
+ private Listener<S, D> listener;
+
+ public AsynchronousListener(Listener<S, D> listener)
+ {
+ this.listener = listener;
+ }
+
+ @Override
+ public String getName()
+ {
+ return listener.getName();
+ }
+
+ @Override
+ public void setName(String s)
+ {
+ listener.setName(s);
+ }
+
+ @Override
+ public String getDescription()
+ {
+ return listener.getDescription();
+ }
+
+ @Override
+ public void setDescription(String s)
+ {
+ listener.setDescription(s);
+ }
+
+ @Override
+ public void onEvent(Event<S, D> event) throws Exception
+ {
+ executor.execute(new RunListener<S, D>(listener, event));
+ }
+ }
+
+ /**
+ * This thread executes listener.onEvent(event) method.
+ */
+ protected class RunListener<S, D> implements Runnable
+ {
+ private Listener<S, D> listener;
+
+ private Event<S, D> event;
+
+ public RunListener(Listener<S, D> listener, Event<S, D> event)
+ {
+ this.listener = listener;
+ this.event = event;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void run()
+ {
+ try
+ {
+ listener.onEvent(event);
+ }
+ catch (Exception e)
+ {
+ // Do not throw exception. Event is asynchronous so just report error.
+ // Must say that exception will be ignored even in synchronous events.
+ log.error("Exception on broadcasting events occures: " + e.getMessage(), e.getCause());
+ }
+ }
+ }
}
Added: kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerThreadFactory.java
===================================================================
--- kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerThreadFactory.java (rev 0)
+++ kernel/trunk/exo.kernel.component.common/src/main/java/org/exoplatform/services/listener/ListenerThreadFactory.java 2010-07-26 13:21:09 UTC (rev 2812)
@@ -0,0 +1,62 @@
+/*
+ * 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.listener;
+
+import java.util.concurrent.ThreadFactory;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * This ThreadFactory implementation is a copy of Executors$DefaultThreadFactory.
+ * Its copied for single purpose - make readable thread name.
+ *
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: ListenerThreadFactory.java 111 2008-11-11 11:11:11Z serg $
+ */
+public class ListenerThreadFactory implements ThreadFactory
+{
+ static final AtomicInteger poolNumber = new AtomicInteger(1);
+
+ final ThreadGroup group;
+
+ final AtomicInteger threadNumber = new AtomicInteger(1);
+
+ final String namePrefix;
+
+ ListenerThreadFactory()
+ {
+ SecurityManager s = System.getSecurityManager();
+ group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup();
+ namePrefix = "asynch-event-" + poolNumber.getAndIncrement() + "-thread-";
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public Thread newThread(Runnable r)
+ {
+ Thread t = new Thread(group, r, namePrefix + threadNumber.getAndIncrement(), 0);
+ if (t.isDaemon())
+ t.setDaemon(false);
+ if (t.getPriority() != Thread.NORM_PRIORITY)
+ t.setPriority(Thread.NORM_PRIORITY);
+ return t;
+ }
+}
Added: kernel/trunk/exo.kernel.component.common/src/test/java/org/exoplatform/services/listener/TestAsynchronousListener.java
===================================================================
--- kernel/trunk/exo.kernel.component.common/src/test/java/org/exoplatform/services/listener/TestAsynchronousListener.java (rev 0)
+++ kernel/trunk/exo.kernel.component.common/src/test/java/org/exoplatform/services/listener/TestAsynchronousListener.java 2010-07-26 13:21:09 UTC (rev 2812)
@@ -0,0 +1,249 @@
+/*
+ * 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.listener;
+
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.test.BasicTestCase;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date:
+ *
+ * @author <a href="karpenko.sergiy(a)gmail.com">Karpenko Sergiy</a>
+ * @version $Id: TestAsynchronousListener.java 111 2008-11-11 11:11:11Z serg $
+ */
+public class TestAsynchronousListener extends BasicTestCase
+{
+ private ListenerService service_;
+
+ public void setUp() throws Exception
+ {
+ setTestNumber(1);
+ PortalContainer manager = PortalContainer.getInstance();
+ service_ = (ListenerService)manager.getComponentInstanceOfType(ListenerService.class);
+ }
+
+ public void testAsynchronousListener() throws Exception
+ {
+ final String listenerName = "test_asynch";
+ final String baseString = "Value not changed";
+
+ assertTrue(service_ != null);
+ Listener<Object, StrValue> listener = new AsynchListener();
+ listener.setName(listenerName);
+ listener.setDescription("Asynchronous listener");
+
+ service_.addListener(listener);
+
+ StrValue testValue = new StrValue(baseString);
+
+ service_.broadcast(listenerName, new Object(), testValue);
+
+ // if asynch enabled value must be changed later so it's same exact after listener
+ // broadcasting
+ assertEquals(baseString, testValue.getValue());
+ }
+
+ public void testParentAsynchListener() throws Exception
+ {
+ final String listenerName = "test_parent_asynch";
+ final String baseString = "Value not changed";
+
+ assertTrue(service_ != null);
+ Listener<Object, StrValue> listener = new ExtendedAsynchListener();
+ listener.setName(listenerName);
+ listener.setDescription("Asynchronous listener");
+
+ service_.addListener(listener);
+
+ StrValue testValue = new StrValue(baseString);
+
+ service_.broadcast(listenerName, new Object(), testValue);
+
+ // if asynch enabled value must be changed later so it's same exact after listener
+ // broadcasting
+ assertEquals(baseString, testValue.getValue());
+ }
+
+ public void testSynchronousListener() throws Exception
+ {
+ final String listenerName = "test_synch";
+ final String baseString = "Value not changed";
+
+ assertTrue(service_ != null);
+ Listener<Object, StrValue> listener = new SynchListener();
+ listener.setName(listenerName);
+ listener.setDescription("Synchronous listener");
+
+ service_.addListener(listener);
+
+ StrValue testValue = new StrValue(baseString);
+
+ service_.broadcast(listenerName, null, testValue);
+
+ // if Synch enabled - broadcast must wait until all events will be processed,
+ // so value must be changed
+ assertFalse(baseString.equals(testValue.getValue()));
+ }
+
+ public void testSynchronousExeption() throws Exception
+ {
+ try
+ {
+ final String listenerName = "test_synch_exeption";
+
+ assertTrue(service_ != null);
+ Listener<Object, StrValue> listener = new SynchListenerWithException();
+ listener.setName(listenerName);
+ listener.setDescription("Synchronous listener with exception");
+
+ service_.addListener(listener);
+
+ StrValue testValue = new StrValue("no matter");
+
+ service_.broadcast(listenerName, null, testValue);
+ // exception must be ignored
+ }
+ catch (Exception e)
+ {
+ fail("Exception must be ignored.");
+ }
+ }
+
+ public void testAsynchronousExeption() throws Exception
+ {
+ try
+ {
+ final String listenerName = "test_asynch_exeption";
+
+ assertTrue(service_ != null);
+ Listener<Object, StrValue> listener = new AsynchListenerWithException();
+ listener.setName(listenerName);
+ listener.setDescription("Asynchronous listener with exception");
+
+ service_.addListener(listener);
+
+ StrValue testValue = new StrValue("no matter");
+
+ service_.broadcast(listenerName, null, testValue);
+ // exception must be ignored
+
+ Object obj = new Object();
+ synchronized (obj)
+ {
+ obj.wait(1000);
+ }
+ }
+ catch (Exception e)
+ {
+ fail("Exception must be ignored.");
+ }
+ }
+
+ class StrValue
+ {
+ private String val;
+
+ public StrValue(String value)
+ {
+ val = value;
+ }
+
+ public void setValue(String value)
+ {
+ val = value;
+ }
+
+ public String getValue()
+ {
+ return val;
+ }
+ }
+
+ @Asynchronous
+ class AsynchListener extends Listener<Object, StrValue>
+ {
+ @Override
+ public void onEvent(Event<Object, StrValue> event) throws Exception
+ {
+ //wait
+ Object obj = new Object();
+ synchronized (obj)
+ {
+ obj.wait(1000);
+ }
+ //change test value
+ event.getData().setValue("Value become changed");
+ }
+ }
+
+ class SynchListener extends Listener<Object, StrValue>
+ {
+ @Override
+ public void onEvent(Event<Object, StrValue> event) throws Exception
+ {
+ //wait
+ Object obj = new Object();
+ synchronized (obj)
+ {
+ obj.wait(1000);
+ }
+ //change test value
+ event.getData().setValue("Value become changed");
+ }
+ }
+
+ class ExtendedAsynchListener extends AsynchListener
+ {
+ // do nothing. This class exist only for check, does ListenerService process
+ // extended Asynchronous listeners as asynchronous
+ }
+
+ @Asynchronous
+ class AsynchListenerWithException extends Listener<Object, StrValue>
+ {
+ @Override
+ public void onEvent(Event<Object, StrValue> event) throws Exception
+ {
+ //wait
+ Object obj = new Object();
+ synchronized (obj)
+ {
+ obj.wait(1000);
+ }
+
+ throw new Exception("This is test exception");
+ }
+ }
+
+ class SynchListenerWithException extends Listener<Object, StrValue>
+ {
+ @Override
+ public void onEvent(Event<Object, StrValue> event) throws Exception
+ {
+ //wait
+ Object obj = new Object();
+ synchronized (obj)
+ {
+ obj.wait(1000);
+ }
+
+ throw new Exception("This is test exception");
+ }
+ }
+}
13 years, 9 months
exo-jcr SVN: r2811 - in ws/trunk/exo.ws.frameworks.json/src: test/java/org/exoplatform/ws/frameworks/json/impl and 1 other directory.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-07-26 08:00:42 -0400 (Mon, 26 Jul 2010)
New Revision: 2811
Modified:
ws/trunk/exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl/JsonGeneratorImpl.java
ws/trunk/exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl/JsonUtils.java
ws/trunk/exo.ws.frameworks.json/src/test/java/org/exoplatform/ws/frameworks/json/impl/JsonGeneratorTest.java
ws/trunk/exo.ws.frameworks.json/src/test/java/org/exoplatform/ws/frameworks/json/impl/JsonParserTest.java
Log:
EXOJCR-190 deserealisation added.
Modified: ws/trunk/exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl/JsonGeneratorImpl.java
===================================================================
--- ws/trunk/exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl/JsonGeneratorImpl.java 2010-07-23 09:26:38 UTC (rev 2810)
+++ ws/trunk/exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl/JsonGeneratorImpl.java 2010-07-26 12:00:42 UTC (rev 2811)
@@ -18,17 +18,6 @@
*/
package org.exoplatform.ws.frameworks.json.impl;
-import org.exoplatform.ws.frameworks.json.JsonGenerator;
-import org.exoplatform.ws.frameworks.json.impl.JsonUtils.Types;
-import org.exoplatform.ws.frameworks.json.value.JsonValue;
-import org.exoplatform.ws.frameworks.json.value.impl.ArrayValue;
-import org.exoplatform.ws.frameworks.json.value.impl.BooleanValue;
-import org.exoplatform.ws.frameworks.json.value.impl.DoubleValue;
-import org.exoplatform.ws.frameworks.json.value.impl.LongValue;
-import org.exoplatform.ws.frameworks.json.value.impl.NullValue;
-import org.exoplatform.ws.frameworks.json.value.impl.ObjectValue;
-import org.exoplatform.ws.frameworks.json.value.impl.StringValue;
-
import java.lang.reflect.Array;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -41,6 +30,17 @@
import java.util.Map;
import java.util.Set;
+import org.exoplatform.ws.frameworks.json.JsonGenerator;
+import org.exoplatform.ws.frameworks.json.impl.JsonUtils.Types;
+import org.exoplatform.ws.frameworks.json.value.JsonValue;
+import org.exoplatform.ws.frameworks.json.value.impl.ArrayValue;
+import org.exoplatform.ws.frameworks.json.value.impl.BooleanValue;
+import org.exoplatform.ws.frameworks.json.value.impl.DoubleValue;
+import org.exoplatform.ws.frameworks.json.value.impl.LongValue;
+import org.exoplatform.ws.frameworks.json.value.impl.NullValue;
+import org.exoplatform.ws.frameworks.json.value.impl.ObjectValue;
+import org.exoplatform.ws.frameworks.json.value.impl.StringValue;
+
/**
* @author <a href="mailto:andrew00x@gmail.com">Andrey Parfonov</a>
* @version $Id: JsonGeneratorImpl.java 34417 2009-07-23 14:42:56Z dkatayev $
@@ -51,6 +51,132 @@
/**
* {@inheritDoc}
*/
+ public JsonValue createJsonArray(Collection<?> collection) throws JsonException
+ {
+ if (collection == null)
+ return new NullValue();
+
+ JsonValue jsonArray = new ArrayValue();
+ for (Object o : collection)
+ {
+ // If :
+ // 1. Known types (primitive, String, array of primitive or String)
+ // 2. Array of any object (expect for Java Bean)
+ // 3. Collection<?>
+ // 4. Map<String, ?>
+ if (JsonUtils.getType(o) != null)
+ jsonArray.addElement(createJsonValue(o));
+ else
+ jsonArray.addElement(createJsonObject(o));
+ }
+ return jsonArray;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public JsonValue createJsonArray(Object array) throws JsonException
+ {
+ if (array == null)
+ return new NullValue();
+
+ Types t = JsonUtils.getType(array);
+ JsonValue jsonArray = new ArrayValue();
+ int length = Array.getLength(array);
+ if (t == Types.ARRAY_BOOLEAN)
+ {
+ for (int i = 0; i < length; i++)
+ jsonArray.addElement(new BooleanValue(Array.getBoolean(array, i)));
+ }
+ else if (t == Types.ARRAY_BYTE)
+ {
+ for (int i = 0; i < length; i++)
+ jsonArray.addElement(new LongValue(Array.getByte(array, i)));
+ }
+ else if (t == Types.ARRAY_SHORT)
+ {
+ for (int i = 0; i < length; i++)
+ jsonArray.addElement(new LongValue(Array.getShort(array, i)));
+ }
+ else if (t == Types.ARRAY_INT)
+ {
+ for (int i = 0; i < length; i++)
+ jsonArray.addElement(new LongValue(Array.getInt(array, i)));
+ }
+ else if (t == Types.ARRAY_LONG)
+ {
+ for (int i = 0; i < length; i++)
+ jsonArray.addElement(new LongValue(Array.getLong(array, i)));
+ }
+ else if (t == Types.ARRAY_FLOAT)
+ {
+ for (int i = 0; i < length; i++)
+ jsonArray.addElement(new DoubleValue(Array.getFloat(array, i)));
+ }
+ else if (t == Types.ARRAY_DOUBLE)
+ {
+ for (int i = 0; i < length; i++)
+ jsonArray.addElement(new DoubleValue(Array.getDouble(array, i)));
+ }
+ else if (t == Types.ARRAY_CHAR)
+ {
+ for (int i = 0; i < length; i++)
+ jsonArray.addElement(new StringValue(Character.toString(Array.getChar(array, i))));
+ }
+ else if (t == Types.ARRAY_STRING)
+ {
+ for (int i = 0; i < length; i++)
+ jsonArray.addElement(new StringValue((String)Array.get(array, i)));
+ }
+ else if (t == Types.ARRAY_OBJECT)
+ {
+ for (int i = 0; i < length; i++)
+ {
+ Object el = Array.get(array, i);
+ // If :
+ // 1. Known types (primitive, String, array of primitive or String)
+ // 2. Array of any object (expect for Java Bean)
+ // 3. Collection<?>
+ // 4. Map<String, ?>
+ if (JsonUtils.getType(el) != null)
+ jsonArray.addElement(createJsonValue(el));
+ else
+ jsonArray.addElement(createJsonObject(el));
+ }
+ }
+ else
+ {
+ throw new JsonException("Invalid argument, must be array.");
+ }
+ return jsonArray;
+ }
+
+ public JsonValue createJsonObject(Map<String, Object> map) throws JsonException
+ {
+ if (map == null)
+ return new NullValue();
+
+ JsonValue jsonObject = new ObjectValue();
+ Set<String> keys = map.keySet();
+ for (String k : keys)
+ {
+ Object o = map.get(k);
+ // If :
+ // 1. Known types (primitive, String, array of primitive or String)
+ // 2. Array of any object (expect for Java Bean)
+ // 3. Collection<?>
+ // 4. Map<String, ?>
+ if (JsonUtils.getType(o) != null)
+ jsonObject.addElement(k, createJsonValue(o));
+ else
+ jsonObject.addElement(k, createJsonObject(o));
+ }
+ return jsonObject;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public JsonValue createJsonObject(Object object) throws JsonException
{
Method[] methods = object.getClass().getMethods();
@@ -93,6 +219,11 @@
// Get result of invoke method get...
Object invokeResult = method.invoke(object, new Object[0]);
+ // If :
+ // 1. Known types (primitive, String, array of primitive or String)
+ // 2. Array of any object (expect for Java Bean)
+ // 3. Collection<?>
+ // 4. Map<String, ?>
if (JsonUtils.getType(invokeResult) != null)
{
jsonRootValue.addElement(key, createJsonValue(invokeResult));
@@ -125,7 +256,7 @@
* @throws JsonException if any errors occurs.
*/
@SuppressWarnings("unchecked")
- protected JsonValue createJsonValue(Object object) throws JsonException
+ private JsonValue createJsonValue(Object object) throws JsonException
{
Types t = JsonUtils.getType(object);
switch (t)
@@ -300,16 +431,14 @@
* @param clazz the class.
* @return list of fields which must be skiped.
*/
- private static List<String> getTransientFields(Class<?> clazz)
+ private List<String> getTransientFields(Class<?> clazz)
{
List<String> l = new ArrayList<String>();
Field[] fields = clazz.getDeclaredFields();
for (Field f : fields)
{
if (Modifier.isTransient(f.getModifiers()))
- {
l.add(f.getName());
- }
}
return l;
}
Modified: ws/trunk/exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl/JsonUtils.java
===================================================================
--- ws/trunk/exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl/JsonUtils.java 2010-07-23 09:26:38 UTC (rev 2810)
+++ ws/trunk/exo.ws.frameworks.json/src/main/java/org/exoplatform/ws/frameworks/json/impl/JsonUtils.java 2010-07-26 12:00:42 UTC (rev 2811)
@@ -30,128 +30,79 @@
public final class JsonUtils
{
- /**
- * Must not be created.
- */
+ /** Must not be created. */
private JsonUtils()
{
}
static final Charset DEFAULT_CHARSET = Charset.forName("UTF-8");
- /**
- * Known types.
- */
public enum Types {
- /**
- * Byte.
- */
+ /** Byte. */
BYTE,
- /**
- * Short.
- */
+ /** Short. */
SHORT,
- /**
- * Integer.
- */
+ /** Integer. */
INT,
- /**
- * Long.
- */
+ /** Long. */
LONG,
- /**
- * Float.
- */
+ /** Float. */
FLOAT,
- /**
- * Double.
- */
+ /** Double. */
DOUBLE,
- /**
- * Boolean.
- */
+ /** Boolean. */
BOOLEAN,
- /**
- * Char.
- */
+ /** Char. */
CHAR,
- /**
- * String.
- */
+ /** String. */
STRING,
- /**
- * Corresponding to null value.
- */
+ /** Corresponding to null value. */
NULL,
- /**
- * Array of Bytes.
- */
+ /** Array of bytes. */
ARRAY_BYTE,
- /**
- * Array of Shorts.
- */
+ /** Array of shorts. */
ARRAY_SHORT,
- /**
- * Array of Integers.
- */
+ /** Array of ints. */
ARRAY_INT,
- /**
- * Array of Longs.
- */
+ /** Array of longs. */
ARRAY_LONG,
- /**
- * Array of Floats.
- */
+ /** Array of floats. */
ARRAY_FLOAT,
- /**
- * Array of Doubles.
- */
+ /** Array of doubles. */
ARRAY_DOUBLE,
- /**
- * Array of Booleans.
- */
+ /** Array of booleans. */
ARRAY_BOOLEAN,
- /**
- * Array of Chars.
- */
+ /** Array of chars. */
ARRAY_CHAR,
- /**
- * Array of Strings.
- */
+ /** Array of strings. */
ARRAY_STRING,
- /**
- * Array of Java Objects (beans).
- */
+ /** Array of Java Objects (beans). */
ARRAY_OBJECT,
- /**
- * Collection.
- */
+ /** Collection. */
COLLECTION,
- /**
- * Map.
- */
+ /** Map. */
MAP,
/**
@@ -164,24 +115,16 @@
* Types of Json tokens.
*/
public enum JsonToken {
- /**
- * JSON object, "key":{value1, ... } .
- */
+ /** JSON object, "key":{value1, ... } . */
object,
- /**
- * JSON array "key":[value1, ... ] .
- */
+ /** JSON array "key":[value1, ... ] . */
array,
- /**
- * Key.
- */
+ /** Key. */
key,
- /**
- * Value.
- */
+ /** Value. */
value
}
@@ -289,36 +232,55 @@
}
/**
- * Check is given Object is known.
+ * Check is given object has on of types:
+ * <ol>
+ * <li><code>null</code></li>
+ * <li>Primitive type</li>
+ * <li>Primitive type wrapper</li>
+ * <li>String</li>
+ * <li>Array of T where T satisfies 2 or 3 or 4</>
+ * </ol>
*
- * @param o Object.
- * @return true if Object is known, false otherwise.
+ * @param o Object
+ * @return <code>true</code> if Object has one of described above type,
+ * <code>false</code> otherwise
*/
public static boolean isKnownType(Object o)
{
- if (o == null)
- return true;
- return isKnownType(o.getClass());
+ return o == null || isKnownType(o.getClass());
}
/**
- * Check is given Class is known.
+ * Check is given class object represents:
+ * <ol>
+ * <li>Primitive type</li>
+ * <li>Primitive type wrapper</li>
+ * <li>String</li>
+ * <li>Array of T where T satisfies 1 or 2 or 3</>
+ * </ol>
*
- * @param clazz Class.
- * @return true if Class is known, false otherwise.
+ * @param clazz class.
+ * @return <code>true</code> if class object represent one of described
+ * above, <code>false</code> otherwise
*/
public static boolean isKnownType(Class<?> clazz)
{
- if (KNOWN_TYPES.get(clazz.getName()) != null)
- return true;
- return false;
+ return KNOWN_TYPES.get(clazz.getName()) != null;
}
/**
- * Get 'type' of Object. @see {@link KNOWN_TYPES} .
+ * Get corresponding {@link Types} for specified Object. If object is NOT :
+ * <ol>
+ * <li>Known type (primitive, String, array of primitive or String)</li>
+ * <li>Array</li>
+ * <li>Collection<?></li>
+ * <li>Map<String, ?></li>
+ * </ol>
+ * then <code>null</null> will be returned
*
* @param o Object.
- * @return 'type'.
+ * @return {@link Types} or <code>null</code> (see above)
+ * @see {@link KNOWN_TYPES}.
*/
public static Types getType(Object o)
{
@@ -338,10 +300,19 @@
}
/**
- * Get 'type' of Class. @see {@link KNOWN_TYPES} .
+ * Get corresponding {@link Types} for specified class. If class object is
+ * NOT :
+ * <ol>
+ * <li>Known type (primitive, String, array of primitive or String)</li>
+ * <li>Array</li>
+ * <li>Collection</li>
+ * <li>Map</li>
+ * </ol>
+ * then <code>null</null> will be returned
*
- * @param clazz Class.
- * @return 'type'.
+ * @param o Object.
+ * @return {@link Types} or <code>null</code> (see above)
+ * @see {@link KNOWN_TYPES}.
*/
public static Types getType(Class<?> clazz)
{
Modified: ws/trunk/exo.ws.frameworks.json/src/test/java/org/exoplatform/ws/frameworks/json/impl/JsonGeneratorTest.java
===================================================================
--- ws/trunk/exo.ws.frameworks.json/src/test/java/org/exoplatform/ws/frameworks/json/impl/JsonGeneratorTest.java 2010-07-23 09:26:38 UTC (rev 2810)
+++ ws/trunk/exo.ws.frameworks.json/src/test/java/org/exoplatform/ws/frameworks/json/impl/JsonGeneratorTest.java 2010-07-26 12:00:42 UTC (rev 2811)
@@ -30,6 +30,7 @@
import org.exoplatform.ws.frameworks.json.JavaMapBean;
import org.exoplatform.ws.frameworks.json.StringEnum;
import org.exoplatform.ws.frameworks.json.value.JsonValue;
+import org.exoplatform.ws.frameworks.json.value.impl.ArrayValue;
import java.util.ArrayList;
import java.util.Arrays;
@@ -151,7 +152,7 @@
assertEquals(l.get(2).getTitle(), iterator.next().getElement("title").getStringValue());
}
- public void test2() throws Exception
+ public void testBeanWithCollections() throws Exception
{
JavaMapBean mb = new JavaMapBean();
Map<String, Book> m = new HashMap<String, Book>();
@@ -201,7 +202,7 @@
assertNotNull(jsonValue.getElement("mapList"));
assertEquals("JUnit in Action", jsonValue.getElement("mapList").getElement("3").getElements().next().getElement(
"title").getStringValue());
- // System.out.println(jsonValue);
+ System.out.println(jsonValue);
}
public void testBeanWithTransientField() throws Exception
@@ -227,7 +228,7 @@
be.setCounts(new StringEnum[]{StringEnum.ONE, StringEnum.TWO});
be.setCountList(Arrays.asList(StringEnum.ONE, StringEnum.TWO, StringEnum.TREE));
JsonValue jsonValue = new JsonGeneratorImpl().createJsonObject(be);
- //System.out.println(jsonValue);
+ System.out.println(jsonValue);
assertEquals("name", jsonValue.getElement("name").getStringValue());
@@ -260,7 +261,7 @@
BeanWithBookEnum be = new BeanWithBookEnum();
be.setBook(BookEnum.JUNIT_IN_ACTION);
JsonValue jsonValue = new JsonGeneratorImpl().createJsonObject(be);
- //System.out.println(jsonValue);
+ System.out.println(jsonValue);
assertEquals(BookEnum.JUNIT_IN_ACTION.name(), jsonValue.getElement("book").getStringValue());
}
Modified: ws/trunk/exo.ws.frameworks.json/src/test/java/org/exoplatform/ws/frameworks/json/impl/JsonParserTest.java
===================================================================
--- ws/trunk/exo.ws.frameworks.json/src/test/java/org/exoplatform/ws/frameworks/json/impl/JsonParserTest.java 2010-07-23 09:26:38 UTC (rev 2810)
+++ ws/trunk/exo.ws.frameworks.json/src/test/java/org/exoplatform/ws/frameworks/json/impl/JsonParserTest.java 2010-07-26 12:00:42 UTC (rev 2811)
@@ -31,6 +31,7 @@
import org.exoplatform.ws.frameworks.json.JsonParser;
import org.exoplatform.ws.frameworks.json.StringEnum;
import org.exoplatform.ws.frameworks.json.value.JsonValue;
+import org.exoplatform.ws.frameworks.json.value.impl.ArrayValue;
import java.io.ByteArrayInputStream;
import java.io.InputStreamReader;
@@ -272,5 +273,17 @@
BeanWithBookEnum o = (BeanWithBookEnum)new BeanBuilder().createObject(BeanWithBookEnum.class, jsonValue);
assertEquals(BookEnum.BEGINNING_C, o.getBook());
}
+
+ public void testArray() throws Exception
+ {
+ String source = "{\"array\":[\"a\",\"b\",\"c\"]}";
+ JsonParser parser = new JsonParserImpl();
+ JsonHandler jsonHandler = new JsonDefaultHandler();
+ parser.parse(new ByteArrayInputStream(source.getBytes()), jsonHandler);
+ JsonValue jsonValue = jsonHandler.getJsonObject();
+ System.out.println(jsonValue.getElement("array").isArray());
+
+
+ }
}
13 years, 9 months
exo-jcr SVN: r2810 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2010-07-23 05:26:38 -0400 (Fri, 23 Jul 2010)
New Revision: 2810
Added:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java
Log:
EXOJCR-750 : Patch to JCR path management improvement was applied.
Added: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java (rev 0)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java 2010-07-23 09:26:38 UTC (rev 2810)
@@ -0,0 +1,394 @@
+/*
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.core;
+
+import org.exoplatform.services.jcr.core.NamespaceAccessor;
+import org.exoplatform.services.jcr.datamodel.InternalQName;
+import org.exoplatform.services.jcr.datamodel.QPath;
+import org.exoplatform.services.jcr.datamodel.QPathEntry;
+import org.exoplatform.services.jcr.impl.Constants;
+
+import javax.jcr.RepositoryException;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * @author <a href="mailto:geaz@users.sourceforge.net">Gennady Azarenkov </a>
+ * @version $Id$
+ */
+
+public class JCRPathExt extends JCRPath
+{
+
+ private static PathElement[] EMPTY_PATH = new PathElement[0];
+
+ private static final PathElement THIS_ELEMENT = new PathElement(Constants.NS_DEFAULT_URI, THIS_RELPATH, Constants.NS_EMPTY_PREFIX, -1);
+
+ private static final PathElement MOVE_UP_ELEMENT = new PathElement(Constants.NS_DEFAULT_URI, PARENT_RELPATH, Constants.NS_EMPTY_PREFIX, -1);
+
+ protected final PathElement[] names;
+
+ protected final int size;
+
+ protected String cachedToString;
+
+ protected String cachedToStringShowIndex;
+
+ protected QPath cachedInternalQPath;
+
+ public final static JCRPathExt ROOT = new JCRPathExt();
+
+ private JCRPathExt()
+ {
+ this(EMPTY_PATH);
+ }
+
+ JCRPathExt(NamespaceAccessor namespaces, QPathEntry[] path) throws RepositoryException
+ {
+ PathElement[] names = new PathElement[path.length];
+ int size = 0;
+ for (QPathEntry entry : path)
+ {
+ String prefix = namespaces.getNamespacePrefixByURI(entry.getNamespace());
+ PathElement element = element(entry.getNamespace(), entry.getName(), prefix, entry.getIndex());
+ size = addEntry(names, size, element);
+ }
+
+ //
+ this.names = names;
+ this.size = size;
+ }
+
+ JCRPathExt(JCRPathExt that, PathElement[] addedEntries, int addedSize)
+ {
+ PathElement[] names = new PathElement[that.size + addedSize];
+ int size = 0;
+ for (int i = 0;i < that.size;i++)
+ {
+ size = addEntry(names, size, that.names[i]);
+ }
+ for (int i = 0;i < addedSize;i++)
+ {
+ size = addEntry(names, size, addedEntries[i]);
+ }
+
+ //
+ this.names = names;
+ this.size = size;
+ }
+
+ JCRPathExt(PathElement[] names)
+ {
+ this(names, names.length);
+ }
+
+ JCRPathExt(PathElement[] names, int size)
+ {
+ if (size < 0)
+ {
+ throw new AssertionError("Size value is negative: " + size);
+ }
+ if (size > names.length)
+ {
+ throw new AssertionError("Size value is too large: " + size + " instead of max: " + names.length);
+ }
+
+ //
+ this.names = names;
+ this.size = size;
+ }
+
+ public boolean isAbsolute()
+ {
+ if (size > 0)
+ {
+ PathElement first = names[0];
+ if (first.getName().equals(ROOT_NAME))
+ {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ JCRPath add(JCRPath path)
+ {
+ return new JCRPathExt(this, ((JCRPathExt)path).names, ((JCRPathExt)path).size);
+ }
+
+ @Override
+ JCRPath addEntries(PathElement... entries)
+ {
+ return new JCRPathExt(this, entries, entries.length);
+ }
+
+ JCRPathExt addEntry(String namespace, String name, String prefix, int index)
+ {
+ return addEntry(element(namespace, name, prefix, index));
+ }
+
+ public JCRPathExt makeAncestorPath(int relativeDegree)
+ {
+ return new JCRPathExt(names, size - relativeDegree);
+ }
+
+ JCRPathExt addEntry(PathElement entry)
+ {
+ return new JCRPathExt(this, new PathElement[]{entry}, 1);
+ }
+
+ private static PathElement element(String namespace, String name, String prefix, int index)
+ {
+ if (name.equals(THIS_RELPATH))
+ {
+ return THIS_ELEMENT;
+ }
+ else if (name.equals(PARENT_RELPATH))
+ {
+ return MOVE_UP_ELEMENT;
+ }
+ else
+ {
+ return new PathElement(namespace, name, prefix, index);
+ }
+ }
+
+ private static int addEntry(PathElement[] entries, int size, PathElement entry)
+ {
+ if (entry == THIS_ELEMENT)
+ {
+ return size;
+ }
+ if (size > 0 && entry == MOVE_UP_ELEMENT && !(entries[size - 1] == MOVE_UP_ELEMENT))
+ {
+ if (size <= 0)
+ {
+ log.warn("Wrong relative path. Can't move up in path hierarhy.");
+ return 0;
+ }
+ return size - 1;
+ }
+
+ //
+ entries[size] = entry;
+
+ //
+ return size + 1;
+ }
+
+ public JCRPathExt makeParentPath()
+ {
+ return makeAncestorPath(1);
+ }
+
+ @Override
+ public int getLength()
+ {
+ return size;
+ }
+
+ @Override
+ public PathElement getEntry(int index)
+ {
+ if (index > size)
+ {
+ throw new ArrayIndexOutOfBoundsException();
+ }
+ return names[index];
+ }
+
+ public PathElement[] getRelPath(int relativeDegree)
+ {
+ PathElement[] relPath = new PathElement[relativeDegree];
+ System.arraycopy(names, size - relativeDegree, relPath, 0, relativeDegree);
+ return relPath;
+ }
+
+ public QPath getInternalPath()
+ {
+ if (cachedInternalQPath == null)
+ {
+ QPathEntry[] entries = new QPathEntry[size];
+
+ for (int i = 0; i < size; i++)
+ entries[i] = new QPathEntry(names[i].getNamespace(), names[i].getName(), names[i].getIndex());
+
+ cachedInternalQPath = new QPath(entries);
+ }
+
+ return cachedInternalQPath;
+ }
+
+ public String getAsString(boolean showIndex)
+ {
+ if (showIndex)
+ {
+ if (cachedToStringShowIndex != null)
+ {
+ return cachedToStringShowIndex;
+ }
+ }
+ else
+ {
+ if (cachedToString != null)
+ {
+ return cachedToString;
+ }
+ }
+
+ // [PN] 27.06.07
+ String path;
+ if (isAbsolute())
+ {
+ if (size == 1)
+ {
+ path = "/";
+ }
+ else
+ {
+ StringBuilder builder = new StringBuilder();
+ for (int i = 1; i < size; i++)
+ {
+ builder.append("/").append(names[i].getAsString(showIndex));
+ }
+ path = builder.toString();
+ }
+ }
+ else
+ {
+ // relative
+ StringBuilder builder = new StringBuilder();
+ for (int i = 0; i < size; i++)
+ {
+ if (i > 0)
+ {
+ builder.append("/");
+ }
+ else
+ {
+
+ }
+ builder.append(names[i].getAsString(showIndex));
+ }
+ path = builder.toString();
+ }
+
+
+ //
+ if (showIndex)
+ {
+ cachedToStringShowIndex = path;
+ }
+ else
+ {
+ cachedToString = path;
+ }
+
+ //
+ return path;
+ }
+
+ public int getDepth()
+ {
+ return size - 1;
+ }
+
+ public boolean isDescendantOf(JCRPath ancestorLocation, boolean childOnly)
+ {
+ return isDescendantOf((JCRPathExt)ancestorLocation, childOnly);
+ }
+
+ public boolean isDescendantOf(JCRPathExt ancestorLocation, boolean childOnly)
+ {
+ int depthDiff = getDepth() - ancestorLocation.getDepth();
+ if (depthDiff <= 0 || (childOnly && depthDiff != 1))
+ return false;
+
+ JCRPathExt.PathElement[] anotherNames = ancestorLocation.names;
+ for (int i = 0; i < ancestorLocation.size; i++)
+ {
+ boolean result = anotherNames[i].equals(names[i]);
+ if (!result)
+ return false;
+ }
+ return true;
+ }
+
+ public boolean isAncestorOf(JCRPath descendantLocation, boolean childOnly)
+ {
+ return descendantLocation.isDescendantOf(this, childOnly);
+ }
+
+ public PathElement getName()
+ {
+ if (size > 0)
+ return names[size - 1];
+
+ return THIS_ELEMENT;
+ }
+
+ public int getIndex()
+ {
+ return names[size - 1].getIndex();
+ }
+
+ public boolean isIndexSetExplicitly()
+ {
+ return names[size - 1].isIndexSetExplicitly();
+ }
+
+ public boolean isSameNameSibling(JCRPath anotherPath)
+ {
+ return isSameNameSibling((JCRPathExt)anotherPath);
+ }
+
+ public boolean isSameNameSibling(JCRPathExt anotherPath)
+ {
+ JCRName[] anotherNames = anotherPath.names;
+ for (int i = 0; i < anotherPath.size - 1; i++)
+ {
+ boolean result = anotherNames[i].equals(names[i]);
+ if (!result)
+ return false;
+ }
+ return getName().getName().equals(anotherPath.getName().getName())
+ && this.getName().getPrefix().equals(anotherPath.getName().getPrefix());
+ }
+
+ public boolean equals(Object obj)
+ {
+ if (this == obj)
+ {
+ return true;
+ }
+ if (obj instanceof JCRPathExt)
+ {
+ JCRPathExt other = (JCRPathExt)obj;
+ return this.getInternalPath().equals(other.getInternalPath());
+ }
+ return false;
+ }
+
+ public PathElement[] getEntries()
+ {
+ return names.clone();
+ }
+
+}
Property changes on: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPathExt.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
13 years, 9 months
exo-jcr SVN: r2809 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core and 1 other directories.
by do-not-reply@jboss.org
Author: areshetnyak
Date: 2010-07-23 04:53:02 -0400 (Fri, 23 Jul 2010)
New Revision: 2809
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/InternalQName.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPathEntry.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRName.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPath.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java
kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java
Log:
EXOJCR-750 : Patch to JCR path management improvement was applied.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/InternalQName.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/InternalQName.java 2010-07-21 08:46:42 UTC (rev 2808)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/InternalQName.java 2010-07-23 08:53:02 UTC (rev 2809)
@@ -40,9 +40,14 @@
*/
public InternalQName(String namespace, String name)
{
- super(namespace, name);
+ super(safeIntern(namespace), safeIntern(name));
}
+ private static String safeIntern(String s)
+ {
+ return s != null ? s.intern() : null;
+ }
+
/**
* Parse qname in form of eXo-JCR names conversion string. E.g. [name_space]item_name,
* [http://www.jcp.org/jcr/nt/1.0]:base.
@@ -79,9 +84,18 @@
if (o == null)
return false;
- if (!(o instanceof InternalQName))
- return false;
+ if (o instanceof InternalQName)
+ {
+ InternalQName that = (InternalQName)o;
+ if (hashCode == that.hashCode)
+ {
+ String s1 = getAsString();
+ String s2 = that.getAsString();
+ return s1.equals(s2);
+ }
+ }
- return hashCode == o.hashCode() && getAsString().equals(((QName)o).getAsString());
+ return false;
+
}
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPathEntry.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPathEntry.java 2010-07-21 08:46:42 UTC (rev 2808)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/datamodel/QPathEntry.java 2010-07-23 08:53:02 UTC (rev 2809)
@@ -32,6 +32,10 @@
*/
private final int index;
+ private String cachedToString;
+
+ private String cachedToStringShowIndex;
+
/**
* QPathEntry constructor.
*
@@ -128,7 +132,44 @@
*/
public String getAsString(boolean showIndex)
{
- return super.getAsString() + (showIndex ? QPath.PREFIX_DELIMITER + this.index : "");
+ if (showIndex)
+ {
+ if (cachedToStringShowIndex != null)
+ {
+ return cachedToStringShowIndex;
+ }
+ }
+ else
+ {
+ if (cachedToString != null)
+ {
+ return cachedToString;
+ }
+ }
+
+ //
+ String res;
+ if (showIndex)
+ {
+ res = super.getAsString() + QPath.PREFIX_DELIMITER + this.index;
+ }
+ else
+ {
+ res = super.getAsString();
+ }
+
+ //
+ if (showIndex)
+ {
+ cachedToStringShowIndex = res;
+ }
+ else
+ {
+ cachedToString = res;
+ }
+
+ //
+ return res;
}
/**
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRName.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRName.java 2010-07-21 08:46:42 UTC (rev 2808)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRName.java 2010-07-23 08:53:02 UTC (rev 2809)
@@ -40,17 +40,43 @@
protected final int hashCode;
+ protected JCRName(InternalQName qname, String prefix)
+ {
+ this(qname.getNamespace(), qname.getName(), prefix);
+ }
+
+ JCRName(JCRPath.PathElement that)
+ {
+ this.prefix = that.prefix;
+ this.name = that.name;
+ this.namespace = that.namespace;
+ this.stringName = that.stringName;
+ this.hashCode = that.hashCode;
+ }
+
JCRName(String namespace, String name, String prefix)
{
- this.name = name.intern();
- this.namespace = namespace.intern();
- this.prefix = prefix.intern();
+ int hk = 31 + namespace.hashCode();
+ hk = hk * 31 + name.hashCode();
+ int hashCode = hk * 31 + prefix.hashCode();
- this.stringName = ((this.prefix.length() == 0 ? "" : this.prefix + ":") + this.name);
+ //
+ String stringName;
+ if (prefix.length() == 0)
+ {
+ stringName = name;
+ }
+ else
+ {
+ stringName = prefix + ":" + name;
+ }
- int hk = 31 + this.namespace.hashCode();
- hk = hk * 31 + this.name.hashCode();
- this.hashCode = hk * 31 + this.prefix.hashCode();
+ //
+ this.name = name;
+ this.namespace = namespace;
+ this.prefix = prefix;
+ this.stringName = stringName;
+ this.hashCode = hashCode;
}
/**
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPath.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPath.java 2010-07-21 08:46:42 UTC (rev 2808)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/JCRPath.java 2010-07-23 08:53:02 UTC (rev 2809)
@@ -18,16 +18,15 @@
*/
package org.exoplatform.services.jcr.impl.core;
+import org.exoplatform.services.jcr.core.NamespaceAccessor;
+import org.exoplatform.services.jcr.datamodel.InternalQName;
import org.exoplatform.services.jcr.datamodel.QPath;
import org.exoplatform.services.jcr.datamodel.QPathEntry;
-import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.log.ExoLogger;
import org.exoplatform.services.log.Log;
-import java.util.ArrayList;
+import javax.jcr.RepositoryException;
-import javax.jcr.PathNotFoundException;
-
/**
* Created by The eXo Platform SAS.
*
@@ -35,7 +34,7 @@
* @version $Id: JCRPath.java 11907 2008-03-13 15:36:21Z ksm $
*/
-public class JCRPath
+public abstract class JCRPath
{
public final static String ROOT_PATH = "/";
@@ -48,250 +47,117 @@
protected static Log log = ExoLogger.getLogger("exo.jcr.component.core.JCRPath");
- protected PathElement[] names;
-
- JCRPath()
+ public static JCRPath createJCRPath()
{
- this.names = new PathElement[0];
+ return JCRPathExt.ROOT;
}
- public boolean isAbsolute()
+ public static JCRPath createJCRPath(NamespaceAccessor namespaces, QPath qpath) throws RepositoryException
{
- if (names.length > 0)
- {
- PathElement first = names[0];
- if (first.getName().equals(ROOT_NAME))
- {
- return true;
- }
- }
- return false;
+ return new JCRPathExt(namespaces, qpath.getEntries());
}
- JCRPath addEntry(String namespace, String name, String prefix, int index)
+ public static JCRPath createJCRPath(NamespaceAccessor namespaces, QPathEntry[] relPath) throws RepositoryException
{
- if (name.equals(THIS_RELPATH))
- return this;
-
- if (name.equals(PARENT_RELPATH))
- {
- return addEntry(new MoveUpElement());
- }
-
- return addEntry(new PathElement(namespace, name, prefix, index));
+ return new JCRPathExt(namespaces, relPath);
}
- JCRPath addEntry(PathElement entry)
- {
- if (names.length > 0 && entry instanceof MoveUpElement && !(names[names.length - 1] instanceof MoveUpElement))
- {
- return removeLastEntry();
- }
+ public abstract boolean isAbsolute();
- PathElement[] newNames = new PathElement[names.length + 1];
- for (int i = 0; i < names.length; i++)
- newNames[i] = names[i];
- newNames[names.length] = entry;
- names = newNames;
- return this;
- }
+ abstract JCRPath addEntry(String namespace, String name, String prefix, int index);
- JCRPath removeLastEntry()
- {
+ abstract JCRPath addEntry(PathElement entry);
- if (names.length <= 0)
- {
- log.warn("Wrong relative path. Can't move up in path hierarhy. " + getAsString(true));
- return this;
- }
+ abstract JCRPath add(JCRPath path);
- PathElement[] newNames = new PathElement[names.length - 1];
- for (int i = 0; i < newNames.length; i++)
- newNames[i] = names[i];
- names = newNames;
- return this;
- }
+ abstract JCRPath addEntries(PathElement... entries);
- public JCRPath makeParentPath()
- {
- return makeAncestorPath(1);
- }
+ public abstract JCRPath makeParentPath();
- /**
- * Makes ancestor path by relative degree (For ex relativeDegree == 1 means parent path etc)
- *
- * @param relativeDegree
- * @return
- * @throws PathNotFoundException
- */
- public JCRPath makeAncestorPath(int relativeDegree)
- {
+ public abstract JCRPath makeAncestorPath(int relativeDegree);
- JCRPath path = new JCRPath();
- for (int i = 0; i < names.length - relativeDegree; i++)
- path.addEntry(names[i]);
- return path;
- }
+ public abstract PathElement[] getRelPath(int relativeDegree);
- public PathElement[] getRelPath(int relativeDegree)
- {
- ArrayList<PathElement> entries = new ArrayList<PathElement>();
- for (int i = names.length - relativeDegree; i < names.length; i++)
- entries.add(names[i]);
- PathElement[] relPath = new PathElement[entries.size()];
- for (int i = 0; i < relPath.length; i++)
- relPath[i] = entries.get(i);
- return relPath;
- }
+ public abstract QPath getInternalPath();
- public QPath getInternalPath()
- {
+ public abstract String getAsString(boolean showIndex);
- QPathEntry[] entries = new QPathEntry[names.length];
+ public abstract int getDepth();
- for (int i = 0; i < names.length; i++)
- entries[i] = new QPathEntry(names[i].getNamespace(), names[i].getName(), names[i].getIndex());
+ public abstract int getLength();
- QPath qpath = new QPath(entries);
- return qpath;
- }
+ public abstract PathElement getEntry(int index);
- public String getAsString(boolean showIndex)
- {
+ public abstract PathElement[] getEntries();
- // [PN] 27.06.07
- String path = "";
- if (isAbsolute())
- {
- if (size() == 1)
- return "/";
+ public abstract boolean isDescendantOf(JCRPath ancestorLocation, boolean childOnly);
- for (int i = 1; i < names.length; i++)
- {
- path += "/" + names[i].getAsString(showIndex);
- }
- }
- else
- {
- // relative
- for (int i = 0; i < names.length; i++)
- {
- path += i > 0 ? "/" + names[i].getAsString(showIndex) : names[i].getAsString(showIndex);
- }
- }
+ public abstract boolean isAncestorOf(JCRPath descendantLocation, boolean childOnly);
- return path;
- }
+ public abstract PathElement getName();
- public int getDepth()
- {
- return size() - 1;
- }
+ public abstract int getIndex();
- public boolean isDescendantOf(JCRPath ancestorLocation, boolean childOnly)
- {
- int depthDiff = getDepth() - ancestorLocation.getDepth();
- if (depthDiff <= 0 || (childOnly && depthDiff != 1))
- return false;
+ public abstract boolean isIndexSetExplicitly();
- JCRPath.PathElement[] anotherNames = ancestorLocation.getEntries();
- for (int i = 0; i < anotherNames.length; i++)
- {
- boolean result = anotherNames[i].equals(names[i]);
- if (!result)
- return false;
- }
- return true;
- }
+ public abstract boolean isSameNameSibling(JCRPath anotherPath);
- public boolean isAncestorOf(JCRPath descendantLocation, boolean childOnly)
- {
- return descendantLocation.isDescendantOf(this, childOnly);
- }
+ public abstract boolean equals(Object obj);
- private int size()
+ protected JCRPath()
{
- return names.length;
}
- public JCRName getName()
+ public static class PathElement extends JCRName
{
- if (size() > 0)
- return names[size() - 1];
- return new ThisElement();
- }
+ private final int index;
- public int getIndex()
- {
- return names[size() - 1].getIndex();
- }
+ private final boolean indexSetExplicitly;
- public boolean isIndexSetExplicitly()
- {
- return names[size() - 1].isIndexSetExplicitly();
- }
+ private String cachedToString;
- public boolean isSameNameSibling(JCRPath anotherPath)
- {
- JCRName[] anotherNames = anotherPath.getEntries();
- for (int i = 0; i < anotherNames.length - 1; i++)
- {
- boolean result = anotherNames[i].equals(names[i]);
- if (!result)
- return false;
- }
- return getName().getName().equals(anotherPath.getName().getName())
- && this.getName().getPrefix().equals(anotherPath.getName().getPrefix());
- }
+ private String cachedToStringShowIndex;
- public boolean equals(Object obj)
- {
- if (this == obj)
+ public PathElement(String namespace, String name, String prefix, int index)
{
- return true;
- }
- if (obj instanceof JCRPath)
- {
- JCRPath other = (JCRPath)obj;
- return this.getInternalPath().equals(other.getInternalPath());
- }
- return false;
- }
+ super(namespace, name, prefix);
- PathElement[] getEntries()
- {
- return names;
- }
-
- public class ThisElement extends PathElement
- {
-
- ThisElement()
- {
- super(Constants.NS_DEFAULT_URI, THIS_RELPATH, Constants.NS_EMPTY_PREFIX, -1);
+ //
+ if (index == -1)
+ {
+ this.index = 1;
+ this.indexSetExplicitly = false;
+ }
+ else
+ {
+ this.index = index;
+ this.indexSetExplicitly = true;
+ }
}
- }
- public class MoveUpElement extends PathElement
- {
-
- MoveUpElement()
+ public PathElement(InternalQName qname, String prefix, int index)
{
- super(Constants.NS_DEFAULT_URI, PARENT_RELPATH, Constants.NS_EMPTY_PREFIX, -1);
+ super(qname, prefix);
+
+ //
+ if (index == -1)
+ {
+ this.index = 1;
+ this.indexSetExplicitly = false;
+ }
+ else
+ {
+ this.index = index;
+ this.indexSetExplicitly = true;
+ }
}
- }
- public class PathElement extends JCRName
- {
-
- private final int index;
-
- private final boolean indexSetExplicitly;
-
- public PathElement(String namespace, String name, String prefix, int index)
+ public PathElement(PathElement that, int index)
{
- super(namespace, name, prefix);
+ super(that);
+
+ //
if (index == -1)
{
this.index = 1;
@@ -306,7 +172,7 @@
public PathElement clone(int newIndex)
{
- return new PathElement(this.namespace, this.name, this.prefix, newIndex);
+ return new PathElement(this, newIndex);
}
public int getIndex()
@@ -324,12 +190,38 @@
public String getAsString(boolean showIndex)
{
- String indexStr;
+ if (showIndex)
+ {
+ if (cachedToStringShowIndex != null)
+ {
+ return cachedToStringShowIndex;
+ }
+ }
+ else
+ {
+ if (cachedToString != null)
+ {
+ return cachedToString;
+ }
+ }
+
+ StringBuffer sb = new StringBuffer(super.getAsString());
if (showIndex || getIndex() > 1)
- indexStr = "[" + getIndex() + "]";
+ sb.append("[").append(index).append("]");
+ String res = sb.toString();
+
+ //
+ if (showIndex)
+ {
+ cachedToStringShowIndex = res;
+ }
else
- indexStr = "";
- return (super.getAsString() + indexStr);
+ {
+ cachedToString = res;
+ }
+
+ //
+ return res;
}
public boolean isIndexSetExplicitly()
@@ -337,5 +229,4 @@
return indexSetExplicitly;
}
}
-
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java 2010-07-21 08:46:42 UTC (rev 2808)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java 2010-07-23 08:53:02 UTC (rev 2809)
@@ -65,19 +65,8 @@
*/
public JCRPath createJCRPath(JCRPath parentLoc, String relPath) throws RepositoryException
{
-
- JCRPath path = new JCRPath();
- for (int i = 0; i < parentLoc.getEntries().length; i++)
- {
- path.addEntry(parentLoc.getEntries()[i]);
- }
-
JCRPath addPath = parseNames(relPath, false);
- for (int i = 0; i < addPath.getEntries().length; i++)
- {
- path.addEntry(addPath.getEntries()[i]);
- }
- return path;
+ return parentLoc.add(addPath);
}
/**
@@ -125,30 +114,21 @@
*/
public JCRPath createJCRPath(QPath qPath) throws RepositoryException
{
-
- JCRPath path = new JCRPath();
- for (int i = 0; i < qPath.getEntries().length; i++)
- {
- QPathEntry entry = qPath.getEntries()[i];
- String prefix = namespaces.getNamespacePrefixByURI(entry.getNamespace());
- path.addEntry(entry.getNamespace(), entry.getName(), prefix, entry.getIndex());
- }
-
- return path;
+ return JCRPath.createJCRPath(namespaces, qPath);
}
public JCRName createJCRName(InternalQName qname) throws RepositoryException
{
String prefix = namespaces.getNamespacePrefixByURI(qname.getNamespace());
- return new JCRName(qname.getNamespace(), qname.getName(), prefix);
+ return new JCRName(qname, prefix);
}
public String formatPathElement(QPathEntry qe) throws RepositoryException
{
String prefix = namespaces.getNamespacePrefixByURI(qe.getNamespace());
- JCRPath p = new JCRPath();
- p.addEntry(qe.getNamespace(), qe.getName(), prefix, qe.getIndex());
- return p.getEntries()[0].getAsString(false);
+ JCRPath p = JCRPath.createJCRPath();
+ p = p.addEntry(qe.getNamespace(), qe.getName(), prefix, qe.getIndex());
+ return p.getEntry(0).getAsString(false);
}
/**
@@ -160,25 +140,17 @@
*/
public JCRName parseJCRName(String name) throws RepositoryException
{
- JCRPath.PathElement entry = parsePathEntry(new JCRPath(), name);
-
- return new JCRName(entry.getNamespace(), entry.getName(), entry.getPrefix());
+ JCRPath path = parsePathEntry(JCRPath.createJCRPath(), name);
+ JCRPath.PathElement entry = path.getName();
+ return new JCRName(entry);
}
public JCRPath.PathElement[] createRelPath(QPathEntry[] relPath) throws RepositoryException
{
- JCRPath path = new JCRPath();
- // JCRPath.PathElement[] entries = new JCRPath.PathElement[relPath.length];
- for (QPathEntry element : relPath)
- {
- String uri = namespaces.getNamespaceURIByPrefix(element.getNamespace());
- String prefix = namespaces.getNamespacePrefixByURI(uri);
- path.addEntry(uri, element.getName(), prefix, element.getIndex());
- }
- return path.getEntries();
+ return JCRPath.createJCRPath(namespaces, relPath).getEntries();
}
- private JCRPath.PathElement parsePathEntry(JCRPath path, String name) throws RepositoryException
+ private JCRPath parsePathEntry(JCRPath path, String name) throws RepositoryException
{
// should be reset here (if there is explicit index) or
@@ -232,8 +204,8 @@
throw new RepositoryException("Illegal path entry: \"" + name + "\"");
}
- path.addEntry(namespaces.getNamespaceURIByPrefix(prefix), someName, prefix, index);
- return (JCRPath.PathElement)path.getName();
+ path = path.addEntry(namespaces.getNamespaceURIByPrefix(prefix), someName, prefix, index);
+ return path;
}
catch (Exception e)
@@ -250,7 +222,7 @@
throw new RepositoryException("Illegal relPath: \"" + path + "\"");
}
- JCRPath jcrPath = new JCRPath();
+ JCRPath jcrPath = JCRPath.createJCRPath();
int start = 0;
if (!absolute)
{
@@ -262,7 +234,7 @@
{
throw new RepositoryException("Illegal relPath: \"" + path + "\"");
}
- jcrPath.addEntry(namespaces.getNamespaceURIByPrefix(""), "", "", -1);
+ jcrPath = jcrPath.addEntry(namespaces.getNamespaceURIByPrefix(""), "", "", -1);
}
else
{
@@ -280,7 +252,7 @@
if (start + 1 != path.length())
{
- parsePathEntry(jcrPath, qname);
+ jcrPath = parsePathEntry(jcrPath, qname);
}
else
{
Modified: kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java
===================================================================
--- kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java 2010-07-21 08:46:42 UTC (rev 2808)
+++ kernel/trunk/exo.kernel.commons/src/main/java/org/exoplatform/commons/utils/QName.java 2010-07-23 08:53:02 UTC (rev 2809)
@@ -37,14 +37,23 @@
protected final int hashCode;
public QName(String namespace, String name)
- {
- this.namespace = (namespace != null ? namespace : "").intern();
- this.name = (name != null ? name : "");
-
- this.stringName = ("[" + this.namespace + "]" + this.name);
-
- int hk = 31 + this.namespace.hashCode();
- this.hashCode = hk * 31 + this.name.hashCode();
+ {
+ if (namespace == null)
+ {
+ namespace = "";
+ }
+ if (name == null)
+ {
+ name = "";
+ }
+ String stringName = ("[" + namespace + "]" + name);
+ int hashCode = (31 + namespace.hashCode()) * 31 + name.hashCode();
+
+ //
+ this.namespace = namespace;
+ this.name = name;
+ this.stringName = stringName;
+ this.hashCode = hashCode;
}
public String getNamespace()
13 years, 9 months
exo-jcr SVN: r2808 - in jcr/branches/1.14-ISPN/exo.jcr.component.core/src: test/resources/conf/standalone and 1 other directory.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-07-21 04:46:42 -0400 (Wed, 21 Jul 2010)
New Revision: 2808
Added:
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java
Removed:
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/InfinispanLockManagerImpl.java
Modified:
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan.xml
jcr/branches/1.14-ISPN/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-831: lock impl on Infinispan Test passed.
Added: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java (rev 0)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/ISPNCacheableLockManagerImpl.java 2010-07-21 08:46:42 UTC (rev 2808)
@@ -0,0 +1,407 @@
+/*
+ *
+ * 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.
+ */
+package org.exoplatform.services.jcr.impl.core.lock.infinispan;
+
+import org.exoplatform.container.configuration.ConfigurationManager;
+import org.exoplatform.management.annotations.Managed;
+import org.exoplatform.management.jmx.annotations.NameTemplate;
+import org.exoplatform.management.jmx.annotations.Property;
+import org.exoplatform.services.jcr.config.MappedParametrizedObjectEntry;
+import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
+import org.exoplatform.services.jcr.config.WorkspaceEntry;
+import org.exoplatform.services.jcr.impl.core.lock.jbosscache.AbstractCacheableLockManagerImpl;
+import org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableSessionLockManager;
+import org.exoplatform.services.jcr.impl.core.lock.jbosscache.LockData;
+import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
+import org.exoplatform.services.jcr.impl.storage.jdbc.DBConstants;
+import org.exoplatform.services.jcr.impl.storage.jdbc.DialectDetecter;
+import org.exoplatform.services.jcr.impl.util.io.PrivilegedCacheHelper;
+import org.exoplatform.services.jcr.infinispan.InfinispanCacheFactory;
+import org.exoplatform.services.log.ExoLogger;
+import org.exoplatform.services.log.Log;
+import org.exoplatform.services.naming.InitialContextInitializer;
+import org.exoplatform.services.transaction.TransactionService;
+import org.infinispan.Cache;
+
+import java.io.Serializable;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.sql.Connection;
+import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.lock.LockException;
+import javax.naming.InitialContext;
+import javax.sql.DataSource;
+import javax.transaction.TransactionManager;
+
+/**
+ * @author <a href="anatoliy.bazko(a)exoplatform.org">Anatoliy Bazko</a>
+ * @version $Id: InfinispanLockManagerImpl.java 111 2010-11-11 11:11:11Z tolusha $
+ *
+ */
+@Managed
+@NameTemplate(@Property(key = "service", value = "lockmanager"))
+public class ISPNCacheableLockManagerImpl extends AbstractCacheableLockManagerImpl
+{
+
+ /**
+ * The name to property cache configuration.
+ */
+ public static final String INFINISPAN_JDBC_CL_DATASOURCE = "infinispan-cl-cache.jdbc.datasource";
+
+ public static final String INFINISPAN_JDBC_CL_DATA_COLUMN = "infinispan-cl-cache.jdbc.data.type";
+
+ public static final String INFINISPAN_JDBC_CL_TIMESTAMP_COLUMN = "infinispan-cl-cache.jdbc.timestamp.type";
+
+ public static final String INFINISPAN_JDBC_CL_ID_COLUMN = "infinispan-cl-cache.jdbc.id.type";
+
+ public static final String INFINISPAN_JDBC_CL_AUTO = "auto";
+
+ /**
+ * Logger
+ */
+ private final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.InfinispanLockManagerImpl");
+
+ private Cache<Serializable, Object> cache;
+
+ public ISPNCacheableLockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
+ InitialContextInitializer context, TransactionService transactionService, ConfigurationManager cfm)
+ throws RepositoryConfigurationException, RepositoryException
+ {
+ this(dataManager, config, context, transactionService.getTransactionManager(), cfm);
+ }
+
+ public ISPNCacheableLockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
+ InitialContextInitializer context, ConfigurationManager cfm) throws RepositoryConfigurationException,
+ RepositoryException
+ {
+ this(dataManager, config, context, (TransactionManager)null, cfm);
+ }
+
+ public ISPNCacheableLockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
+ InitialContextInitializer context, TransactionManager transactionManager, ConfigurationManager cfm)
+ throws RepositoryConfigurationException, RepositoryException
+ {
+ super(dataManager, config, transactionManager);
+
+ // make cache
+ if (config.getLockManager() != null)
+ {
+ // create cache using custom factory
+ InfinispanCacheFactory<Serializable, Object> factory = new InfinispanCacheFactory<Serializable, Object>(cfm);
+
+ // configure cache loader parameters with correct DB data-types
+ configureJDBCCacheLoader(config.getLockManager());
+
+ cache = factory.createCache(config.getLockManager());
+
+ // Context recall is a workaround of JDBCCacheLoader starting.
+ context.recall();
+ }
+ else
+ {
+ throw new RepositoryConfigurationException("Cache configuration not found");
+ }
+
+ this.getNumLocks = new LockActionNonTxAware<Integer, Object>()
+ {
+ public Integer execute(Object arg)
+ {
+ return cache.size();
+ }
+ };
+
+ this.hasLocks = new LockActionNonTxAware<Boolean, Object>()
+ {
+ public Boolean execute(Object arg)
+ {
+ return !cache.isEmpty();
+ }
+ };
+
+ this.isLockLive = new LockActionNonTxAware<Boolean, String>()
+ {
+ public Boolean execute(String nodeId)
+ {
+ if (cache.get(nodeId) != null)
+ {
+ return true;
+ }
+
+ return false;
+ }
+ };
+
+ this.refresh = new LockActionNonTxAware<Object, LockData>()
+ {
+ public Object execute(LockData newLockData) throws LockException
+ {
+ Object oldValue = PrivilegedCacheHelper.putIfAbsent(cache, newLockData.getNodeIdentifier(), newLockData);
+ if (oldValue == null)
+ {
+ throw new LockException("Can't refresh lock for node " + newLockData.getNodeIdentifier()
+ + " since lock is not exist");
+ }
+ return null;
+ }
+ };
+
+ this.lockExist = new LockActionNonTxAware<Boolean, String>()
+ {
+ public Boolean execute(String nodeId) throws LockException
+ {
+ return cache.get(nodeId) != null;
+ }
+ };
+
+ this.getLockDataById = new LockActionNonTxAware<LockData, String>()
+ {
+ public LockData execute(String nodeId) throws LockException
+ {
+ return (LockData)cache.get(nodeId);
+ }
+ };
+
+ this.getLockList = new LockActionNonTxAware<List<LockData>, Object>()
+ {
+ public List<LockData> execute(Object arg) throws LockException
+ {
+ Collection<Object> datas = cache.values();
+
+ List<LockData> locksData = new ArrayList<LockData>();
+ for (Object lockData : datas)
+ {
+ if (lockData != null)
+ {
+ locksData.add((LockData)lockData);
+ }
+ }
+ return locksData;
+ }
+ };
+ }
+
+ /**
+ * If JDBC cache loader is used, then fills-in column types. If column type configured from jcr-configuration file,
+ * then nothing is overridden. Parameters are injected into the given parameterEntry.
+ */
+ private void configureJDBCCacheLoader(MappedParametrizedObjectEntry parameterEntry) throws RepositoryException
+ {
+ String dataSourceName = parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_DATASOURCE, null);
+ // if data source is defined, then inject correct data-types.
+ // Also it cans be not defined and nothing should be injected (i.e. no cache loader is used (possibly pattern is changed, to used another cache loader))
+ if (dataSourceName != null)
+ {
+ String dialect;
+ // detect dialect of data-source
+ try
+ {
+ final DataSource dataSource = (DataSource)new InitialContext().lookup(dataSourceName);
+ if (dataSource == null)
+ {
+ throw new RepositoryException("DataSource (" + dataSourceName + ") can't be null");
+ }
+
+ Connection jdbcConn = null;
+ try
+ {
+ PrivilegedExceptionAction<Connection> action = new PrivilegedExceptionAction<Connection>()
+ {
+ public Connection run() throws Exception
+ {
+ return dataSource.getConnection();
+ }
+ };
+ try
+ {
+ jdbcConn = AccessController.doPrivileged(action);
+ }
+ catch (PrivilegedActionException pae)
+ {
+ Throwable cause = pae.getCause();
+ if (cause instanceof SQLException)
+ {
+ throw (SQLException)cause;
+ }
+ else if (cause instanceof RuntimeException)
+ {
+ throw (RuntimeException)cause;
+ }
+ else
+ {
+ throw new RuntimeException(cause);
+ }
+ }
+
+ dialect = DialectDetecter.detect(jdbcConn.getMetaData());
+ }
+ finally
+ {
+ if (jdbcConn != null && !jdbcConn.isClosed())
+ {
+ try
+ {
+ jdbcConn.close();
+ }
+ catch (SQLException e)
+ {
+ throw new RepositoryException("Error of connection close", e);
+ }
+ }
+ }
+ }
+ catch (Exception e)
+ {
+ throw new RepositoryException("Error configuring JDBC cache loader", e);
+ }
+
+ // default values, will be overridden with types suitable for concrete data base.
+ String blobType = "BLOB";
+ String charType = "VARCHAR(512)";
+ String timeStampType = "BIGINT";
+ // HSSQL
+ if (dialect.equals(DBConstants.DB_DIALECT_HSQLDB))
+ {
+ blobType = "OBJECT";
+ }
+ // MYSQL
+ else if (dialect.equals(DBConstants.DB_DIALECT_MYSQL) || dialect.equals(DBConstants.DB_DIALECT_MYSQL_UTF8))
+ {
+ blobType = "LONGBLOB";
+ }
+ // ORACLE
+ else if (dialect.equals(DBConstants.DB_DIALECT_ORACLE) || dialect.equals(DBConstants.DB_DIALECT_ORACLEOCI))
+ {
+ // Oracle suggests the use VARCHAR2 instead of VARCHAR while declaring data type.
+ charType = "VARCHAR2(512)";
+ timeStampType = "NUMBER(19, 0)";
+ }
+ // POSTGRE SQL
+ else if (dialect.equals(DBConstants.DB_DIALECT_PGSQL))
+ {
+ blobType = "bytea";
+ }
+ // Microsoft SQL
+ else if (dialect.equals(DBConstants.DB_DIALECT_MSSQL))
+ {
+ blobType = "VARBINARY(MAX)";
+ }
+ // SYBASE
+ else if (dialect.equals(DBConstants.DB_DIALECT_SYBASE))
+ {
+ blobType = "IMAGE";
+ }
+ // INGRES
+ else if (dialect.equals(DBConstants.DB_DIALECT_INGRES))
+ {
+ blobType = "long byte";
+ }
+ // else GENERIC, DB2 etc
+
+ // set parameters if not defined
+ // if parameter is missing in configuration, then getParameterValue(INFINISPAN_JDBC_CL_DATA_COLUMN, INFINISPAN_JDBC_CL_AUTO)
+ // will return INFINISPAN_JDBC_CL_AUTO. If parameter is present in configuration and equals to "auto", then it should be replaced
+ // with correct value for given database
+ if (parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_DATA_COLUMN, INFINISPAN_JDBC_CL_AUTO)
+ .equalsIgnoreCase(INFINISPAN_JDBC_CL_AUTO))
+ {
+ parameterEntry.putParameterValue(INFINISPAN_JDBC_CL_DATA_COLUMN, blobType);
+ }
+
+ if (parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_ID_COLUMN, INFINISPAN_JDBC_CL_AUTO).equalsIgnoreCase(
+ INFINISPAN_JDBC_CL_AUTO))
+ {
+ parameterEntry.putParameterValue(INFINISPAN_JDBC_CL_ID_COLUMN, charType);
+ }
+
+ if (parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_TIMESTAMP_COLUMN, INFINISPAN_JDBC_CL_AUTO)
+ .equalsIgnoreCase(INFINISPAN_JDBC_CL_AUTO))
+ {
+ parameterEntry.putParameterValue(INFINISPAN_JDBC_CL_TIMESTAMP_COLUMN, timeStampType);
+ }
+ }
+ else
+ {
+ LOG.warn("CacheLoader DataSource " + INFINISPAN_JDBC_CL_DATASOURCE + " is not configured.");
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void stop()
+ {
+ super.stop();
+
+ PrivilegedCacheHelper.stop(cache);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected synchronized void internalLock(String sessionId, String nodeIdentifier) throws LockException
+ {
+ CacheableSessionLockManager session = sessionLockManagers.get(sessionId);
+ if (session != null && session.containsPendingLock(nodeIdentifier))
+ {
+ LockData lockData = session.getPendingLock(nodeIdentifier);
+
+ // this will return null if success. And old data if something exists...
+ LockData oldLockData = (LockData)PrivilegedCacheHelper.putIfAbsent(cache, nodeIdentifier, lockData);
+
+ if (oldLockData != null)
+ {
+ throw new LockException("Unable to write LockData. Node [" + lockData.getNodeIdentifier()
+ + "] already has LockData!");
+ }
+
+ session.notifyLockPersisted(nodeIdentifier);
+ }
+ else
+ {
+ throw new LockException("No lock in pending locks");
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected synchronized void internalUnLock(String sessionId, String nodeIdentifier) throws LockException
+ {
+ LockData lData = getLockDataById(nodeIdentifier);
+
+ if (lData != null)
+ {
+ cache.remove(nodeIdentifier);
+
+ CacheableSessionLockManager sessMgr = sessionLockManagers.get(sessionId);
+ if (sessMgr != null)
+ {
+ sessMgr.notifyLockRemoved(nodeIdentifier);
+ }
+ }
+ }
+}
Deleted: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/InfinispanLockManagerImpl.java
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/InfinispanLockManagerImpl.java 2010-07-21 08:43:09 UTC (rev 2807)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/infinispan/InfinispanLockManagerImpl.java 2010-07-21 08:46:42 UTC (rev 2808)
@@ -1,410 +0,0 @@
-/*
- *
- * 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.
- */
-package org.exoplatform.services.jcr.impl.core.lock.infinispan;
-
-import org.exoplatform.container.configuration.ConfigurationManager;
-import org.exoplatform.management.annotations.Managed;
-import org.exoplatform.management.jmx.annotations.NameTemplate;
-import org.exoplatform.management.jmx.annotations.Property;
-import org.exoplatform.services.jcr.config.MappedParametrizedObjectEntry;
-import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
-import org.exoplatform.services.jcr.config.WorkspaceEntry;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.AbstractCacheableLockManagerImpl;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.CacheableSessionLockManager;
-import org.exoplatform.services.jcr.impl.core.lock.jbosscache.LockData;
-import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
-import org.exoplatform.services.jcr.impl.storage.jdbc.DBConstants;
-import org.exoplatform.services.jcr.impl.storage.jdbc.DialectDetecter;
-import org.exoplatform.services.jcr.impl.util.io.PrivilegedCacheHelper;
-import org.exoplatform.services.jcr.infinispan.InfinispanCacheFactory;
-import org.exoplatform.services.log.ExoLogger;
-import org.exoplatform.services.log.Log;
-import org.exoplatform.services.naming.InitialContextInitializer;
-import org.exoplatform.services.transaction.TransactionService;
-import org.infinispan.Cache;
-
-import java.io.Serializable;
-import java.security.AccessController;
-import java.security.PrivilegedActionException;
-import java.security.PrivilegedExceptionAction;
-import java.sql.Connection;
-import java.sql.SQLException;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import javax.jcr.RepositoryException;
-import javax.jcr.lock.LockException;
-import javax.naming.InitialContext;
-import javax.sql.DataSource;
-import javax.transaction.Transaction
-
-/**
- * @author <a href="anatoliy.bazko(a)exoplatform.org">Anatoliy Bazko</a>
- * @version $Id$
- *
- */
-@Managed
-@NameTemplate(@Property(key = "service", value = "lockmanager"))
-public class InfinispanLockManagerImpl extends AbstractCacheableLockManagerImpl
-{
-
- /**
- * The name to property cache configuration.
- */
- public static final String INFINISPAN_JDBC_CL_DATASOURCE = "infinispan-cl-cache.jdbc.datasource";
-
- public static final String INFINISPAN_JDBC_CL_DATA_COLUMN = "infinispan-cl-cache.jdbc.data.type";
-
- public static final String INFINISPAN_JDBC_CL_TIMESTAMP_COLUMN = "infinispan-cl-cache.jdbc.timestamp.type";
-
- public static final String INFINISPAN_JDBC_CL_ID_COLUMN = "infinispan-cl-cache.jdbc.id.type";
-
- public static final String INFINISPAN_JDBC_CL_AUTO = "auto";
-
- /**
- * Logger
- */
- private final Log LOG = ExoLogger.getLogger("exo.jcr.component.core.InfinispanLockManagerImpl");
-
- private Cache<Serializable, Object> cache;
-
- public InfinispanLockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
- InitialContextInitializer context, TransactionService transactionService, ConfigurationManager cfm)
- throws RepositoryConfigurationException, RepositoryException
- {
- this(dataManager, config, context, transactionService.getTransactionManager(), cfm);
- }
-
- public InfinispanLockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
- InitialContextInitializer context, ConfigurationManager cfm) throws RepositoryConfigurationException,
- RepositoryException
- {
- this(dataManager, config, context, (TransactionManager)null, cfm);
- }
-
- public InfinispanLockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
- InitialContextInitializer context, TransactionManager transactionManager, ConfigurationManager cfm)
- throws RepositoryConfigurationException, RepositoryException
- {
- super(dataManager, config, transactionManager);
-
- // make cache
- if (config.getLockManager() != null)
- {
- // create cache using custom factory
- InfinispanCacheFactory<Serializable, Object> factory = new InfinispanCacheFactory<Serializable, Object>(cfm);
-
- // configure cache loader parameters with correct DB data-types
- configureJDBCCacheLoader(config.getLockManager());
-
- cache = factory.createCache(config.getLockManager());
-
- // Add the cache loader needed to prevent TimeoutException
- // addCacheLoader();
-
- // Context recall is a workaround of JDBCCacheLoader starting.
- context.recall();
- }
- else
- {
- throw new RepositoryConfigurationException("Cache configuration not found");
- }
-
- this.getNumLocks = new LockActionNonTxAware<Integer, Object>()
- {
- public Integer execute(Object arg)
- {
- return cache.size();
- }
- };
-
- this.hasLocks = new LockActionNonTxAware<Boolean, Object>()
- {
- public Boolean execute(Object arg)
- {
- return !cache.isEmpty();
- }
- };
-
- this.isLockLive = new LockActionNonTxAware<Boolean, String>()
- {
- public Boolean execute(String nodeId)
- {
- if (cache.get(nodeId) != null)
- {
- return true;
- }
-
- return false;
- }
- };
-
- this.refresh = new LockActionNonTxAware<Object, LockData>()
- {
- public Object execute(LockData newLockData) throws LockException
- {
- Object oldValue = PrivilegedCacheHelper.putIfAbsent(cache, newLockData.getNodeIdentifier(), newLockData);
- if (oldValue == null)
- {
- throw new LockException("Can't refresh lock for node " + newLockData.getNodeIdentifier()
- + " since lock is not exist");
- }
- return null;
- }
- };
-
- this.lockExist = new LockActionNonTxAware<Boolean, String>()
- {
- public Boolean execute(String nodeId) throws LockException
- {
- return cache.get(nodeId) != null;
- }
- };
-
- this.getLockDataById = new LockActionNonTxAware<LockData, String>()
- {
- public LockData execute(String nodeId) throws LockException
- {
- return (LockData)cache.get(nodeId);
- }
- };
-
- this.getLockList = new LockActionNonTxAware<List<LockData>, Object>()
- {
- public List<LockData> execute(Object arg) throws LockException
- {
- Collection<Object> datas = cache.values();
-
- List<LockData> locksData = new ArrayList<LockData>();
- for (Object lockData : datas)
- {
- if (lockData != null)
- {
- locksData.add((LockData)lockData);
- }
- }
- return locksData;
- }
- };
- }
-
- /**
- * If JDBC cache loader is used, then fills-in column types. If column type configured from jcr-configuration file,
- * then nothing is overridden. Parameters are injected into the given parameterEntry.
- */
- private void configureJDBCCacheLoader(MappedParametrizedObjectEntry parameterEntry) throws RepositoryException
- {
- String dataSourceName = parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_DATASOURCE, null);
- // if data source is defined, then inject correct data-types.
- // Also it cans be not defined and nothing should be injected (i.e. no cache loader is used (possibly pattern is changed, to used another cache loader))
- if (dataSourceName != null)
- {
- String dialect;
- // detect dialect of data-source
- try
- {
- final DataSource dataSource = (DataSource)new InitialContext().lookup(dataSourceName);
- if (dataSource == null)
- {
- throw new RepositoryException("DataSource (" + dataSourceName + ") can't be null");
- }
-
- Connection jdbcConn = null;
- try
- {
- PrivilegedExceptionAction<Connection> action = new PrivilegedExceptionAction<Connection>()
- {
- public Connection run() throws Exception
- {
- return dataSource.getConnection();
- }
- };
- try
- {
- jdbcConn = AccessController.doPrivileged(action);
- }
- catch (PrivilegedActionException pae)
- {
- Throwable cause = pae.getCause();
- if (cause instanceof SQLException)
- {
- throw (SQLException)cause;
- }
- else if (cause instanceof RuntimeException)
- {
- throw (RuntimeException)cause;
- }
- else
- {
- throw new RuntimeException(cause);
- }
- }
-
- dialect = DialectDetecter.detect(jdbcConn.getMetaData());
- }
- finally
- {
- if (jdbcConn != null && !jdbcConn.isClosed())
- {
- try
- {
- jdbcConn.close();
- }
- catch (SQLException e)
- {
- throw new RepositoryException("Error of connection close", e);
- }
- }
- }
- }
- catch (Exception e)
- {
- throw new RepositoryException("Error configuring JDBC cache loader", e);
- }
-
- // default values, will be overridden with types suitable for concrete data base.
- String blobType = "BLOB";
- String charType = "VARCHAR(512)";
- String timeStampType = "BIGINT";
- // HSSQL
- if (dialect.equals(DBConstants.DB_DIALECT_HSQLDB))
- {
- blobType = "OBJECT";
- }
- // MYSQL
- else if (dialect.equals(DBConstants.DB_DIALECT_MYSQL) || dialect.equals(DBConstants.DB_DIALECT_MYSQL_UTF8))
- {
- blobType = "LONGBLOB";
- }
- // ORACLE
- else if (dialect.equals(DBConstants.DB_DIALECT_ORACLE) || dialect.equals(DBConstants.DB_DIALECT_ORACLEOCI))
- {
- // Oracle suggests the use VARCHAR2 instead of VARCHAR while declaring data type.
- charType = "VARCHAR2(512)";
- timeStampType = "NUMBER(19, 0)";
- }
- // POSTGRE SQL
- else if (dialect.equals(DBConstants.DB_DIALECT_PGSQL))
- {
- blobType = "bytea";
- }
- // Microsoft SQL
- else if (dialect.equals(DBConstants.DB_DIALECT_MSSQL))
- {
- blobType = "VARBINARY(MAX)";
- }
- // SYBASE
- else if (dialect.equals(DBConstants.DB_DIALECT_SYBASE))
- {
- blobType = "IMAGE";
- }
- // INGRES
- else if (dialect.equals(DBConstants.DB_DIALECT_INGRES))
- {
- blobType = "long byte";
- }
- // else GENERIC, DB2 etc
-
- // set parameters if not defined
- // if parameter is missing in configuration, then getParameterValue(INFINISPAN_JDBC_CL_NODE_COLUMN, INFINISPAN_JDBC_CL_AUTO)
- // will return INFINISPAN_JDBC_CL_AUTO. If parameter is present in configuration and equals to "auto", then it should be replaced
- // with correct value for given database
- if (parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_DATA_COLUMN, INFINISPAN_JDBC_CL_AUTO)
- .equalsIgnoreCase(INFINISPAN_JDBC_CL_AUTO))
- {
- parameterEntry.putParameterValue(INFINISPAN_JDBC_CL_DATA_COLUMN, blobType);
- }
-
- if (parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_ID_COLUMN, INFINISPAN_JDBC_CL_AUTO).equalsIgnoreCase(
- INFINISPAN_JDBC_CL_AUTO))
- {
- parameterEntry.putParameterValue(INFINISPAN_JDBC_CL_ID_COLUMN, charType);
- }
-
- if (parameterEntry.getParameterValue(INFINISPAN_JDBC_CL_TIMESTAMP_COLUMN, INFINISPAN_JDBC_CL_AUTO)
- .equalsIgnoreCase(INFINISPAN_JDBC_CL_AUTO))
- {
- parameterEntry.putParameterValue(INFINISPAN_JDBC_CL_TIMESTAMP_COLUMN, timeStampType);
- }
- }
- else
- {
- LOG.warn("CacheLoader DataSource " + INFINISPAN_JDBC_CL_DATASOURCE + " is not configured.");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void stop()
- {
- super.stop();
-
- PrivilegedCacheHelper.stop(cache);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected synchronized void internalLock(String sessionId, String nodeIdentifier) throws LockException
- {
- CacheableSessionLockManager session = sessionLockManagers.get(sessionId);
- if (session != null && session.containsPendingLock(nodeIdentifier))
- {
- LockData lockData = session.getPendingLock(nodeIdentifier);
-
- // this will return null if success. And old data if something exists...
- LockData oldLockData = (LockData)PrivilegedCacheHelper.putIfAbsent(cache, nodeIdentifier, lockData);
-
- if (oldLockData != null)
- {
- throw new LockException("Unable to write LockData. Node [" + lockData.getNodeIdentifier()
- + "] already has LockData!");
- }
-
- session.notifyLockPersisted(nodeIdentifier);
- }
- else
- {
- throw new LockException("No lock in pending locks");
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected synchronized void internalUnLock(String sessionId, String nodeIdentifier) throws LockException
- {
- LockData lData = getLockDataById(nodeIdentifier);
-
- if (lData != null)
- {
- cache.remove(nodeIdentifier);
-
- CacheableSessionLockManager sessMgr = sessionLockManagers.get(sessionId);
- if (sessMgr != null)
- {
- sessMgr.notifyLockRemoved(nodeIdentifier);
- }
- }
- }
-}
Modified: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan.xml
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan.xml 2010-07-21 08:43:09 UTC (rev 2807)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/test/resources/conf/standalone/test-infinispan.xml 2010-07-21 08:46:42 UTC (rev 2808)
@@ -25,6 +25,12 @@
xmlns="urn:infinispan:config:4.0">
<global>
+ <evictionScheduledExecutor factory="org.infinispan.executors.DefaultScheduledExecutorFactory">
+ <properties>
+ <property name="threadNamePrefix" value="EvictionThread"/>
+ </properties>
+ </evictionScheduledExecutor>
+
<globalJmxStatistics jmxDomain="infinispan" enabled="true" allowDuplicateDomains="true"/>
</global>
Modified: jcr/branches/1.14-ISPN/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/branches/1.14-ISPN/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-07-21 08:43:09 UTC (rev 2807)
+++ jcr/branches/1.14-ISPN/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-07-21 08:46:42 UTC (rev 2808)
@@ -78,7 +78,7 @@
</properties>
</query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.InfinispanLockManagerImpl">
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
<properties>
<property name="time-out" value="15m" />
<property name="infinispan-configuration" value="conf/standalone/test-infinispan.xml" />
@@ -132,7 +132,7 @@
<property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
</properties>
</query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.InfinispanLockManagerImpl">
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
<properties>
<property name="time-out" value="15m" />
<property name="infinispan-configuration" value="conf/standalone/test-infinispan.xml" />
@@ -186,7 +186,7 @@
<property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
</properties>
</query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.InfinispanLockManagerImpl">
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
<properties>
<property name="time-out" value="15m" />
<property name="infinispan-configuration" value="conf/standalone/test-infinispan.xml" />
@@ -269,7 +269,7 @@
<property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
</properties>
</query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.InfinispanLockManagerImpl">
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
<properties>
<property name="time-out" value="15m" />
<property name="infinispan-configuration" value="conf/standalone/test-infinispan.xml" />
@@ -340,7 +340,7 @@
<property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
</properties>
</query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.InfinispanLockManagerImpl">
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
<properties>
<property name="time-out" value="15m" />
<property name="infinispan-configuration" value="conf/standalone/test-infinispan.xml" />
@@ -400,7 +400,7 @@
<property name="spellchecker-class" value="org.exoplatform.services.jcr.impl.core.query.lucene.spell.LuceneSpellChecker$FiveSecondsRefreshInterval" />
</properties>
</query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.InfinispanLockManagerImpl">
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
<properties>
<property name="time-out" value="15m" />
<property name="infinispan-configuration" value="conf/standalone/test-infinispan.xml" />
@@ -463,7 +463,7 @@
<property name="extractorTimeout" value="10"/>
</properties>
</query-handler>
- <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.InfinispanLockManagerImpl">
+ <lock-manager class="org.exoplatform.services.jcr.impl.core.lock.infinispan.ISPNCacheableLockManagerImpl">
<properties>
<property name="time-out" value="15m" />
<property name="infinispan-configuration" value="conf/standalone/test-infinispan.xml" />
13 years, 9 months
exo-jcr SVN: r2807 - jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/ws.
by do-not-reply@jboss.org
Author: tolusha
Date: 2010-07-21 04:43:09 -0400 (Wed, 21 Jul 2010)
New Revision: 2807
Modified:
jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/ws/groovy-scripts-as-rest-services.xml
Log:
EXOJCR-807: Port the article Groovy Scripts as REST Services
Modified: jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/ws/groovy-scripts-as-rest-services.xml
===================================================================
--- jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/ws/groovy-scripts-as-rest-services.xml 2010-07-21 08:00:15 UTC (rev 2806)
+++ jcr/trunk/docs/reference/en/src/main/docbook/en-US/modules/ws/groovy-scripts-as-rest-services.xml 2010-07-21 08:43:09 UTC (rev 2807)
@@ -381,4 +381,102 @@
<para>That is all.</para>
</section>
+
+ <section>
+ <title>Dependencies resolving</title>
+
+ <para>Since WS version 2.2.0-Beta01 and JCR version 1.14.0-Beta01 there is
+ support of script dependency resolving. If Groovy RESTful service use some
+ classes from other Groovy scripts they can be loaded when service will be
+ deployed. There is special
+ org.exoplatform.container.component.ComponentPlugin for this
+ (configuration example below).</para>
+
+ <programlisting><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="repository"/>
+ <property name="workspace" value="production"/>
+ <property name="path" value="/dependencies"/>
+ </properties-param>
+ </init-params>
+ </component-plugin>
+ </external-component-plugins></programlisting>
+
+ <para>It is possible to add more then one dependencies location, just one
+ more "properties-param" should be used.</para>
+
+ <para>When Groovy ClassLoader need load class in will try to load from
+ repository "repository", workspace "production" and from folder
+ "/dependencies/...". For example, we have simple Groovy RESTful service
+ :</para>
+
+ <programlisting>package org.exoplatform.groovy.test
+
+import javax.ws.rs.GET
+import javax.ws.rs.Path
+
+import org.exoplatform.groovy.lib.Dependency1
+
+@Path("groovy-test-dependency")
+public class TestDependency {
+
+ @GET
+ def method() {
+ return new Dependency1().getName()
+ }
+
+}</programlisting>
+
+ <para>and other script</para>
+
+ <programlisting>package org.exoplatform.groovy.lib
+
+class Dependency1
+{
+ String name = getClass().getName()
+}</programlisting>
+
+ <para>Script org.exoplatform.groovy.lib.Dependency1 MUST be located with
+ respect to package name. So if we make a decision to store dependencies in
+ repository "repository", workspace "production" and in folder
+ "/dependencies" then full path to org.exoplatform.groovy.lib.Dependency1
+ must be /dependencies/org/exoplatform/groovy/lib/Dependency1.groovy. If
+ script located as described it will be found automatically when "main"
+ service will be deployed.</para>
+ </section>
+
+ <section>
+ <title>Security</title>
+
+ <para>Since WS version 2.2.0-Beta01 and JCR version 1.14.0-Beta01 it is
+ possible to configure permissions of Groovy based RESTful services by
+ using special codebase. Let's see how we allow a dynamic (possibly user
+ defined) services to execute with limited permissions.</para>
+
+ <para>Add in existed or create new policy file and add next lines in
+ it</para>
+
+ <programlisting>grant codeBase "file:/groovy/script/jaxrs" {
+};</programlisting>
+
+ <para>In this case groovy services have not any privileges. Detailed list
+ of JDK permissions available here <link
+ linkend="???">http://java.sun.com/j2se/1.5.0/docs/guide/security/permissions.html#Prope...</link>
+ To give all permissions to Groovy services simply add next in policy
+ file</para>
+
+ <programlisting>grant codeBase "file:/groovy/script/jaxrs" {
+ permission java.security.AllPermission;
+};</programlisting>
+
+ <para>NOTE URL file:/groovy/script/jaxrs is virtual and not need be
+ present on file system.</para>
+ </section>
</chapter>
13 years, 9 months