Author: steve.ebersole(a)jboss.com
Date: 2007-05-25 21:35:31 -0400 (Fri, 25 May 2007)
New Revision: 11567
Added:
trunk/Hibernate3/core/src/main/java/org/hibernate/cache/TransactionAwareCache.java
Modified:
trunk/Hibernate3/core/src/main/java/org/hibernate/cache/impl/bridge/BaseTransactionalDataRegionAdapter.java
trunk/Hibernate3/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java
Log:
missed changes in initial migration
Added: trunk/Hibernate3/core/src/main/java/org/hibernate/cache/TransactionAwareCache.java
===================================================================
--- trunk/Hibernate3/core/src/main/java/org/hibernate/cache/TransactionAwareCache.java
(rev 0)
+++
trunk/Hibernate3/core/src/main/java/org/hibernate/cache/TransactionAwareCache.java 2007-05-26
01:35:31 UTC (rev 11567)
@@ -0,0 +1,11 @@
+package org.hibernate.cache;
+
+/**
+ * Marker interface for identifying cache impls which are aware of
+ * JTA transactions
+ *
+ * @author Steve Ebersole
+ */
+public interface TransactionAwareCache {
+}
+
Modified:
trunk/Hibernate3/core/src/main/java/org/hibernate/cache/impl/bridge/BaseTransactionalDataRegionAdapter.java
===================================================================
---
trunk/Hibernate3/core/src/main/java/org/hibernate/cache/impl/bridge/BaseTransactionalDataRegionAdapter.java 2007-05-25
22:35:59 UTC (rev 11566)
+++
trunk/Hibernate3/core/src/main/java/org/hibernate/cache/impl/bridge/BaseTransactionalDataRegionAdapter.java 2007-05-26
01:35:31 UTC (rev 11567)
@@ -10,7 +10,9 @@
*
* @author Steve Ebersole
*/
-public abstract class BaseTransactionalDataRegionAdapter extends BaseRegionAdapter
implements TransactionalDataRegion {
+public abstract class BaseTransactionalDataRegionAdapter
+ extends BaseRegionAdapter
+ implements TransactionalDataRegion {
protected final CacheDataDescription metadata;
@@ -20,44 +22,10 @@
}
public boolean isTransactionAware() {
- return underlyingCache instanceof org.hibernate.cache.TreeCache
- || underlyingCache instanceof org.hibernate.cache.OptimisticTreeCache;
+ return underlyingCache instanceof org.hibernate.cache.TransactionAwareCache;
}
public CacheDataDescription getCacheDataDescription() {
return metadata;
}
-
-// public void lock() throws CacheException {
-// // impl note: unfortunately this was not a capability of the original Cache
contract
-// }
-//
-// public void unlock() throws CacheException {
-// // impl note: unfortunately this was not a capability of the original Cache
contract
-// }
-//
-// public void lock(Object key) throws CacheException {
-// underlyingCache.lock( key );
-// }
-//
-// public void unlock(Object key) throws CacheException {
-// underlyingCache.unlock( key );
-// }
-//
-// public Object get(Object key) throws CacheException {
-// return underlyingCache.get( key );
-// }
-//
-// public Object read(Object key) throws CacheException {
-// return underlyingCache.read( key );
-// }
-//
-// public void writeLoad(Object key, Object value, Object version) throws CacheException
{
-// if ( underlyingCache instanceof OptimisticCache ) {
-// ( ( OptimisticCache ) underlyingCache ).writeLoad( key, value, version );
-// }
-// else {
-// underlyingCache.put( key, value );
-// }
-// }
}
Modified:
trunk/Hibernate3/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java
===================================================================
---
trunk/Hibernate3/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java 2007-05-25
22:35:59 UTC (rev 11566)
+++
trunk/Hibernate3/core/src/main/java/org/hibernate/connection/ConnectionProviderFactory.java 2007-05-26
01:35:31 UTC (rev 11567)
@@ -80,16 +80,6 @@
else if ( properties.getProperty(Environment.DATASOURCE)!=null ) {
connections = new DatasourceConnectionProvider();
}
- else if ( properties.getProperty(Environment.C3P0_MAX_SIZE)!=null ) {
- connections = new C3P0ConnectionProvider();
- }
- else if (
- properties.getProperty(Environment.PROXOOL_XML)!=null ||
- properties.getProperty(Environment.PROXOOL_PROPERTIES)!=null ||
- properties.getProperty(Environment.PROXOOL_EXISTING_POOL)!=null
- ) {
- connections = new ProxoolConnectionProvider();
- }
else if ( properties.getProperty(Environment.URL)!=null ) {
connections = new DriverManagerConnectionProvider();
}