exo-jcr SVN: r1728 - parent/trunk.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-02-08 10:31:16 -0500 (Mon, 08 Feb 2010)
New Revision: 1728
Modified:
parent/trunk/pom.xml
Log:
EXOJCR-454 org.jvnet.animal-sniffer plugin added to grant backward compatibility with Java 5
Modified: parent/trunk/pom.xml
===================================================================
--- parent/trunk/pom.xml 2010-02-08 15:00:02 UTC (rev 1727)
+++ parent/trunk/pom.xml 2010-02-08 15:31:16 UTC (rev 1728)
@@ -18,6 +18,7 @@
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>
@@ -36,7 +37,7 @@
<name>eXo Platform SAS</name>
<url>http://www.exoplatform.com</url>
</organization>
-
+
<licenses>
<license>
<name>LGPL, version 2.1</name>
@@ -106,13 +107,13 @@
<exo.projects.directory.working>${exo.projects.directory.base}/exo-working</exo.projects.directory.working>
<exo.projects.app.mvn.repo>${exo.projects.directory.dependencies}/repository</exo.projects.app.mvn.repo>
-
+
<exo.projects.app.tomcat.version>tomcat-6.0.16</exo.projects.app.tomcat.version>
<exo.projects.app.jboss.version>jboss-4.2.3.GA</exo.projects.app.jboss.version>
<exo.projects.app.jonas.version>JONAS_4_8_5</exo.projects.app.jonas.version>
-
+
<exo.dev.resources.version>1.2.0</exo.dev.resources.version>
-
+
<exo.product.name>eXo Platform</exo.product.name>
<exo.product.specification>N/A</exo.product.specification>
@@ -122,17 +123,17 @@
<maven.test.failure.ignore>false</maven.test.failure.ignore>
<surefire.useFile>true</surefire.useFile>
<exo.test.includes>Test*</exo.test.includes>
-
+
<!-- Defaut compiler settings -->
<maven.compiler.optimize>true</maven.compiler.optimize>
<maven.compiler.source>1.5</maven.compiler.source>
<maven.compiler.target>1.5</maven.compiler.target>
-
+
<!-- Encoding used for files in the project -->
<!-- Standard property supported by many plugins : compiler, resources, ... -->
<!-- Will be an entry in the POM in the future -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
+
<!-- Plugins versions are defined in propertiesto reuse them between build and reporting parts if necessary -->
<assembly.plugin.version>2.2-beta-4</assembly.plugin.version>
<buildnumber.plugin.version>1.0-beta-3</buildnumber.plugin.version>
@@ -200,7 +201,7 @@
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
- </configuration>
+ </configuration>
<archive>
<!-- Manifest management -->
<manifestEntries>
@@ -224,7 +225,7 @@
<configuration>
<useReleaseProfile>false</useReleaseProfile>
<arguments>-Prelease -Dmaven.test.skip=true</arguments>
- <autoVersionSubmodules>true</autoVersionSubmodules>
+ <autoVersionSubmodules>true</autoVersionSubmodules>
</configuration>
</plugin>
<plugin>
@@ -235,7 +236,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
- <!-- Version from JBoss -->
+ <!-- Version from JBoss -->
<configuration>
<!-- This is a workaroud for MSOURCES-44 -->
<includePom>true</includePom>
@@ -290,29 +291,29 @@
<version>${jaxb2.plugin.version}</version>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>${checkstyle.plugin.version}</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>${checkstyle.plugin.version}</version>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-javadoc-plugin</artifactId>
- <version>${javadoc.plugin.version}</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>${javadoc.plugin.version}</version>
</plugin>
<plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>taglist-maven-plugin</artifactId>
- <version>${taglist.plugin.version}</version>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>taglist-maven-plugin</artifactId>
+ <version>${taglist.plugin.version}</version>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-ear-plugin</artifactId>
- <version>${ear.plugin.version}</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-ear-plugin</artifactId>
+ <version>${ear.plugin.version}</version>
</plugin>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
- <version>${assembly.plugin.version}</version>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>${assembly.plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>
@@ -348,274 +349,295 @@
<version>${taglist.plugin.version}</version>
</plugin>
</plugins>
- </reporting>
+ </reporting>
<profiles>
- <profile>
- <id>checkstyle</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>${checkstyle.plugin.version}</version>
- <dependencies>
- <dependency>
- <groupId>org.exoplatform.tool</groupId>
- <artifactId>dev-resources</artifactId>
- <version>${exo.dev.resources.version}</version>
- </dependency>
- </dependencies>
- <executions>
- <execution>
- <phase>verify</phase>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-checkstyle-plugin</artifactId>
- <version>${checkstyle.plugin.version}</version>
- <configuration>
- <violationSeverity>warning</violationSeverity>
- <configLocation>checkstyle/codestyle.xml</configLocation>
- <headerLocation>checkstyle/java.header</headerLocation>
- </configuration>
- </plugin>
- </plugins>
- </reporting>
- </profile>
- <profile>
- <id>release</id>
- <build>
- <pluginManagement>
+ <profile>
+ <id>checkstyle</id>
+ <build>
<plugins>
- <!-- Manifest management -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <configuration>
- <archive>
- <manifestEntries>
- <SCM-Revision>${buildNumber}</SCM-Revision>
- <SCM-URL>${project.scm.connection}</SCM-URL>
- <Specification-Title>${exo.product.name}</Specification-Title>
- <Specification-Version>${exo.product.specification}</Specification-Version>
- <Specification-Vendor>${project.organization.name}</Specification-Vendor>
- <Implementation-Title>${project.name}</Implementation-Title>
- <Implementation-Version>${project.version}</Implementation-Version>
- <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
- </manifestEntries>
- </archive>
- </configuration>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>${checkstyle.plugin.version}</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.exoplatform.tool</groupId>
+ <artifactId>dev-resources</artifactId>
+ <version>${exo.dev.resources.version}</version>
+ </dependency>
+ </dependencies>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
</plugin>
-
- <!-- Manifest management -->
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>${checkstyle.plugin.version}</version>
<configuration>
- <archive>
- <manifestEntries>
- <SCM-Revision>${buildNumber}</SCM-Revision>
- <SCM-URL>${project.scm.connection}</SCM-URL>
- <Specification-Title>${exo.product.name}</Specification-Title>
- <Specification-Version>${exo.product.specification}</Specification-Version>
- <Specification-Vendor>${project.organization.name}</Specification-Vendor>
- <Implementation-Title>${project.name}</Implementation-Title>
- <Implementation-Version>${project.version}</Implementation-Version>
- <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
- </manifestEntries>
- </archive>
+ <violationSeverity>warning</violationSeverity>
+ <configLocation>checkstyle/codestyle.xml</configLocation>
+ <headerLocation>checkstyle/java.header</headerLocation>
</configuration>
</plugin>
</plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>buildnumber-maven-plugin</artifactId>
- <executions>
- <execution>
- <phase>validate</phase>
- <goals>
- <goal>create</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <doCheck>false</doCheck>
- <doUpdate>false</doUpdate>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>tomcat-server</id>
- <activation>
- <property>
- <name>tomcat</name>
- </property>
- <activeByDefault>false</activeByDefault>
- </activation>
- </profile>
- <profile>
- <id>jboss-server</id>
- <activation>
- <property>
- <name>jboss-server</name>
- </property>
- <activeByDefault>false</activeByDefault>
- </activation>
- </profile>
- <profile>
- <id>jonas-server</id>
- <activation>
- <property>
- <name>jonas-server</name>
- </property>
- <activeByDefault>false</activeByDefault>
- </activation>
- </profile>
- <profile>
- <id>jmeter-perftest</id>
- <activation>
- <property>
- <name>jmeter-perftest</name>
- </property>
- <activeByDefault>false</activeByDefault>
- </activation>
- </profile>
+ </reporting>
+ </profile>
+ <profile>
+ <id>release</id>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <!-- Manifest management -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <SCM-Revision>${buildNumber}</SCM-Revision>
+ <SCM-URL>${project.scm.connection}</SCM-URL>
+ <Specification-Title>${exo.product.name}</Specification-Title>
+ <Specification-Version>${exo.product.specification}</Specification-Version>
+ <Specification-Vendor>${project.organization.name}</Specification-Vendor>
+ <Implementation-Title>${project.name}</Implementation-Title>
+ <Implementation-Version>${project.version}</Implementation-Version>
+ <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
- <!-- Tests coverage with emma -->
- <profile>
- <id>emma</id>
- <properties>
- <maven.test.failure.ignore>true</maven.test.failure.ignore>
- </properties>
- <build>
- <pluginManagement>
+ <!-- Manifest management -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <SCM-Revision>${buildNumber}</SCM-Revision>
+ <SCM-URL>${project.scm.connection}</SCM-URL>
+ <Specification-Title>${exo.product.name}</Specification-Title>
+ <Specification-Version>${exo.product.specification}</Specification-Version>
+ <Specification-Vendor>${project.organization.name}</Specification-Vendor>
+ <Implementation-Title>${project.name}</Implementation-Title>
+ <Implementation-Version>${project.version}</Implementation-Version>
+ <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>buildnumber-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <goals>
+ <goal>create</goal>
+ </goals>
+ </execution>
+ </executions>
<configuration>
- <systemProperties>
- <property>
- <name>emma.coverage.out.file</name>
- <value>target/emma/coverage.ec</value>
- </property>
- </systemProperties>
+ <doCheck>false</doCheck>
+ <doUpdate>false</doUpdate>
</configuration>
- </plugin>
+ </plugin>
+ <plugin>
+ <groupId>org.jvnet</groupId>
+ <artifactId>animal-sniffer</artifactId>
+ <version>1.2</version>
+ <executions>
+ <execution>
+ <id>check-java-compatibility</id>
+ <phase>compile</phase>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ <configuration>
+ <signature>
+ <groupId>org.jvnet.animal-sniffer</groupId>
+ <artifactId>java1.5</artifactId>
+ <version>1.0</version>
+ </signature>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
- </pluginManagement>
- <plugins>
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>emma1</id>
- <phase>test-compile</phase>
- <configuration>
- <tasks if="emma.run">
- <echo message="[EMMA] Start classes instrumentation ..." />
- <taskdef resource="emma_ant.properties" classpathref="maven.dependency.classpath" />
- <mkdir dir="target" />
- <mkdir dir="target/classes" />
- <mkdir dir="target/emma/classes" />
- <!-- Do nothing if the directory already exist-->
- <copy todir="target/emma/classes" verbose="false" overwrite="true">
- <fileset dir="target/classes" />
- </copy>
- <emma enabled="true">
- <instr mode="overwrite" metadatafile="target/emma/metadata.em">
- <filter excludes="*.xml.*" />
- <filter excludes="*JiBX*" />
- <filter excludes="*Entry*" />
- <filter excludes="*Value*" />
- <filter excludes="*RepositoryServiceConfiguration*" />
- <filter excludes="*.query*" />
+ </build>
+ </profile>
+ <profile>
+ <id>tomcat-server</id>
+ <activation>
+ <property>
+ <name>tomcat</name>
+ </property>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ </profile>
+ <profile>
+ <id>jboss-server</id>
+ <activation>
+ <property>
+ <name>jboss-server</name>
+ </property>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ </profile>
+ <profile>
+ <id>jonas-server</id>
+ <activation>
+ <property>
+ <name>jonas-server</name>
+ </property>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ </profile>
+ <profile>
+ <id>jmeter-perftest</id>
+ <activation>
+ <property>
+ <name>jmeter-perftest</name>
+ </property>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ </profile>
- <instrpath>
- <dirset dir="target">
- <include name="emma/classes" />
- </dirset>
- </instrpath>
- </instr>
- </emma>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- <execution>
- <id>emma2</id>
- <phase>test</phase>
+ <!-- Tests coverage with emma -->
+ <profile>
+ <id>emma</id>
+ <properties>
+ <maven.test.failure.ignore>true</maven.test.failure.ignore>
+ </properties>
+ <build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <tasks if="emma.run">
- <echo message="[EMMA] Start report generation..." />
- <taskdef resource="emma_ant.properties" classpathref="maven.dependency.classpath" />
- <emma enabled="true">
- <!-- merged file will be rewritted by last project -->
- <merge outfile="target/coverage.es">
- <fileset dir=".">
- <include name="**/target/emma/*.e*" />
- <include name="**/target/emma/*.e*" />
- </fileset>
- </merge>
- <report>
- <sourcepath>
- <dirset dir=".">
- <include name="**/src/**/java" />
- </dirset>
- </sourcepath>
- <fileset dir="target/">
- <include name="*.es" />
- </fileset>
- <html outfile="target/coverage.html" />
- <xml outfile="target/coverage.xml" />
- </report>
- </emma>
- </tasks>
+ <systemProperties>
+ <property>
+ <name>emma.coverage.out.file</name>
+ <value>target/emma/coverage.ec</value>
+ </property>
+ </systemProperties>
</configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>emma</groupId>
- <artifactId>emma</artifactId>
- <version>2.0.5312</version>
- </dependency>
- <dependency>
- <groupId>emma</groupId>
- <artifactId>emma_ant</artifactId>
- <version>2.0.5312</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
- <dependencies>
- <dependency>
- <groupId>emma</groupId>
- <artifactId>emma</artifactId>
- <version>2.0.5312</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </profile>
-</profiles>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>emma1</id>
+ <phase>test-compile</phase>
+ <configuration>
+ <tasks if="emma.run">
+ <echo message="[EMMA] Start classes instrumentation ..." />
+ <taskdef resource="emma_ant.properties" classpathref="maven.dependency.classpath" />
+ <mkdir dir="target" />
+ <mkdir dir="target/classes" />
+ <mkdir dir="target/emma/classes" />
+ <!-- Do nothing if the directory already exist-->
+ <copy todir="target/emma/classes" verbose="false" overwrite="true">
+ <fileset dir="target/classes" />
+ </copy>
+ <emma enabled="true">
+ <instr mode="overwrite" metadatafile="target/emma/metadata.em">
+ <filter excludes="*.xml.*" />
+ <filter excludes="*JiBX*" />
+ <filter excludes="*Entry*" />
+ <filter excludes="*Value*" />
+ <filter excludes="*RepositoryServiceConfiguration*" />
+ <filter excludes="*.query*" />
+
+ <instrpath>
+ <dirset dir="target">
+ <include name="emma/classes" />
+ </dirset>
+ </instrpath>
+ </instr>
+ </emma>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>emma2</id>
+ <phase>test</phase>
+ <configuration>
+ <tasks if="emma.run">
+ <echo message="[EMMA] Start report generation..." />
+ <taskdef resource="emma_ant.properties" classpathref="maven.dependency.classpath" />
+ <emma enabled="true">
+ <!-- merged file will be rewritted by last project -->
+ <merge outfile="target/coverage.es">
+ <fileset dir=".">
+ <include name="**/target/emma/*.e*" />
+ <include name="**/target/emma/*.e*" />
+ </fileset>
+ </merge>
+ <report>
+ <sourcepath>
+ <dirset dir=".">
+ <include name="**/src/**/java" />
+ </dirset>
+ </sourcepath>
+ <fileset dir="target/">
+ <include name="*.es" />
+ </fileset>
+ <html outfile="target/coverage.html" />
+ <xml outfile="target/coverage.xml" />
+ </report>
+ </emma>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma</artifactId>
+ <version>2.0.5312</version>
+ </dependency>
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma_ant</artifactId>
+ <version>2.0.5312</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>emma</groupId>
+ <artifactId>emma</artifactId>
+ <version>2.0.5312</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ </profiles>
</project>
14 years, 5 months
exo-jcr SVN: r1727 - in jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone: cluster and 1 other directory.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2010-02-08 10:00:02 -0500 (Mon, 08 Feb 2010)
New Revision: 1727
Modified:
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jcr-config.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
Log:
EXOJCR-470: Database data-types from cache loader configuration removed from configuration. They are now discovered and inserted automatically.
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jcr-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jcr-config.xml 2010-02-08 14:51:55 UTC (rev 1726)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/cluster/test-jcr-config.xml 2010-02-08 15:00:02 UTC (rev 1727)
@@ -78,9 +78,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1_ws_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
</properties>
@@ -151,9 +149,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1_ws1_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
</properties>
@@ -224,9 +220,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1_ws2_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
</properties>
@@ -311,9 +305,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1_ws3_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
</properties>
@@ -403,9 +395,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1tck_ws_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
</properties>
@@ -481,9 +471,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1tck_ws1_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
</properties>
@@ -562,9 +550,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1tck_ws2_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
</properties>
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-02-08 14:51:55 UTC (rev 1726)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-jcr-config.xml 2010-02-08 15:00:02 UTC (rev 1727)
@@ -86,9 +86,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1_ws_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr" />
</properties>
@@ -140,9 +138,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1_ws1_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr1" />
</properties>
@@ -194,9 +190,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1_ws2_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr2" />
</properties>
@@ -279,9 +273,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1_ws3_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr3" />
</properties>
@@ -351,9 +343,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1tck_ws_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcrtck" />
</properties>
@@ -411,9 +401,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1tck_ws1_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr1tck" />
</properties>
@@ -474,9 +462,7 @@
<property name="jbosscache-cl-cache.jdbc.table.drop" value="false" />
<property name="jbosscache-cl-cache.jdbc.table.primarykey" value="jcrlocks_db1tck_ws2_pk" />
<property name="jbosscache-cl-cache.jdbc.fqn.column" value="fqn" />
- <property name="jbosscache-cl-cache.jdbc.fqn.type" value="VARCHAR(512)" />
<property name="jbosscache-cl-cache.jdbc.node.column" value="node" />
- <property name="jbosscache-cl-cache.jdbc.node.type" value="OBJECT" />
<property name="jbosscache-cl-cache.jdbc.parent.column" value="parent" />
<property name="jbosscache-cl-cache.jdbc.datasource" value="jdbcjcr2tck" />
</properties>
14 years, 5 months
exo-jcr SVN: r1726 - jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2010-02-08 09:51:55 -0500 (Mon, 08 Feb 2010)
New Revision: 1726
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
Log:
EXOJCR-470: update comments.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-08 14:51:21 UTC (rev 1725)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-08 14:51:55 UTC (rev 1726)
@@ -269,7 +269,8 @@
public void configureJDBCCacheLoader(MappedParametrizedObjectEntry parameterEntry) throws RepositoryException
{
String dataSourceName = parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_DATASOURCE, null);
- // if data source is not defined, i.e. no cache loader is used (possibly pattern is changed, to used another cache loader)
+ // 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;
@@ -301,7 +302,6 @@
{
// Oracle suggests the use VARCHAR2 instead of VARCHAR while declaring data type.
charType = "VARCHAR2(512)";
- blobType = "BLOB";
}
// POSTGRE SQL
else if (dialect.equals(DBConstants.DB_DIALECT_PGSQL))
@@ -335,7 +335,7 @@
{
parameterEntry.putParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, blobType);
}
-
+
if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_FQN_COLUMN, null) == null)
{
parameterEntry.putParameterValue(JBOSSCACHE_JDBC_CL_FQN_COLUMN, charType);
14 years, 5 months
exo-jcr SVN: r1725 - jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/load/query.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2010-02-08 09:51:21 -0500 (Mon, 08 Feb 2010)
New Revision: 1725
Modified:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/load/query/JcrQueryAvgResponceTimeTest.java
Log:
EXOJCR-395 : added search by path
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/load/query/JcrQueryAvgResponceTimeTest.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/load/query/JcrQueryAvgResponceTimeTest.java 2010-02-08 14:40:45 UTC (rev 1724)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/load/query/JcrQueryAvgResponceTimeTest.java 2010-02-08 14:51:21 UTC (rev 1725)
@@ -83,6 +83,8 @@
public static final String FIELDNAME_STATISTIC = "Statistic";
+ private static final String TEST_ROOT = "JcrQueryAvgResponceTimeTest";
+
public void testname() throws Exception
{
QueryAvgResponceTimeTest test =
@@ -172,7 +174,7 @@
sessionLocal = repository.login(credentials, "ws");
// prepare nodes
Node wsRoot = sessionLocal.getRootNode();
- Node threadNode = getOrCreateNode(wsRoot, threadUUID);
+ Node threadNode = getOrCreateNode(getOrCreateNode(TEST_ROOT, wsRoot), threadUUID);
sessionLocal.save();
sessionLocal.logout();
sessionLocal = null;
@@ -223,18 +225,21 @@
{
// login
CredentialsImpl credentials = new CredentialsImpl("admin", "admin".toCharArray());
+
sessionLocal = repository.login(credentials, "ws");
+ Node testRoot = sessionLocal.getRootNode().getNode(TEST_ROOT);
// prepare nodes
int i = random.nextInt(words.length);
String word = words[i];
Query q =
sessionLocal.getWorkspace().getQueryManager().createQuery(
- "SELECT * FROM nt:base WHERE " + FIELDNAME_CONTENT + "='" + word + "'", Query.SQL);
+ "SELECT * FROM nt:base WHERE " + FIELDNAME_CONTENT + "='" + word + "' AND jcr:path LIKE '"
+ + testRoot.getPath() + "/%'", Query.SQL);
long start = System.currentTimeMillis();
QueryResult res = q.execute();
long sqlsize = res.getNodes().getSize();
result.add(new WorkerResult(true, System.currentTimeMillis() - start));
- //log.info(word + " found:" + sqlsize + " time=" + (System.currentTimeMillis() - start));
+ log.info(word + " found:" + sqlsize + " time=" + (System.currentTimeMillis() - start));
}
catch (Exception e)
@@ -269,7 +274,7 @@
CredentialsImpl credentials = new CredentialsImpl("admin", "admin".toCharArray());
sessionLocal = repository.login(credentials, "ws");
long start = System.currentTimeMillis();
- Node threadNode = getOrCreateNode(sessionLocal.getRootNode(), threadUUID);
+ Node threadNode = getOrCreateNode(getOrCreateNode(TEST_ROOT, sessionLocal.getRootNode()), threadUUID);
addCountent(threadNode, UUID.randomUUID(), word);
sessionLocal.save();
result.add(new WorkerResult(false, System.currentTimeMillis() - start));
@@ -311,11 +316,11 @@
private Node getOrCreateNode(Node testRoot, UUID nodePath) throws RepositoryException
{
String uuidPath = nodePath.toString();
- Node l1 = addOrCreate(uuidPath.substring(0, 8), testRoot);
- Node l2 = addOrCreate(uuidPath.substring(9, 13), l1);
- Node l3 = addOrCreate(uuidPath.substring(14, 18), l2);
- Node l4 = addOrCreate(uuidPath.substring(19, 23), l3);
- return addOrCreate(uuidPath.substring(24), l4);
+ Node l1 = getOrCreateNode(uuidPath.substring(0, 8), testRoot);
+ Node l2 = getOrCreateNode(uuidPath.substring(9, 13), l1);
+ Node l3 = getOrCreateNode(uuidPath.substring(14, 18), l2);
+ Node l4 = getOrCreateNode(uuidPath.substring(19, 23), l3);
+ return getOrCreateNode(uuidPath.substring(24), l4);
}
@@ -327,7 +332,7 @@
* @return
* @throws RepositoryException
*/
- private Node addOrCreate(String name, Node parent) throws RepositoryException
+ private Node getOrCreateNode(String name, Node parent) throws RepositoryException
{
if (parent.hasNode(name))
{
14 years, 5 months
exo-jcr SVN: r1724 - in jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl: storage/jdbc and 1 other directory.
by do-not-reply@jboss.org
Author: nzamosenchuk
Date: 2010-02-08 09:40:45 -0500 (Mon, 08 Feb 2010)
New Revision: 1724
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java
Log:
EXOJCR-470: If column types are not defined in CL configuration, then datasource's dialect is detected and suitable datatypes are injected into configuration.
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-08 14:29:31 UTC (rev 1723)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/CacheableLockManagerImpl.java 2010-02-08 14:40:45 UTC (rev 1724)
@@ -22,6 +22,7 @@
import org.exoplatform.management.jmx.annotations.NameTemplate;
import org.exoplatform.management.jmx.annotations.Property;
import org.exoplatform.services.jcr.access.SystemIdentity;
+import org.exoplatform.services.jcr.config.MappedParametrizedObjectEntry;
import org.exoplatform.services.jcr.config.RepositoryConfigurationException;
import org.exoplatform.services.jcr.config.SimpleParameterEntry;
import org.exoplatform.services.jcr.config.WorkspaceEntry;
@@ -45,6 +46,8 @@
import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
import org.exoplatform.services.jcr.impl.dataflow.persistent.WorkspacePersistentDataManager;
import org.exoplatform.services.jcr.impl.storage.JCRInvalidItemStateException;
+import org.exoplatform.services.jcr.impl.storage.jdbc.DBConstants;
+import org.exoplatform.services.jcr.impl.storage.jdbc.DialectDetecter;
import org.exoplatform.services.jcr.jbosscache.ExoJBossCacheFactory;
import org.exoplatform.services.jcr.observation.ExtendedEvent;
import org.exoplatform.services.log.ExoLogger;
@@ -74,6 +77,8 @@
import javax.jcr.RepositoryException;
import javax.jcr.lock.LockException;
+import javax.naming.InitialContext;
+import javax.sql.DataSource;
import javax.transaction.Transaction;
import javax.transaction.TransactionManager;
@@ -99,6 +104,12 @@
*/
public static final String JBOSSCACCHE_CONFIG = "jbosscache-configuration";
+ public static final String JBOSSCACHE_JDBC_CL_DATASOURCE = "jbosscache-cl-cache.jdbc.datasource";
+
+ public static final String JBOSSCACHE_JDBC_CL_NODE_COLUMN = "jbosscache-cl-cache.jdbc.node.type";
+
+ public static final String JBOSSCACHE_JDBC_CL_FQN_COLUMN = "jbosscache-cl-cache.jdbc.fqn.type";
+
/**
* Default lock time out. 30min
*/
@@ -160,7 +171,7 @@
*/
public CacheableLockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
InitialContextInitializer context, TransactionService transactionService, ConfigurationManager cfm)
- throws RepositoryConfigurationException
+ throws RepositoryConfigurationException, RepositoryException
{
this(dataManager, config, context, transactionService.getTransactionManager(), cfm);
}
@@ -174,7 +185,8 @@
* @throws RepositoryConfigurationException
*/
public CacheableLockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
- InitialContextInitializer context, ConfigurationManager cfm) throws RepositoryConfigurationException
+ InitialContextInitializer context, ConfigurationManager cfm) throws RepositoryConfigurationException,
+ RepositoryException
{
this(dataManager, config, context, (TransactionManager)null, cfm);
@@ -192,7 +204,7 @@
*/
public CacheableLockManagerImpl(WorkspacePersistentDataManager dataManager, WorkspaceEntry config,
InitialContextInitializer context, TransactionManager transactionManager, ConfigurationManager cfm)
- throws RepositoryConfigurationException
+ throws RepositoryConfigurationException, RepositoryException
{
lockRoot = Fqn.fromElements(LOCKS);
@@ -229,6 +241,8 @@
// create cache using custom factory
ExoJBossCacheFactory<Serializable, Object> factory =
new ExoJBossCacheFactory<Serializable, Object>(cfm, transactionManager);
+ // configure cache loader parameters with correct DB data-types
+ configureJDBCCacheLoader(config.getLockManager());
cache = factory.createCache(config.getLockManager());
@@ -249,6 +263,88 @@
}
/**
+ * 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.
+ */
+ public void configureJDBCCacheLoader(MappedParametrizedObjectEntry parameterEntry) throws RepositoryException
+ {
+ String dataSourceName = parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_DATASOURCE, null);
+ // if data source is not defined, 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
+ {
+ DataSource dataSource = (DataSource)new InitialContext().lookup(dataSourceName);
+ dialect = DialectDetecter.detect(dataSource);
+ }
+ 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)";
+ // 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)";
+ blobType = "BLOB";
+ }
+ // 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";
+ }
+ // GENERIC or DB2
+ else
+ {
+ charType = "VARCHAR(512)";
+ blobType = "BLOB";
+ }
+
+ // set parameters if not defined
+ if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, null) == null)
+ {
+ parameterEntry.putParameterValue(JBOSSCACHE_JDBC_CL_NODE_COLUMN, blobType);
+ }
+
+ if (parameterEntry.getParameterValue(JBOSSCACHE_JDBC_CL_FQN_COLUMN, null) == null)
+ {
+ parameterEntry.putParameterValue(JBOSSCACHE_JDBC_CL_FQN_COLUMN, charType);
+ }
+
+ }
+ }
+
+ /**
* This methods adds programmatically the required {@link CacheLoader} needed to prevent
* any {@link TimeoutException}
*/
@@ -1009,5 +1105,4 @@
{
R execute(A arg) throws LockException;
}
-
}
Modified: jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java 2010-02-08 14:29:31 UTC (rev 1723)
+++ jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/storage/jdbc/DialectDetecter.java 2010-02-08 14:40:45 UTC (rev 1724)
@@ -18,9 +18,13 @@
*/
package org.exoplatform.services.jcr.impl.storage.jdbc;
+import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
+import javax.jcr.RepositoryException;
+import javax.sql.DataSource;
+
/**
* JDBC dialect detecter based on database metadata and vendor product name.
*
@@ -30,7 +34,7 @@
*/
public class DialectDetecter
{
-
+
/**
* Detect databse dialect using JDBC metadata. Based on code of
* http://svn.jboss.org/repos/hibernate/core/trunk/core/src/main/java/org/hi...
@@ -125,4 +129,34 @@
return DBConstants.DB_DIALECT_GENERIC;
}
+ /**
+ * Tries to detect dialect of DataSource
+ *
+ * @param dataSourceName
+ * @return
+ * @throws RepositoryException
+ */
+ public static String detect(DataSource dataSource) throws SQLException
+ {
+ // if no datasource provided
+ if (dataSource == null)
+ {
+ throw new SQLException("DataSource can't be null");
+ }
+ // try to detect dialect
+ Connection jdbcConn = null;
+ try
+ {
+ jdbcConn = dataSource.getConnection();
+ return detect(jdbcConn.getMetaData());
+ }
+ finally
+ {
+ if (jdbcConn != null && !jdbcConn.isClosed())
+ {
+ jdbcConn.close();
+ }
+ }
+
+ }
}
14 years, 5 months
exo-jcr SVN: r1723 - jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone.
by do-not-reply@jboss.org
Author: pnedonosko
Date: 2010-02-08 09:29:31 -0500 (Mon, 08 Feb 2010)
New Revision: 1723
Modified:
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml
jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml
Log:
EXOJCR-469 disable FileCleaner logger DEBUG in tests
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml 2010-02-08 14:15:54 UTC (rev 1722)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration-sjdbc.xml 2010-02-08 14:29:31 UTC (rev 1723)
@@ -52,7 +52,7 @@
<property name="log4j.appender.file.layout" value="org.apache.log4j.PatternLayout"/>
<property name="log4j.appender.file.layout.ConversionPattern" value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
- <!-- property name="log4j.category.jcr.DBInitializer" value="DEBUG"/ -->
+ <!-- property name="log4j.category.jcr.DBInitializer" value="DEBUG"/ -->
<!-- property name="log4j.category.jcr.SessionDataManager" value="DEBUG"/>
<property name="log4j.category.jcr.JDBCStorageConnection" value="DEBUG"/>
Modified: jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml 2010-02-08 14:15:54 UTC (rev 1722)
+++ jcr/trunk/exo.jcr.component.core/src/test/resources/conf/standalone/test-configuration.xml 2010-02-08 14:29:31 UTC (rev 1723)
@@ -54,7 +54,7 @@
<property name="log4j.appender.file.layout.ConversionPattern"
value="%d{dd.MM.yyyy HH:mm:ss} *%-5p* [%t] %c{1}: %m (%F, line %L) %n"/>
- <property name="log4j.category.jcr.FileCleaner" value="DEBUG"/>
+ <!-- property name="log4j.category.jcr.FileCleaner" value="DEBUG"/ -->
<!-- property name="log4j.category.jcr.JDBCStorageConnection" value="DEBUG"/>
<property name="log4j.category.jcr.NodeImpl" value="DEBUG"/ -->
14 years, 5 months
exo-jcr SVN: r1722 - jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/load/query.
by do-not-reply@jboss.org
Author: skabashnyuk
Date: 2010-02-08 09:15:54 -0500 (Mon, 08 Feb 2010)
New Revision: 1722
Modified:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/load/query/JcrQueryAvgResponceTimeTest.java
Log:
EXOJCR-395 : more test time
Modified: jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/load/query/JcrQueryAvgResponceTimeTest.java
===================================================================
--- jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/load/query/JcrQueryAvgResponceTimeTest.java 2010-02-08 14:06:35 UTC (rev 1721)
+++ jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/cluster/load/query/JcrQueryAvgResponceTimeTest.java 2010-02-08 14:15:54 UTC (rev 1722)
@@ -60,12 +60,12 @@
/**
* 2min default time of work of one iteration.
*/
- private static final int ITERATION_TIME = 60 * 1000;
+ private static final int ITERATION_TIME = 20 * 60 * 1000;
/**
* How much thread will be added on the next iteration.
*/
- private static final int ITERATION_GROWING_POLL = 5;
+ private static final int ITERATION_GROWING_POLL = 15;
/**
* Number between 0 and 100 show % how many read operations.
@@ -86,7 +86,7 @@
public void testname() throws Exception
{
QueryAvgResponceTimeTest test =
- new QueryAvgResponceTimeTest(repository, ITERATION_GROWING_POLL, ITERATION_TIME, 1, READ_VALUE);
+ new QueryAvgResponceTimeTest(repository, ITERATION_GROWING_POLL, ITERATION_TIME, 15, READ_VALUE);
test.testResponce();
}
14 years, 5 months
exo-jcr SVN: r1721 - jcr/trunk.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-02-08 09:06:35 -0500 (Mon, 08 Feb 2010)
New Revision: 1721
Modified:
jcr/trunk/pom.xml
Log:
EXOJCR-454 foundation-parent updated to 4-SNAPSHOT version
Modified: jcr/trunk/pom.xml
===================================================================
--- jcr/trunk/pom.xml 2010-02-08 14:05:59 UTC (rev 1720)
+++ jcr/trunk/pom.xml 2010-02-08 14:06:35 UTC (rev 1721)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform</groupId>
<artifactId>foundation-parent</artifactId>
- <version>3</version>
+ <version>4-SNAPSHOT</version>
</parent>
<groupId>org.exoplatform.jcr</groupId>
<artifactId>jcr-parent</artifactId>
@@ -424,6 +424,7 @@
</includes>
<excludes>
<exclude>**/ftpclient/**/*.java</exclude>
+ <exclude>**/TestCleanableFileStreamValueData.java</exclude>
</excludes>
</configuration>
</plugin>
14 years, 5 months
exo-jcr SVN: r1720 - ws/trunk.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-02-08 09:05:59 -0500 (Mon, 08 Feb 2010)
New Revision: 1720
Modified:
ws/trunk/pom.xml
Log:
EXOJCR-454 foundation-parent updated to 4-SNAPSHOT version
Modified: ws/trunk/pom.xml
===================================================================
--- ws/trunk/pom.xml 2010-02-08 14:05:19 UTC (rev 1719)
+++ ws/trunk/pom.xml 2010-02-08 14:05:59 UTC (rev 1720)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.exoplatform</groupId>
<artifactId>foundation-parent</artifactId>
- <version>3</version>
+ <version>4-SNAPSHOT</version>
</parent>
<groupId>org.exoplatform.ws</groupId>
14 years, 5 months
exo-jcr SVN: r1719 - core/trunk.
by do-not-reply@jboss.org
Author: dkatayev
Date: 2010-02-08 09:05:19 -0500 (Mon, 08 Feb 2010)
New Revision: 1719
Modified:
core/trunk/pom.xml
Log:
EXOJCR-454 foundation-parent updated to 4-SNAPSHOT version
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2010-02-08 14:04:27 UTC (rev 1718)
+++ core/trunk/pom.xml 2010-02-08 14:05:19 UTC (rev 1719)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.exoplatform</groupId>
<artifactId>foundation-parent</artifactId>
- <version>3</version>
+ <version>4-SNAPSHOT</version>
</parent>
<groupId>org.exoplatform.core</groupId>
14 years, 5 months