[jboss-cvs] JBossAS SVN: r110554 - in branches/JBPAPP_5_1_datagrid: build and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Feb 7 09:09:33 EST 2011
Author: galder.zamarreno at jboss.com
Date: 2011-02-07 09:09:32 -0500 (Mon, 07 Feb 2011)
New Revision: 110554
Added:
branches/JBPAPP_5_1_datagrid/cluster/src/installers/infinispan-2lc/
branches/JBPAPP_5_1_datagrid/cluster/src/installers/infinispan-2lc/README
branches/JBPAPP_5_1_datagrid/cluster/src/installers/infinispan-2lc/jboss-classloading.xml
Modified:
branches/JBPAPP_5_1_datagrid/.gitignore
branches/JBPAPP_5_1_datagrid/build/build-distr.xml
branches/JBPAPP_5_1_datagrid/component-matrix/pom.xml
branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/cluster/datagrid/test/RESTClientTestCase.java
branches/JBPAPP_5_1_datagrid/thirdparty/pom.xml
Log:
JBPAPP-5883 - Add extras for Infinispan Hibernate second level cache
* Uses Hibernate 3.5.6 Infinispan 2LC jar and other deps
cache provider is default for JPA apps.
* Extras also shows descriptor to make EAR deployment isolated.
* Added README with patch instructions.
Modified: branches/JBPAPP_5_1_datagrid/.gitignore
===================================================================
--- branches/JBPAPP_5_1_datagrid/.gitignore 2011-02-06 14:42:36 UTC (rev 110553)
+++ branches/JBPAPP_5_1_datagrid/.gitignore 2011-02-07 14:09:32 UTC (rev 110554)
@@ -1,6 +1,8 @@
.svn
svn-commit.tmp
*.iml
+*.ipr
+*.iws
/*/output
/.idea
/bootstrap/target
Modified: branches/JBPAPP_5_1_datagrid/build/build-distr.xml
===================================================================
--- branches/JBPAPP_5_1_datagrid/build/build-distr.xml 2011-02-06 14:42:36 UTC (rev 110553)
+++ branches/JBPAPP_5_1_datagrid/build/build-distr.xml 2011-02-07 14:09:32 UTC (rev 110554)
@@ -1167,10 +1167,24 @@
<copy todir="${_deploy.sar}">
<fileset dir="${org.infinispan.lib}" includes="infinispan-server-rest.war" />
</copy>
-
- <!-- set executable permissions on build.sh -->
- <chmod file="${_datagrid.root}/build.sh" perm="ugo+rx"/>
-
+
+ <!-- set executable permissions on build.sh -->
+ <chmod file="${_datagrid.root}/build.sh" perm="ugo+rx"/>
+
+ <!-- Infinispan 2LC -->
+ <mkdir dir="${install.root}/extras/infinispan-2lc"/>
+ <property name="_infinispan2lc.root" value="${install.root}/extras/infinispan-2lc"/>
+
+ <mkdir dir="${_infinispan2lc.root}/lib"/>
+ <property name="_infinispan2lc.lib" value="${_infinispan2lc.root}/lib"/>
+
+ <copy todir="${_infinispan2lc.lib}">
+ <fileset dir="${org.hibernate.lib}" excludes="*-sources.jar, hibernate-testing.jar" />
+ <fileset dir="${org.infinispan.lib}" includes="infinispan-core.jar" />
+ <fileset dir="${org.jgroups.lib}" excludes="*-sources.jar" />
+ <fileset dir="${org.jboss.marshalling.lib}" excludes="*sources.jar"/>
+ </copy>
+
</target>
<target name="_module-cluster-all" depends="_module-cluster-most">
Added: branches/JBPAPP_5_1_datagrid/cluster/src/installers/infinispan-2lc/README
===================================================================
--- branches/JBPAPP_5_1_datagrid/cluster/src/installers/infinispan-2lc/README (rev 0)
+++ branches/JBPAPP_5_1_datagrid/cluster/src/installers/infinispan-2lc/README 2011-02-07 14:09:32 UTC (rev 110554)
@@ -0,0 +1,111 @@
+
+The following document explains how to make a deployment use Infinispan as Hibernate second level cache provider:
+
+1. Manual EAR method:
+
+1.1 Add the following property to persistence.xml:
+<property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.infinispan.InfinispanRegionFactory"/>
+
+1.2. Copy [EDG_HOME]/extras/infinispan-2lc/jboss-classloading.xml <ear-build-directory>/META-INF
+
+1.3. Copy [EDG_HOME]/extras/datagrid/lib/*.jar to <ear-build-directory>/lib
+
+1.4. Build your EAR
+
+2. Maven EAR method:
+
+2.1. Add the following property to persistence.xml:
+<property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.infinispan.InfinispanRegionFactory"/>
+
+2.2 In the module that generates the EAR archive, copy [EDG_HOME]/extras/infinispan-2lc/jboss-classloading.xml to src/main/application
+
+2.3. Populate the <dependencies> section and maven-ear-plugin configuration of your EAR module's pom.xml like this:
+
+ <dependencies>
+ ...
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-infinispan</artifactId>
+ <version>3.5.6-Final</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-testing</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.infinispan</groupId>
+ <artifactId>infinispan-core</artifactId>
+ <version>4.2.0.FINAL</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.jboss</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.rhq.helpers</groupId>
+ <artifactId>rhq-pluginAnnotations</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.jboss.javaee</groupId>
+ <artifactId>jboss-transaction-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ ...
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-ear-plugin</artifactId>
+ <version>2.3.2</version>
+ <!-- configuring the ear plugin -->
+ <configuration>
+ <modules>
+ <webModule>...</webModule>
+ <!--extra Hibernate Infinispan 2LC libs into lib directory -->
+ <jarModule>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-infinispan</artifactId>
+ <bundleDir>lib</bundleDir>
+ </jarModule>
+ <jarModule>
+ <groupId>org.infinispan</groupId>
+ <artifactId>infinispan-core</artifactId>
+ <bundleDir>lib</bundleDir>
+ </jarModule>
+ <jarModule>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-infinispan</artifactId>
+ <bundleDir>lib</bundleDir>
+ </jarModule>
+ <jarModule>
+ <groupId>org.jgroups</groupId>
+ <artifactId>jgroups</artifactId>
+ <bundleDir>lib</bundleDir>
+ </jarModule>
+ <jarModule>
+ <groupId>org.jboss.marshalling</groupId>
+ <artifactId>river</artifactId>
+ <bundleDir>lib</bundleDir>
+ </jarModule>
+ <jarModule>
+ <groupId>org.jboss.marshalling</groupId>
+ <artifactId>marshalling-api</artifactId>
+ <bundleDir>lib</bundleDir>
+ </jarModule>
+ </modules>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
Added: branches/JBPAPP_5_1_datagrid/cluster/src/installers/infinispan-2lc/jboss-classloading.xml
===================================================================
--- branches/JBPAPP_5_1_datagrid/cluster/src/installers/infinispan-2lc/jboss-classloading.xml (rev 0)
+++ branches/JBPAPP_5_1_datagrid/cluster/src/installers/infinispan-2lc/jboss-classloading.xml 2011-02-07 14:09:32 UTC (rev 110554)
@@ -0,0 +1,3 @@
+<classloading xmlns="urn:jboss:classloading:1.0"
+ domain="simple-scoped"
+ parent-first="false" />
\ No newline at end of file
Modified: branches/JBPAPP_5_1_datagrid/component-matrix/pom.xml
===================================================================
--- branches/JBPAPP_5_1_datagrid/component-matrix/pom.xml 2011-02-06 14:42:36 UTC (rev 110553)
+++ branches/JBPAPP_5_1_datagrid/component-matrix/pom.xml 2011-02-07 14:09:32 UTC (rev 110554)
@@ -52,6 +52,7 @@
<version.org.hibernate.validator>3.1.0.GA</version.org.hibernate.validator>
<version.org.hibernate>3.3.2.GA_CP03</version.org.hibernate>
<version.org.infinispan>4.2.0.FINAL</version.org.infinispan>
+ <version.org.hibernate.infinispan>3.5.6-Final</version.org.hibernate.infinispan>
<version.org.jboss.aop>2.1.6.GA_CP01</version.org.jboss.aop>
<version.org.jboss.aspects.currentinvocation>1.0.1</version.org.jboss.aspects.currentinvocation>
<version.org.jboss.aspects.remoting>1.0.3</version.org.jboss.aspects.remoting>
@@ -1099,7 +1100,7 @@
<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-server-hotrod</artifactId>
- <version>${version.org.infinispan}</version>
+ <version>${version.org.infinispan}</version>
<exclusions>
<exclusion>
<groupId>org.rhq.helpers</groupId>
@@ -1120,8 +1121,32 @@
</exclusion>
</exclusions>
</dependency>
-
+
<dependency>
+ <groupId>org.infinispan</groupId>
+ <artifactId>infinispan-server-hotrod</artifactId>
+ <version>${version.org.infinispan}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.rhq.helpers</groupId>
+ <artifactId>rhq-pluginAnnotations</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-infinispan</artifactId>
+ <version>${version.org.hibernate.infinispan}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-testing</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
<groupId>joesnmp</groupId>
<artifactId>joesnmp</artifactId>
<version>0.3.4</version>
Modified: branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/cluster/datagrid/test/RESTClientTestCase.java
===================================================================
--- branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/cluster/datagrid/test/RESTClientTestCase.java 2011-02-06 14:42:36 UTC (rev 110553)
+++ branches/JBPAPP_5_1_datagrid/testsuite/src/main/org/jboss/test/cluster/datagrid/test/RESTClientTestCase.java 2011-02-07 14:09:32 UTC (rev 110554)
@@ -566,7 +566,6 @@
head(fullPathKey(1, KEY_A), HttpServletResponse.SC_NOT_FOUND);
}
- //https://issues.jboss.org/browse/JBPAPP-5750
public void testByteArrayStorage() throws Exception {
byte[] data = "data".getBytes("UTF-8");
Modified: branches/JBPAPP_5_1_datagrid/thirdparty/pom.xml
===================================================================
--- branches/JBPAPP_5_1_datagrid/thirdparty/pom.xml 2011-02-06 14:42:36 UTC (rev 110553)
+++ branches/JBPAPP_5_1_datagrid/thirdparty/pom.xml 2011-02-07 14:09:32 UTC (rev 110554)
@@ -1053,7 +1053,7 @@
<mapping>
<componentId>org.infinispan.client.hotrod</componentId>
</mapping>
- </dependency>
+ </dependency>
<!-- End mapped dependecies -->
@@ -1960,6 +1960,10 @@
<version>4.2.0.FINAL</version>
</dependency>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-infinispan</artifactId>
+ </dependency>
+ <dependency>
<groupId>joesnmp</groupId>
<artifactId>joesnmp</artifactId>
</dependency>
More information about the jboss-cvs-commits
mailing list