JBoss Cache SVN: r4313 - in core: support-branches and 1 other directory.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-08-23 13:37:21 -0400 (Thu, 23 Aug 2007)
New Revision: 4313
Added:
core/support-branches/1.2.4-SP1_JBCACHE-417/
Removed:
core/branches/JBossCache_1_2_4_SP1_FINAL_JBCACHE-417/
Log:
Moved support branch
Copied: core/support-branches/1.2.4-SP1_JBCACHE-417 (from rev 4312, core/branches/JBossCache_1_2_4_SP1_FINAL_JBCACHE-417)
17 years, 4 months
JBoss Cache SVN: r4312 - core.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-08-23 13:36:08 -0400 (Thu, 23 Aug 2007)
New Revision: 4312
Added:
core/support-branches/
Log:
Created support branches dir
17 years, 4 months
JBoss Cache SVN: r4311 - core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/interceptors.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-08-23 12:48:10 -0400 (Thu, 23 Aug 2007)
New Revision: 4311
Modified:
core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/interceptors/TxInterceptor.java
Log:
Fixed JBCACHE-1167
Modified: core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/interceptors/TxInterceptor.java
===================================================================
--- core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/interceptors/TxInterceptor.java 2007-08-23 16:46:05 UTC (rev 4310)
+++ core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/interceptors/TxInterceptor.java 2007-08-23 16:48:10 UTC (rev 4311)
@@ -1076,7 +1076,8 @@
runCommitPhase(gtx, tx, modifications, onePhaseCommit);
log.debug("Finished commit phase");
break;
-
+ case Status.STATUS_UNKNOWN:
+ log.warn("Received JTA STATUS_UNKNOWN in afterCompletion()! XA resources may not be in sync. The app should manually clean up resources at this point.");
case Status.STATUS_MARKED_ROLLBACK:
case Status.STATUS_ROLLEDBACK:
log.debug("Running rollback phase");
17 years, 4 months
JBoss Cache SVN: r4310 - in core/branches/Branch_JBossCache_1_4_0: src/org/jboss/cache/transaction and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-08-23 12:46:05 -0400 (Thu, 23 Aug 2007)
New Revision: 4310
Added:
core/branches/Branch_JBossCache_1_4_0/tests/functional/org/jboss/cache/transaction/StatusUnknownTest.java
Modified:
core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/interceptors/OrderedSynchronizationHandler.java
core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/transaction/DummyTransaction.java
Log:
Unit test for JBCACHE-1167
Modified: core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/interceptors/OrderedSynchronizationHandler.java
===================================================================
--- core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/interceptors/OrderedSynchronizationHandler.java 2007-08-22 14:35:57 UTC (rev 4309)
+++ core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/interceptors/OrderedSynchronizationHandler.java 2007-08-23 16:46:05 UTC (rev 4310)
@@ -77,6 +77,7 @@
}
public void afterCompletion(int status) {
+ RuntimeException exceptionInAfterCompletion = null;
for(Iterator it=handlers.iterator(); it.hasNext();) {
Synchronization sync=(Synchronization)it.next();
try {
@@ -84,11 +85,15 @@
}
catch(Throwable t) {
log.error("failed calling afterCompletion() on " + sync, t);
+ exceptionInAfterCompletion = (RuntimeException) t;
}
}
// finally unregister us from the hashmap
instances.remove(tx);
+
+ // throw the exception so the TM can deal with it.
+ if (exceptionInAfterCompletion != null) throw exceptionInAfterCompletion;
}
public String toString() {
Modified: core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/transaction/DummyTransaction.java
===================================================================
--- core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/transaction/DummyTransaction.java 2007-08-22 14:35:57 UTC (rev 4309)
+++ core/branches/Branch_JBossCache_1_4_0/src/org/jboss/cache/transaction/DummyTransaction.java 2007-08-23 16:46:05 UTC (rev 4310)
@@ -230,7 +230,7 @@
}
- boolean notifyBeforeCompletion() {
+ protected boolean notifyBeforeCompletion() {
boolean retval=true;
List tmp;
@@ -254,7 +254,7 @@
return retval;
}
- void notifyAfterCompletion(int status) {
+ protected void notifyAfterCompletion(int status) {
List tmp;
synchronized(participants) {
Added: core/branches/Branch_JBossCache_1_4_0/tests/functional/org/jboss/cache/transaction/StatusUnknownTest.java
===================================================================
--- core/branches/Branch_JBossCache_1_4_0/tests/functional/org/jboss/cache/transaction/StatusUnknownTest.java (rev 0)
+++ core/branches/Branch_JBossCache_1_4_0/tests/functional/org/jboss/cache/transaction/StatusUnknownTest.java 2007-08-23 16:46:05 UTC (rev 4310)
@@ -0,0 +1,146 @@
+package org.jboss.cache.transaction;
+
+import junit.framework.TestCase;
+import org.jboss.cache.TreeCache;
+import org.jboss.cache.DummyTransactionManagerLookup;
+import org.jboss.cache.TransactionManagerLookup;
+
+import javax.transaction.TransactionManager;
+import javax.transaction.Transaction;
+import javax.transaction.SystemException;
+import javax.transaction.NotSupportedException;
+import javax.transaction.Status;
+import javax.transaction.RollbackException;
+import javax.transaction.Synchronization;
+import javax.naming.Context;
+import javax.naming.InitialContext;
+import javax.naming.NamingException;
+import java.util.Properties;
+import java.util.List;
+import java.util.LinkedList;
+import java.util.Iterator;
+
+/**
+ * This test checks how the cache behaves when a JTA STATUS_UNKNOWN is passed in to the cache during afterCompletion().
+ *
+ * @author <a href="mailto:manik@jboss.org">Manik Surtani</a>
+ */
+public class StatusUnknownTest extends TestCase
+{
+ private TreeCache cache;
+ private TransactionManager tm;
+
+ protected void setUp() throws Exception
+ {
+ cache = new TreeCache();
+ cache.setTransactionManagerLookupClass(HeuristicFailingDummyTransactionManagerLookup.class.getName());
+ cache.startService();
+ tm = cache.getTransactionManager();
+ }
+
+ protected void tearDown()
+ {
+ cache.stopService();
+ }
+
+ public void testStatusUnknown() throws Exception
+ {
+ tm.begin();
+ cache.put("/a/b/c", "k", "v");
+ tm.commit();
+ }
+
+ public static class HeuristicFailingDummyTransactionManager extends DummyTransactionManager
+ {
+ public void begin() throws SystemException, NotSupportedException
+ {
+ super.begin();
+
+ Transaction tx = new HeuristicFailingDummyTransaction(this);
+ setTransaction(tx);
+ }
+
+ public static DummyTransactionManager getInstance()
+ {
+ if(instance == null)
+ {
+ instance=new HeuristicFailingDummyTransactionManager();
+ try
+ {
+ Properties p=new Properties();
+ p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jboss.cache.transaction.DummyContextFactory");
+ Context ctx=new InitialContext(p);
+ ctx.bind("java:/TransactionManager", instance);
+ ctx.bind("UserTransaction", new DummyUserTransaction(instance));
+ }
+ catch(NamingException e)
+ {
+ log.error("binding of DummyTransactionManager failed", e);
+ }
+ }
+ return instance;
+ }
+ }
+
+ public static class HeuristicFailingDummyTransaction extends DummyTransaction
+ {
+ public HeuristicFailingDummyTransaction(DummyBaseTransactionManager mgr)
+ {
+ super(mgr);
+ }
+
+ public void commit() throws RollbackException
+ {
+ status= Status.STATUS_PREPARING;
+ try
+ {
+ notifyBeforeCompletion();
+ notifyAfterCompletion(Status.STATUS_UNKNOWN);
+ }
+ finally
+ {
+ // Disassociate tx from thread.
+ tm_.setTransaction(null);
+ }
+ }
+
+ protected void notifyAfterCompletion(int status)
+ {
+ List tmp;
+
+ synchronized(participants)
+ {
+ tmp=new LinkedList(participants);
+ }
+
+ for(Iterator it=tmp.iterator(); it.hasNext();)
+ {
+ Synchronization s=(Synchronization)it.next();
+ try
+ {
+ s.afterCompletion(status);
+ }
+ catch(Throwable t)
+ {
+ throw (RuntimeException) t;
+ }
+ }
+
+ synchronized(participants)
+ {
+ participants.clear();
+ }
+ }
+ }
+
+ public static class HeuristicFailingDummyTransactionManagerLookup implements TransactionManagerLookup
+ {
+
+ public TransactionManager getTransactionManager() throws Exception
+ {
+ return HeuristicFailingDummyTransactionManager.getInstance();
+ }
+ }
+}
+
+
17 years, 4 months
JBoss Cache SVN: r4309 - in support/trunk: common and 1 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-08-22 10:35:57 -0400 (Wed, 22 Aug 2007)
New Revision: 4309
Modified:
support/trunk/common/pom.xml
support/trunk/pom.xml
support/trunk/xslt/pom.xml
Log:
Stuff
Modified: support/trunk/common/pom.xml
===================================================================
--- support/trunk/common/pom.xml 2007-08-22 14:29:26 UTC (rev 4308)
+++ support/trunk/common/pom.xml 2007-08-22 14:35:57 UTC (rev 4309)
@@ -7,7 +7,7 @@
<parent>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-support</artifactId>
- <version>1.0</version>
+ <version>1.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.cache</groupId>
@@ -212,7 +212,7 @@
<aggregate>${jbosscache.reports.aggregate}</aggregate>
<linkXref>true</linkXref>
<minimumTokens>100</minimumTokens>
- <targetJdk>1.4</targetJdk>
+ <targetJdk>1.5</targetJdk>
</configuration>
</plugin>
<plugin>
@@ -233,11 +233,9 @@
</configuration>
</plugin>
<plugin>
- <!-- Note: aggregate-able, may cause problems if we aggregate jxr and not this because of the xref links -->
<groupId>org.codehaus.mojo</groupId>
<artifactId>javancss-maven-plugin</artifactId>
</plugin>
-
<!-- Findbugs report -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
Modified: support/trunk/pom.xml
===================================================================
--- support/trunk/pom.xml 2007-08-22 14:29:26 UTC (rev 4308)
+++ support/trunk/pom.xml 2007-08-22 14:35:57 UTC (rev 4309)
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-support</artifactId>
- <version>1.0</version>
+ <version>1.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JBoss Cache Support Modules</name>
<description>Grouping of JBoss Cache support modules</description>
Modified: support/trunk/xslt/pom.xml
===================================================================
--- support/trunk/xslt/pom.xml 2007-08-22 14:29:26 UTC (rev 4308)
+++ support/trunk/xslt/pom.xml 2007-08-22 14:35:57 UTC (rev 4309)
@@ -6,7 +6,7 @@
<parent>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-support</artifactId>
- <version>1.0</version>
+ <version>1.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.cache</groupId>
17 years, 4 months
JBoss Cache SVN: r4308 - in core/trunk/src/main/java/org/jboss/cache: loader and 3 other directories.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-08-22 10:29:26 -0400 (Wed, 22 Aug 2007)
New Revision: 4308
Modified:
core/trunk/src/main/java/org/jboss/cache/CacheImpl.java
core/trunk/src/main/java/org/jboss/cache/Fqn.java
core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java
core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java
core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java
core/trunk/src/main/java/org/jboss/cache/transaction/GenericTransactionManagerLookup.java
Log:
Moved suppress warnings annotation
Modified: core/trunk/src/main/java/org/jboss/cache/CacheImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/CacheImpl.java 2007-08-22 14:07:30 UTC (rev 4307)
+++ core/trunk/src/main/java/org/jboss/cache/CacheImpl.java 2007-08-22 14:29:26 UTC (rev 4308)
@@ -1834,6 +1834,7 @@
return retval;
}
+ @SuppressWarnings("unchecked")
public <E> Set<E> _getChildrenNames(Fqn<E> fqn) throws CacheException
{
NodeSPI<K, V> n = findNode(fqn);
@@ -1846,8 +1847,7 @@
for (Object c : s)
{
NodeSPI child = (NodeSPI) c;
- if (!child.isDeleted()) {
- @SuppressWarnings("unchecked")
+ if (!child.isDeleted()) {
E e = (E)child.getFqn().getLastElement();
childNames.add(e);
}
Modified: core/trunk/src/main/java/org/jboss/cache/Fqn.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/Fqn.java 2007-08-22 14:07:30 UTC (rev 4307)
+++ core/trunk/src/main/java/org/jboss/cache/Fqn.java 2007-08-22 14:29:26 UTC (rev 4308)
@@ -362,13 +362,13 @@
}
}
+ @SuppressWarnings("unchecked")
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
{
short length = in.readShort();
this.elements = new ArrayList<E>(length);
for (int i = 0; i < length; i++)
{
- @SuppressWarnings("unchecked")
E e = (E) in.readObject();
elements.add(e);
}
Modified: core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2007-08-22 14:07:30 UTC (rev 4307)
+++ core/trunk/src/main/java/org/jboss/cache/RPCManagerImpl.java 2007-08-22 14:29:26 UTC (rev 4308)
@@ -35,7 +35,6 @@
// for now, we delegate RPC calls to deprecated methods in CacheImpl.
- @SuppressWarnings("deprecation")
public List callRemoteMethods(List<Address> recipients, MethodCall methodCall, int mode, boolean excludeSelf, long timeout) throws Exception
{
return c.callRemoteMethods(recipients, methodCall, mode, excludeSelf, timeout);
@@ -51,13 +50,11 @@
return c.getCoordinator();
}
- @SuppressWarnings("deprecation")
public List callRemoteMethods(List<Address> recipients, MethodCall methodCall, boolean synchronous, boolean excludeSelf, int timeout) throws Exception
{
return c.callRemoteMethods(recipients, methodCall, synchronous, excludeSelf, timeout);
}
- @SuppressWarnings("deprecation")
public List callRemoteMethods(List<Address> recipients, Method method, Object[] arguments, boolean synchronous, boolean excludeSelf, long timeout) throws Exception
{
return c.callRemoteMethods(recipients, method, arguments, synchronous, excludeSelf, timeout);
Modified: core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java 2007-08-22 14:07:30 UTC (rev 4307)
+++ core/trunk/src/main/java/org/jboss/cache/loader/AdjListJDBCCacheLoader.java 2007-08-22 14:29:26 UTC (rev 4308)
@@ -356,6 +356,7 @@
* null if there is no row with the fqn in the table,
* NULL_NODE_IN_ROW if there is a row in the table with the fqn but the node column contains null.
*/
+ @SuppressWarnings("unchecked")
protected Map<Object, Object> loadNode(Fqn name)
{
boolean rowExists = false;
@@ -388,7 +389,6 @@
// Object marshalledNode = ois.readObject();
// deserialize result
- @SuppressWarnings("unchecked")
Map<Object, Object> oldNode = (Map<Object, Object>) unmarshall(is);
return oldNode;
}
Modified: core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java 2007-08-22 14:07:30 UTC (rev 4307)
+++ core/trunk/src/main/java/org/jboss/cache/loader/bdbje/BdbjeCacheLoader.java 2007-08-22 14:29:26 UTC (rev 4308)
@@ -1083,9 +1083,9 @@
/**
* Converts a database entry to a Map.
*/
+ @SuppressWarnings("unchecked")
private Map<Object, Object> makeDataObject(DatabaseEntry entry, boolean createIfNull)
{
- @SuppressWarnings("unchecked")
Map<Object, Object> map = (Map<Object, Object>) serialBinding.entryToObject(entry);
if (createIfNull && map == null)
{
Modified: core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java 2007-08-22 14:07:30 UTC (rev 4307)
+++ core/trunk/src/main/java/org/jboss/cache/optimistic/WorkspaceNodeImpl.java 2007-08-22 14:29:26 UTC (rev 4308)
@@ -163,6 +163,7 @@
return node.getParent();
}
+ @SuppressWarnings("unchecked")
public NodeSPI<K, V> createChild(Object child_name, NodeSPI<K, V> parent, CacheSPI<K, V> cache, DataVersion version)
{
if (child_name == null)
@@ -176,7 +177,6 @@
// if not we need to create it
if (child == null)
{
- @SuppressWarnings("unchecked")
NodeFactory<K, V> factory = cache.getConfiguration().getRuntimeConfig().getNodeFactory();
child = (NodeSPI<K, V>) factory.createNodeOfType(parent, child_name, parent, null);
optimisticChildNodeMap.put(child_name, child);
Modified: core/trunk/src/main/java/org/jboss/cache/transaction/GenericTransactionManagerLookup.java
===================================================================
--- core/trunk/src/main/java/org/jboss/cache/transaction/GenericTransactionManagerLookup.java 2007-08-22 14:07:30 UTC (rev 4307)
+++ core/trunk/src/main/java/org/jboss/cache/transaction/GenericTransactionManagerLookup.java 2007-08-22 14:29:26 UTC (rev 4308)
@@ -98,6 +98,7 @@
/**
* Try to figure out which TransactionManager to use
*/
+ @SuppressWarnings("unchecked")
private static void doLookups()
{
if (lookupFailed)
@@ -172,7 +173,6 @@
{
Class[] signature = null;
Object[] args = null;
- @SuppressWarnings("unchecked")
Method method = clazz.getMethod("getTransactionManager", signature);
tm = (TransactionManager) method.invoke(null, args);
}
17 years, 4 months
JBoss Cache SVN: r4306 - core/trunk.
by jbosscache-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2007-08-22 09:53:51 -0400 (Wed, 22 Aug 2007)
New Revision: 4306
Modified:
core/trunk/pom.xml
Log:
Updated to use common-parent 1.1-SNAPSHOT
Modified: core/trunk/pom.xml
===================================================================
--- core/trunk/pom.xml 2007-08-17 20:00:11 UTC (rev 4305)
+++ core/trunk/pom.xml 2007-08-22 13:53:51 UTC (rev 4306)
@@ -9,7 +9,7 @@
<parent>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-common-parent</artifactId>
- <version>1.0</version>
+ <version>1.1-SNAPSHOT</version>
</parent>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-core</artifactId>
17 years, 4 months
JBoss Cache SVN: r4305 - cacheloader-migration/trunk/src/main/java/org/jboss/cache/loader.
by jbosscache-commits@lists.jboss.org
Author: galder.zamarreno(a)jboss.com
Date: 2007-08-17 16:00:11 -0400 (Fri, 17 Aug 2007)
New Revision: 4305
Modified:
cacheloader-migration/trunk/src/main/java/org/jboss/cache/loader/TransformingJDBCCacheLoader.java
Log:
This class should be importing org.jboss.invocation.Marshalled, not org.jboss.aop.util.MarshalledValue. See JBossCache 2.0.GA.
Modified: cacheloader-migration/trunk/src/main/java/org/jboss/cache/loader/TransformingJDBCCacheLoader.java
===================================================================
--- cacheloader-migration/trunk/src/main/java/org/jboss/cache/loader/TransformingJDBCCacheLoader.java 2007-08-17 04:18:07 UTC (rev 4304)
+++ cacheloader-migration/trunk/src/main/java/org/jboss/cache/loader/TransformingJDBCCacheLoader.java 2007-08-17 20:00:11 UTC (rev 4305)
@@ -6,7 +6,7 @@
*/
package org.jboss.cache.loader;
-import org.jboss.aop.util.MarshalledValue;
+import org.jboss.invocation.MarshalledValue;
import java.io.InputStream;
import java.io.ObjectInputStream;
17 years, 4 months
JBoss Cache SVN: r4304 - pojo/trunk.
by jbosscache-commits@lists.jboss.org
Author: jason.greene(a)jboss.com
Date: 2007-08-17 00:18:07 -0400 (Fri, 17 Aug 2007)
New Revision: 4304
Modified:
pojo/trunk/pom.xml
Log:
Add a dependancy on the test-jar of jboss cache
Modified: pojo/trunk/pom.xml
===================================================================
--- pojo/trunk/pom.xml 2007-08-17 04:17:09 UTC (rev 4303)
+++ pojo/trunk/pom.xml 2007-08-17 04:18:07 UTC (rev 4304)
@@ -28,6 +28,12 @@
<artifactId>jbosscache-core</artifactId>
<version>2.1.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.jboss.cache</groupId>
+ <artifactId>jbosscache-core</artifactId>
+ <version>2.1.0-SNAPSHOT</version>
+ <type>test-jar</type>
+ </dependency>
</dependencies>
<build>
<plugins>
17 years, 4 months