Hibernate SVN: r20639 - core/trunk/documentation/quickstart.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2010-09-15 13:25:58 -0400 (Wed, 15 Sep 2010)
New Revision: 20639
Modified:
core/trunk/documentation/quickstart/pom.xml
Log:
HHH-5441 - Create "Getting Started Guide"
Modified: core/trunk/documentation/quickstart/pom.xml
===================================================================
--- core/trunk/documentation/quickstart/pom.xml 2010-09-15 14:34:49 UTC (rev 20638)
+++ core/trunk/documentation/quickstart/pom.xml 2010-09-15 17:25:58 UTC (rev 20639)
@@ -46,7 +46,52 @@
<build>
<plugins>
+
<plugin>
+ <groupId>org.codehaus.groovy.maven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <phase>compile</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+ <!-- we need to zip up the tutorial code -->
+ <source>
+ <![CDATA[
+ zipName = 'hibernate-tutorials.zip'
+ baseDocBookDir = "${pom.basedir}/target/docbook/publish/en-US"
+ htmlDir = "${baseDocBookDir}/html/files"
+ ant.mkdir( dir: htmlDir )
+
+ zipFile = "${htmlDir}/${zipName}"
+ ant.zip( destfile: zipFile ) {
+ zipfileset( dir: "${pom.basedir}/tutorials" ) {
+ exclude( name: "**/*.ipr" )
+ exclude( name: "**/*.iml" )
+ exclude( name: "**/*.iws" )
+ exclude( name: "**/.idea" )
+ exclude( name: "**/.classpath" )
+ exclude( name: "**/.project" )
+ exclude( name: "**/.settings" )
+ exclude( name: "target/**" )
+ exclude( name: "?*/target/**" )
+ }
+ }
+
+ htmlSingleDir = "${baseDocBookDir}/html_single/files"
+ ant.mkdir( dir: htmlSingleDir )
+ ant.copy( toDir: htmlSingleDir, file: zipFile )
+ ]]>
+ </source>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+
+ <plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-jdocbook-plugin</artifactId>
14 years, 3 months
Hibernate SVN: r20638 - core/branches/Branch_3_5.
by hibernate-commits@lists.jboss.org
Author: steve.ebersole(a)jboss.com
Date: 2010-09-15 10:34:49 -0400 (Wed, 15 Sep 2010)
New Revision: 20638
Added:
core/branches/Branch_3_5/tagRelease.sh
Log:
HHH-5524 - tagRelease.sh
Added: core/branches/Branch_3_5/tagRelease.sh
===================================================================
--- core/branches/Branch_3_5/tagRelease.sh (rev 0)
+++ core/branches/Branch_3_5/tagRelease.sh 2010-09-15 14:34:49 UTC (rev 20638)
@@ -0,0 +1,107 @@
+#! /bin/sh
+
+usage="Usage: tagRelease [-u] [-e exportDirectory] [-r releaseVersion] [-d devVersion]"
+projectDir=`pwd`
+
+releaseVersion=
+devVersion=
+
+performUpdate=''
+exportDirectory=''
+
+################################################################################
+# Update all project poms and commit the changes.
+#
+# $1: project directory (base directory of recursve find)
+# $2: new value for the pom version
+# $3: new scm url
+updatePomVersionsAndCommit() {
+ for i in `find $1 -name "pom.xml"`; do
+ xmlstarlet ed -P -N x="http://maven.apache.org/POM/4.0.0" \
+ -u "/x:project/x:parent/x:version" -v $2 \
+ -u "/x:project/x:version" -v $2 \
+ -u "/x:project/x:scm/x:connection" -v scm:svn:$3 \
+ -u "/x:project/x:scm/x:developerConnection" -v scm:svn:$3 \
+ -u "/x:project/x:scm/x:url" -v $3 \
+ $i > tmp
+ mv tmp $i
+ done
+
+ svn commit $projectDirectory -m "Updating pom versions to $1 for release tagging"
+}
+
+################################################################################
+# Start script processing
+################################################################################
+
+while getopts ":e:r:d:u" opt; do
+ case $opt in
+ r)
+ releaseVersion=$OPTARG;;
+ d)
+ devVersion=$OPTARG;;
+ u)
+ performUpdate="true";;
+ e)
+ exportDirectory=$OPTARG;;
+ h)
+ echo $usage;;
+ \?)
+ echo $usage
+ exit 1;;
+ *)
+ echo $usage
+ exit 1;;
+ esac
+done
+
+if [ -z $releaseVersion ]; then
+ read -p "Enter the release version: " releaseVersion
+fi
+if [ -z $devVersion ]; then
+ read -p "Enter the development version: " devVersion
+fi
+
+projectName=`xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -v "/x:project/x:artifactId" pom.xml`
+if [ -Z "$projectName" ]; then
+ echo "Could not determine propject name (misasing/incomplete pom?)."
+ exit;
+fi
+projectUrl=`svn info $projectDir | grep URL | awk '{print $2}'`
+tagUrl=`echo $projectUrl | sed 's|\(.*\)/.*$|\1/tags/|'`$projectName-$releaseVersion
+
+
+################################################################################
+# Confirm data
+
+echo "About to tag release with following information:"
+echo " tag version : $releaseVersion"
+echo " dev version : $devVersion"
+echo " dev url : $projectUrl"
+echo " tag url : $tagUrl"
+while true; do
+ read -p "Continue? " yn
+ case $yn in
+ [Yy]* ) break;;
+ [Nn]* ) exit;;
+ * ) echo "Please answer yes or no.";;
+ esac
+done
+
+################################################################################
+# Go, go , go
+
+if [ -n "$performUpdate" ]; then
+ echo "Performing requested svn update..."
+ svn update $projectDir
+fi
+
+updatePomVersionsAndCommit $projectDir $releaseVersion $tagUrl
+
+svn copy $projectUrl/ $tagUrl -m "Tagging $releaseVersion release"
+
+updatePomVersionsAndCommit $projectDir $devVersion $projectUrl
+
+if [ $exportDirectory ]; then
+ svn export $tagUrl $exportDirectory
+fi
Property changes on: core/branches/Branch_3_5/tagRelease.sh
___________________________________________________________________
Name: svn:executable
+ *
14 years, 3 months
Hibernate SVN: r20637 - core/trunk/core/src/main/java/org/hibernate/dialect.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-09-14 22:47:38 -0400 (Tue, 14 Sep 2010)
New Revision: 20637
Modified:
core/trunk/core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java
Log:
HHH-5558 rollback
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java 2010-09-14 15:43:58 UTC (rev 20636)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java 2010-09-15 02:47:38 UTC (rev 20637)
@@ -81,7 +81,4 @@
public String getCrossJoinSeparator() {
return ", ";
}
- public boolean dropTemporaryTableAfterUse() {
- return false;
- }
}
14 years, 3 months
Hibernate SVN: r20636 - core/trunk/cache-infinispan.
by hibernate-commits@lists.jboss.org
Author: galder.zamarreno(a)jboss.com
Date: 2010-09-14 11:43:58 -0400 (Tue, 14 Sep 2010)
New Revision: 20636
Modified:
core/trunk/cache-infinispan/pom.xml
Log:
[HHH-5564] (Upgrade to Infinispan 4.2.x) Upgraded to 4.2.0.ALPHA1.
Modified: core/trunk/cache-infinispan/pom.xml
===================================================================
--- core/trunk/cache-infinispan/pom.xml 2010-09-14 15:43:34 UTC (rev 20635)
+++ core/trunk/cache-infinispan/pom.xml 2010-09-14 15:43:58 UTC (rev 20636)
@@ -18,7 +18,7 @@
<description>Integration of Hibernate with Infinispan</description>
<properties>
- <version.infinispan>4.1.0.CR3</version.infinispan>
+ <version.infinispan>4.2.0.ALPHA1</version.infinispan>
<version.hsqldb>1.8.0.2</version.hsqldb>
<version.cglib>2.2</version.cglib>
<version.javassist>3.4.GA</version.javassist>
14 years, 3 months
Hibernate SVN: r20635 - in core/branches/Branch_3_5/cache-infinispan: src/main/java/org/hibernate/cache/infinispan and 3 other directories.
by hibernate-commits@lists.jboss.org
Author: galder.zamarreno(a)jboss.com
Date: 2010-09-14 11:43:34 -0400 (Tue, 14 Sep 2010)
New Revision: 20635
Modified:
core/branches/Branch_3_5/cache-infinispan/pom.xml
core/branches/Branch_3_5/cache-infinispan/src/main/java/org/hibernate/cache/infinispan/InfinispanRegionFactory.java
core/branches/Branch_3_5/cache-infinispan/src/main/java/org/hibernate/cache/infinispan/JndiInfinispanRegionFactory.java
core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/InfinispanRegionFactoryTestCase.java
core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/classloader/IsolatedClassLoaderTest.java
core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/ClusterAwareRegionFactory.java
core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/EntityCollectionInvalidationTestCase.java
core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/SessionRefreshTestCase.java
Log:
[HHH-5564] (Upgrade to Infinispan 4.2.x) Upgraded to 4.2.0.ALPHA1.
Modified: core/branches/Branch_3_5/cache-infinispan/pom.xml
===================================================================
--- core/branches/Branch_3_5/cache-infinispan/pom.xml 2010-09-13 09:44:07 UTC (rev 20634)
+++ core/branches/Branch_3_5/cache-infinispan/pom.xml 2010-09-14 15:43:34 UTC (rev 20635)
@@ -18,7 +18,7 @@
<description>Integration of Hibernate with Infinispan</description>
<properties>
- <version.infinispan>4.0.0.FINAL</version.infinispan>
+ <version.infinispan>4.2.0.ALPHA1</version.infinispan>
<version.hsqldb>1.8.0.2</version.hsqldb>
<version.cglib>2.2</version.cglib>
<version.javassist>3.4.GA</version.javassist>
Modified: core/branches/Branch_3_5/cache-infinispan/src/main/java/org/hibernate/cache/infinispan/InfinispanRegionFactory.java
===================================================================
--- core/branches/Branch_3_5/cache-infinispan/src/main/java/org/hibernate/cache/infinispan/InfinispanRegionFactory.java 2010-09-13 09:44:07 UTC (rev 20634)
+++ core/branches/Branch_3_5/cache-infinispan/src/main/java/org/hibernate/cache/infinispan/InfinispanRegionFactory.java 2010-09-14 15:43:34 UTC (rev 20635)
@@ -31,8 +31,8 @@
import org.hibernate.util.PropertiesHelper;
import org.infinispan.Cache;
import org.infinispan.config.Configuration;
-import org.infinispan.manager.CacheManager;
import org.infinispan.manager.DefaultCacheManager;
+import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
@@ -132,7 +132,7 @@
*/
public static final String DEF_QUERY_RESOURCE = "local-query";
- private CacheManager manager;
+ private EmbeddedCacheManager manager;
private final Map<String, TypeOverrides> typeOverrides = new HashMap<String, TypeOverrides>();
@@ -227,11 +227,11 @@
return System.currentTimeMillis() / 100;
}
- public void setCacheManager(CacheManager manager) {
+ public void setCacheManager(EmbeddedCacheManager manager) {
this.manager = manager;
}
- public CacheManager getCacheManager() {
+ public EmbeddedCacheManager getCacheManager() {
return manager;
}
@@ -283,10 +283,10 @@
return Collections.unmodifiableSet(definedConfigurations);
}
- protected CacheManager createCacheManager(Properties properties) throws CacheException {
+ protected EmbeddedCacheManager createCacheManager(Properties properties) throws CacheException {
try {
String configLoc = PropertiesHelper.getString(INFINISPAN_CONFIG_RESOURCE_PROP, properties, DEF_INFINISPAN_CONFIG_RESOURCE);
- CacheManager manager = new DefaultCacheManager(configLoc, false);
+ EmbeddedCacheManager manager = new DefaultCacheManager(configLoc, false);
String globalStats = PropertiesHelper.extractPropertyValue(INFINISPAN_GLOBAL_STATISTICS_PROP, properties);
if (globalStats != null) {
manager.getGlobalConfiguration().setExposeGlobalJmxStatistics(Boolean.parseBoolean(globalStats));
Modified: core/branches/Branch_3_5/cache-infinispan/src/main/java/org/hibernate/cache/infinispan/JndiInfinispanRegionFactory.java
===================================================================
--- core/branches/Branch_3_5/cache-infinispan/src/main/java/org/hibernate/cache/infinispan/JndiInfinispanRegionFactory.java 2010-09-13 09:44:07 UTC (rev 20634)
+++ core/branches/Branch_3_5/cache-infinispan/src/main/java/org/hibernate/cache/infinispan/JndiInfinispanRegionFactory.java 2010-09-14 15:43:34 UTC (rev 20635)
@@ -31,7 +31,7 @@
import org.hibernate.cache.RegionFactory;
import org.hibernate.util.NamingHelper;
import org.hibernate.util.PropertiesHelper;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
@@ -47,7 +47,7 @@
private static final Log log = LogFactory.getLog(JndiInfinispanRegionFactory.class);
/**
- * Specifies the JNDI name under which the {@link CacheManager} to use is bound.
+ * Specifies the JNDI name under which the {@link EmbeddedCacheManager} to use is bound.
* There is no default value -- the user must specify the property.
*/
public static final String CACHE_MANAGER_RESOURCE_PROP = "hibernate.cache.infinispan.cachemanager";
@@ -61,18 +61,18 @@
}
@Override
- protected CacheManager createCacheManager(Properties properties) throws CacheException {
+ protected EmbeddedCacheManager createCacheManager(Properties properties) throws CacheException {
String name = PropertiesHelper.getString(CACHE_MANAGER_RESOURCE_PROP, properties, null);
if (name == null)
throw new CacheException("Configuration property " + CACHE_MANAGER_RESOURCE_PROP + " not set");
return locateCacheManager(name, NamingHelper.getJndiProperties(properties));
}
- private CacheManager locateCacheManager(String jndiNamespace, Properties jndiProperties) {
+ private EmbeddedCacheManager locateCacheManager(String jndiNamespace, Properties jndiProperties) {
Context ctx = null;
try {
ctx = new InitialContext(jndiProperties);
- return (CacheManager) ctx.lookup(jndiNamespace);
+ return (EmbeddedCacheManager) ctx.lookup(jndiNamespace);
} catch (NamingException ne) {
String msg = "Unable to retrieve CacheManager from JNDI [" + jndiNamespace + "]";
log.info(msg, ne);
Modified: core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/InfinispanRegionFactoryTestCase.java
===================================================================
--- core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/InfinispanRegionFactoryTestCase.java 2010-09-13 09:44:07 UTC (rev 20634)
+++ core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/InfinispanRegionFactoryTestCase.java 2010-09-14 15:43:34 UTC (rev 20635)
@@ -33,7 +33,7 @@
import org.infinispan.config.Configuration;
import org.infinispan.config.Configuration.CacheMode;
import org.infinispan.eviction.EvictionStrategy;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.manager.DefaultCacheManager;
import junit.framework.TestCase;
@@ -118,7 +118,7 @@
p.setProperty("hibernate.cache.infinispan.collection.eviction.max_entries", "25000");
InfinispanRegionFactory factory = new InfinispanRegionFactory();
factory.start(null, p);
- CacheManager manager = factory.getCacheManager();
+ EmbeddedCacheManager manager = factory.getCacheManager();
manager.getGlobalConfiguration().setTransportClass(null);
try {
assertFalse(manager.getGlobalConfiguration().isExposeGlobalJmxStatistics());
@@ -213,7 +213,7 @@
p.setProperty("hibernate.cache.infinispan.collection.eviction.max_entries", "35000");
InfinispanRegionFactory factory = new InfinispanRegionFactory();
factory.start(null, p);
- CacheManager manager = factory.getCacheManager();
+ EmbeddedCacheManager manager = factory.getCacheManager();
try {
EntityRegionImpl region = (EntityRegionImpl) factory.buildEntityRegion("com.acme.Address", p, null);
assertNull(factory.getTypeOverrides().get("com.acme.Address"));
@@ -250,7 +250,7 @@
p.setProperty("hibernate.cache.infinispan.entity.eviction.max_entries", "10000");
InfinispanRegionFactory factory = new InfinispanRegionFactory();
factory.start(null, p);
- CacheManager manager = factory.getCacheManager();
+ EmbeddedCacheManager manager = factory.getCacheManager();
manager.getGlobalConfiguration().setTransportClass(null);
try {
assertNotNull(factory.getTypeOverrides().get(person));
@@ -275,7 +275,7 @@
final DefaultCacheManager manager = new DefaultCacheManager();
InfinispanRegionFactory factory = new InfinispanRegionFactory() {
@Override
- protected CacheManager createCacheManager(Properties properties) throws CacheException {
+ protected EmbeddedCacheManager createCacheManager(Properties properties) throws CacheException {
return manager;
}
};
@@ -294,7 +294,7 @@
Properties p = new Properties();
InfinispanRegionFactory factory = new InfinispanRegionFactory();
factory.start(null, p);
- CacheManager manager = factory.getCacheManager();
+ EmbeddedCacheManager manager = factory.getCacheManager();
try {
assertTrue(factory.getDefinedConfigurations().contains("timestamps"));
assertTrue(factory.getTypeOverrides().get("timestamps").getCacheName().equals("timestamps"));
@@ -319,7 +319,7 @@
p.setProperty("hibernate.cache.infinispan.timestamps.cfg", "unrecommended-timestamps");
InfinispanRegionFactory factory = new InfinispanRegionFactory();
factory.start(null, p);
- CacheManager manager = factory.getCacheManager();
+ EmbeddedCacheManager manager = factory.getCacheManager();
try {
assertFalse(factory.getDefinedConfigurations().contains("timestamp"));
assertTrue(factory.getDefinedConfigurations().contains("unrecommended-timestamps"));
@@ -346,7 +346,7 @@
InfinispanRegionFactory factory = new InfinispanRegionFactory();
p.setProperty("hibernate.cache.infinispan.timestamps.cfg", "mytimestamps-cache");
factory.start(null, p);
- CacheManager manager = factory.getCacheManager();
+ EmbeddedCacheManager manager = factory.getCacheManager();
manager.getGlobalConfiguration().setTransportClass(null);
try {
factory.buildTimestampsRegion(timestamps, p);
@@ -366,7 +366,7 @@
p.setProperty("hibernate.cache.infinispan.timestamps.eviction.max_entries", "10000");
try {
factory.start(null, p);
- CacheManager manager = factory.getCacheManager();
+ EmbeddedCacheManager manager = factory.getCacheManager();
manager.getGlobalConfiguration().setTransportClass(null);
factory.buildTimestampsRegion(timestamps, p);
assertTrue(factory.getDefinedConfigurations().contains("mytimestamps-cache"));
@@ -386,7 +386,7 @@
p.setProperty("hibernate.cache.infinispan.timestamps.eviction.wake_up_interval", "3000");
p.setProperty("hibernate.cache.infinispan.timestamps.eviction.max_entries", "10000");
factory.start(null, p);
- CacheManager manager = factory.getCacheManager();
+ EmbeddedCacheManager manager = factory.getCacheManager();
manager.getGlobalConfiguration().setTransportClass(null);
try {
factory.buildTimestampsRegion(timestamps, p);
@@ -401,7 +401,7 @@
Properties p = new Properties();
InfinispanRegionFactory factory = new InfinispanRegionFactory();
factory.start(null, p);
- CacheManager manager = factory.getCacheManager();
+ EmbeddedCacheManager manager = factory.getCacheManager();
manager.getGlobalConfiguration().setTransportClass(null);
try {
assertTrue(factory.getDefinedConfigurations().contains("local-query"));
@@ -424,7 +424,7 @@
p.setProperty("hibernate.cache.infinispan.myquery.eviction.wake_up_interval", "2222");
p.setProperty("hibernate.cache.infinispan.myquery.eviction.max_entries", "11111");
factory.start(null, p);
- CacheManager manager = factory.getCacheManager();
+ EmbeddedCacheManager manager = factory.getCacheManager();
manager.getGlobalConfiguration().setTransportClass(null);
try {
assertTrue(factory.getDefinedConfigurations().contains("local-query"));
@@ -452,7 +452,7 @@
p.setProperty("hibernate.cache.infinispan.entity.eviction.max_entries", "10000");
InfinispanRegionFactory factory = new InfinispanRegionFactory();
factory.start(null, p);
- CacheManager manager = factory.getCacheManager();
+ EmbeddedCacheManager manager = factory.getCacheManager();
try {
assertTrue(manager.getGlobalConfiguration().isExposeGlobalJmxStatistics());
EntityRegionImpl region = (EntityRegionImpl) factory.buildEntityRegion("com.acme.Address", p, null);
@@ -500,7 +500,7 @@
p.setProperty("hibernate.cache.infinispan.entity.eviction.max_entries", "10000");
InfinispanRegionFactory factory = new InfinispanRegionFactory();
factory.start(null, p);
- CacheManager manager = factory.getCacheManager();
+ EmbeddedCacheManager manager = factory.getCacheManager();
try {
assertFalse(manager.getGlobalConfiguration().isExposeGlobalJmxStatistics());
EntityRegionImpl region = (EntityRegionImpl) factory.buildEntityRegion("com.acme.Address", p, null);
Modified: core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/classloader/IsolatedClassLoaderTest.java
===================================================================
--- core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/classloader/IsolatedClassLoaderTest.java 2010-09-13 09:44:07 UTC (rev 20634)
+++ core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/classloader/IsolatedClassLoaderTest.java 2010-09-14 15:43:34 UTC (rev 20635)
@@ -34,7 +34,8 @@
import org.hibernate.test.cache.infinispan.functional.cluster.ClusterAwareRegionFactory;
import org.hibernate.test.cache.infinispan.functional.cluster.DualNodeJtaTransactionManagerImpl;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
+import org.infinispan.manager.EmbeddedCacheManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -120,11 +121,11 @@
public void testIsolatedSetup() throws Exception {
// Bind a listener to the "local" cache
// Our region factory makes its CacheManager available to us
- CacheManager localManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.LOCAL);
+ CacheContainer localManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.LOCAL);
Cache localReplicatedCache = localManager.getCache("replicated-entity");
// Bind a listener to the "remote" cache
- CacheManager remoteManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.REMOTE);
+ CacheContainer remoteManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.REMOTE);
Cache remoteReplicatedCache = remoteManager.getCache("replicated-entity");
ClassLoader cl = Thread.currentThread().getContextClassLoader();
@@ -164,9 +165,9 @@
protected void queryTest(boolean useNamedRegion) throws Exception {
// Bind a listener to the "local" cache
// Our region factory makes its CacheManager available to us
- CacheManager localManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.LOCAL);
+ EmbeddedCacheManager localManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.LOCAL);
// Bind a listener to the "remote" cache
- CacheManager remoteManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.REMOTE);
+ EmbeddedCacheManager remoteManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.REMOTE);
String cacheName;
if (useNamedRegion) {
cacheName = "AccountRegion"; // As defined by ClassLoaderTestDAO via calls to query.setCacheRegion
Modified: core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/ClusterAwareRegionFactory.java
===================================================================
--- core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/ClusterAwareRegionFactory.java 2010-09-13 09:44:07 UTC (rev 20634)
+++ core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/ClusterAwareRegionFactory.java 2010-09-14 15:43:34 UTC (rev 20635)
@@ -34,7 +34,7 @@
import org.hibernate.cache.access.AccessType;
import org.hibernate.cache.infinispan.InfinispanRegionFactory;
import org.hibernate.cfg.Settings;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.EmbeddedCacheManager;
import org.infinispan.util.logging.Log;
import org.infinispan.util.logging.LogFactory;
@@ -47,7 +47,7 @@
public class ClusterAwareRegionFactory implements RegionFactory {
private static final Log log = LogFactory.getLog(ClusterAwareRegionFactory.class);
- private static final Hashtable<String, CacheManager> cacheManagers = new Hashtable<String, CacheManager>();
+ private static final Hashtable<String, EmbeddedCacheManager> cacheManagers = new Hashtable<String, EmbeddedCacheManager>();
private final InfinispanRegionFactory delegate = new InfinispanRegionFactory();
private String cacheManagerName;
@@ -56,16 +56,16 @@
public ClusterAwareRegionFactory(Properties props) {
}
- public static CacheManager getCacheManager(String name) {
+ public static EmbeddedCacheManager getCacheManager(String name) {
return cacheManagers.get(name);
}
- public static void addCacheManager(String name, CacheManager manager) {
+ public static void addCacheManager(String name, EmbeddedCacheManager manager) {
cacheManagers.put(name, manager);
}
public static void clearCacheManagers() {
- for (CacheManager manager : cacheManagers.values()) {
+ for (EmbeddedCacheManager manager : cacheManagers.values()) {
try {
manager.stop();
} catch (Exception e) {
@@ -78,7 +78,7 @@
public void start(Settings settings, Properties properties) throws CacheException {
cacheManagerName = properties.getProperty(DualNodeTestCase.NODE_ID_PROP);
- CacheManager existing = getCacheManager(cacheManagerName);
+ EmbeddedCacheManager existing = getCacheManager(cacheManagerName);
locallyAdded = (existing == null);
if (locallyAdded) {
Modified: core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/EntityCollectionInvalidationTestCase.java
===================================================================
--- core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/EntityCollectionInvalidationTestCase.java 2010-09-13 09:44:07 UTC (rev 20634)
+++ core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/EntityCollectionInvalidationTestCase.java 2010-09-14 15:43:34 UTC (rev 20635)
@@ -34,7 +34,7 @@
import org.hibernate.test.cache.infinispan.functional.Contact;
import org.hibernate.test.cache.infinispan.functional.Customer;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.notifications.Listener;
import org.infinispan.notifications.cachelistener.annotation.CacheEntryVisited;
import org.infinispan.notifications.cachelistener.event.CacheEntryVisitedEvent;
@@ -67,7 +67,7 @@
// Bind a listener to the "local" cache
// Our region factory makes its CacheManager available to us
- CacheManager localManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.LOCAL);
+ CacheContainer localManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.LOCAL);
// Cache localCache = localManager.getCache("entity");
Cache localCustomerCache = localManager.getCache(Customer.class.getName());
Cache localContactCache = localManager.getCache(Contact.class.getName());
@@ -79,7 +79,7 @@
TransactionManager localTM = DualNodeJtaTransactionManagerImpl.getInstance(DualNodeTestCase.LOCAL);
// Bind a listener to the "remote" cache
- CacheManager remoteManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.REMOTE);
+ CacheContainer remoteManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.REMOTE);
Cache remoteCustomerCache = remoteManager.getCache(Customer.class.getName());
Cache remoteContactCache = remoteManager.getCache(Contact.class.getName());
Cache remoteCollectionCache = remoteManager.getCache(Customer.class.getName() + ".contacts");
Modified: core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/SessionRefreshTestCase.java
===================================================================
--- core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/SessionRefreshTestCase.java 2010-09-13 09:44:07 UTC (rev 20634)
+++ core/branches/Branch_3_5/cache-infinispan/src/test/java/org/hibernate/test/cache/infinispan/functional/cluster/SessionRefreshTestCase.java 2010-09-14 15:43:34 UTC (rev 20635)
@@ -30,7 +30,7 @@
import org.hibernate.test.cache.infinispan.functional.classloader.Account;
import org.hibernate.test.cache.infinispan.functional.classloader.ClassLoaderTestDAO;
import org.infinispan.Cache;
-import org.infinispan.manager.CacheManager;
+import org.infinispan.manager.CacheContainer;
import org.infinispan.test.TestingUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -90,12 +90,14 @@
public void testRefreshAfterExternalChange() throws Exception {
// First session factory uses a cache
- CacheManager localManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.LOCAL);
+ CacheContainer localManager = ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.LOCAL);
localCache = localManager.getCache(Account.class.getName());
TransactionManager localTM = DualNodeJtaTransactionManagerImpl.getInstance(DualNodeTestCase.LOCAL);
SessionFactory localFactory = getEnvironment().getSessionFactory();
// Second session factory doesn't; just needs a transaction manager
+ // However, start at least the cache to avoid issues with replication and cache not being there
+ ClusterAwareRegionFactory.getCacheManager(DualNodeTestCase.REMOTE).getCache(Account.class.getName());
TransactionManager remoteTM = DualNodeJtaTransactionManagerImpl.getInstance(DualNodeTestCase.REMOTE);
SessionFactory remoteFactory = getSecondNodeEnvironment().getSessionFactory();
14 years, 3 months
Hibernate SVN: r20634 - core/trunk/core/src/main/java/org/hibernate/dialect.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-09-13 05:44:07 -0400 (Mon, 13 Sep 2010)
New Revision: 20634
Modified:
core/trunk/core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java
Log:
HHH-5558 Change made so that temp tables need not to be deleted, they get deleted automatically in Sybase.
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java 2010-09-13 05:46:30 UTC (rev 20633)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java 2010-09-13 09:44:07 UTC (rev 20634)
@@ -30,7 +30,7 @@
import org.hibernate.type.StandardBasicTypes;
/**
- * An SQL dialect targetting Sybase Adaptive Server Enterprise (ASE) 15 and higher.
+ * An SQL dialect targeting Sybase Adaptive Server Enterprise (ASE) 15 and higher.
* <p/>
* TODO : verify if this also works with 12/12.5
*
@@ -81,4 +81,7 @@
public String getCrossJoinSeparator() {
return ", ";
}
+ public boolean dropTemporaryTableAfterUse() {
+ return false;
+ }
}
14 years, 3 months
Hibernate SVN: r20633 - core/trunk.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-09-13 01:46:30 -0400 (Mon, 13 Sep 2010)
New Revision: 20633
Modified:
core/trunk/tagRelease.sh
Log:
HHH-5524 changed script so that the tagUrl is right for branches as well
Modified: core/trunk/tagRelease.sh
===================================================================
--- core/trunk/tagRelease.sh 2010-09-13 03:13:08 UTC (rev 20632)
+++ core/trunk/tagRelease.sh 2010-09-13 05:46:30 UTC (rev 20633)
@@ -68,7 +68,7 @@
exit;
fi
projectUrl=`svn info $projectDir | grep URL | awk '{print $2}'`
-tagUrl=`echo $projectUrl | sed 's|\(.*\)/trunk.*|\1/tags/|'`$projectName-$releaseVersion
+tagUrl=`echo $projectUrl | sed 's|\(.*\)/.*$|\1/tags/|'`$projectName-$releaseVersion
################################################################################
14 years, 3 months
Hibernate SVN: r20632 - core/trunk/core/src/main/java/org/hibernate/dialect.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2010-09-12 23:13:08 -0400 (Sun, 12 Sep 2010)
New Revision: 20632
Modified:
core/trunk/core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java
Log:
HHH-5557 Sybase supports alias length upto 30 characters
Modified: core/trunk/core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java 2010-09-12 22:47:21 UTC (rev 20631)
+++ core/trunk/core/src/main/java/org/hibernate/dialect/SybaseASE15Dialect.java 2010-09-13 03:13:08 UTC (rev 20632)
@@ -57,7 +57,9 @@
public boolean supportsCascadeDelete() {
return false;
}
-
+ public int getMaxAliasLength() {
+ return 30;
+ }
/**
* By default, Sybase string comparisons are case-insensitive.
* <p/>
14 years, 3 months
Hibernate SVN: r20631 - core/trunk.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2010-09-12 18:47:21 -0400 (Sun, 12 Sep 2010)
New Revision: 20631
Added:
core/trunk/tagRelease.sh
Log:
HHH-5524 added tagRelease script and added support for scm urls
Added: core/trunk/tagRelease.sh
===================================================================
--- core/trunk/tagRelease.sh (rev 0)
+++ core/trunk/tagRelease.sh 2010-09-12 22:47:21 UTC (rev 20631)
@@ -0,0 +1,107 @@
+#! /bin/sh
+
+usage="Usage: tagRelease [-u] [-e exportDirectory] [-r releaseVersion] [-d devVersion]"
+projectDir=`pwd`
+
+releaseVersion=
+devVersion=
+
+performUpdate=''
+exportDirectory=''
+
+################################################################################
+# Update all project poms and commit the changes.
+#
+# $1: project directory (base directory of recursve find)
+# $2: new value for the pom version
+# $3: new scm url
+updatePomVersionsAndCommit() {
+ for i in `find $1 -name "pom.xml"`; do
+ xmlstarlet ed -P -N x="http://maven.apache.org/POM/4.0.0" \
+ -u "/x:project/x:parent/x:version" -v $2 \
+ -u "/x:project/x:version" -v $2 \
+ -u "/x:project/x:scm/x:connection" -v scm:svn:$3 \
+ -u "/x:project/x:scm/x:developerConnection" -v scm:svn:$3 \
+ -u "/x:project/x:scm/x:url" -v $3 \
+ $i > tmp
+ mv tmp $i
+ done
+
+ svn commit $projectDirectory -m "Updating pom versions to $1 for release tagging"
+}
+
+################################################################################
+# Start script processing
+################################################################################
+
+while getopts ":e:r:d:u" opt; do
+ case $opt in
+ r)
+ releaseVersion=$OPTARG;;
+ d)
+ devVersion=$OPTARG;;
+ u)
+ performUpdate="true";;
+ e)
+ exportDirectory=$OPTARG;;
+ h)
+ echo $usage;;
+ \?)
+ echo $usage
+ exit 1;;
+ *)
+ echo $usage
+ exit 1;;
+ esac
+done
+
+if [ -z $releaseVersion ]; then
+ read -p "Enter the release version: " releaseVersion
+fi
+if [ -z $devVersion ]; then
+ read -p "Enter the development version: " devVersion
+fi
+
+projectName=`xmlstarlet sel -N x=http://maven.apache.org/POM/4.0.0 -t -v "/x:project/x:artifactId" pom.xml`
+if [ -Z "$projectName" ]; then
+ echo "Could not determine propject name (misasing/incomplete pom?)."
+ exit;
+fi
+projectUrl=`svn info $projectDir | grep URL | awk '{print $2}'`
+tagUrl=`echo $projectUrl | sed 's|\(.*\)/trunk.*|\1/tags/|'`$projectName-$releaseVersion
+
+
+################################################################################
+# Confirm data
+
+echo "About to tag release with following information:"
+echo " tag version : $releaseVersion"
+echo " dev version : $devVersion"
+echo " dev url : $projectUrl"
+echo " tag url : $tagUrl"
+while true; do
+ read -p "Continue? " yn
+ case $yn in
+ [Yy]* ) break;;
+ [Nn]* ) exit;;
+ * ) echo "Please answer yes or no.";;
+ esac
+done
+
+################################################################################
+# Go, go , go
+
+if [ -n "$performUpdate" ]; then
+ echo "Performing requested svn update..."
+ svn update $projectDir
+fi
+
+updatePomVersionsAndCommit $projectDir $releaseVersion $tagUrl
+
+svn copy $projectUrl/ $tagUrl -m "Tagging $releaseVersion release"
+
+updatePomVersionsAndCommit $projectDir $devVersion $projectUrl
+
+if [ $exportDirectory ]; then
+ svn export $tagUrl $exportDirectory
+fi
Property changes on: core/trunk/tagRelease.sh
___________________________________________________________________
Name: svn:executable
+ *
14 years, 3 months