[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/optimistic ...
Manik Surtani
msurtani at jboss.com
Fri Aug 18 11:40:40 EDT 2006
User: msurtani
Date: 06/08/18 11:40:40
Modified: tests/functional/org/jboss/cache/optimistic
NodeInterceptorGetChildrenNamesTest.java
NodeInterceptorGetKeyValTest.java
NodeInterceptorGetKeysTest.java
NodeInterceptorKeyValTest.java
NodeInterceptorPutEraseTest.java
NodeInterceptorPutMapTest.java
NodeInterceptorRemoveDataTest.java
NodeInterceptorRemoveKeyValTest.java
NodeInterceptorRemoveNodeTest.java
OpLockingInterceptorTest.java
OptimisticCreateIfNotExistsInterceptorTest.java
ThreadedOptimisticCreateIfNotExistsInterceptorTest.java
ValidatorInterceptorTest.java
Log:
Habanero stabilisation efforts - scoping problems with more than one cache instance in the same thread/namespace.
Revision Changes Path
1.9 +8 -8 JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetChildrenNamesTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeInterceptorGetChildrenNamesTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetChildrenNamesTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- NodeInterceptorGetChildrenNamesTest.java 17 Aug 2006 21:57:59 -0000 1.8
+++ NodeInterceptorGetChildrenNamesTest.java 18 Aug 2006 15:40:40 -0000 1.9
@@ -50,8 +50,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
@@ -87,8 +87,8 @@
Transaction tx2 = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx2);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx2));
+ cache.getInvocationContext().setTransaction(tx2);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx2));
assertEquals(0, cache.getChildrenNames("/").size());
mgr.commit();
@@ -120,8 +120,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
assertEquals(null, dummy.getCalled());
@@ -171,8 +171,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
1.9 +12 -12 JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetKeyValTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeInterceptorGetKeyValTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetKeyValTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- NodeInterceptorGetKeyValTest.java 17 Aug 2006 21:57:59 -0000 1.8
+++ NodeInterceptorGetKeyValTest.java 18 Aug 2006 15:40:40 -0000 1.9
@@ -48,8 +48,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
@@ -84,8 +84,8 @@
Transaction tx2 = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx2);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx2));
+ cache.getInvocationContext().setTransaction(tx2);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx2));
assertNull(cache.get("/one/two", "key1"));
mgr.commit();
@@ -116,8 +116,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
@@ -175,8 +175,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
@@ -233,8 +233,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
@@ -248,8 +248,8 @@
mgr.begin();
Transaction tx2 = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx2);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx2));
+ cache.getInvocationContext().setTransaction(tx2);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx2));
SamplePojo pojo2 = new SamplePojo(22, "test2");
1.9 +8 -8 JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetKeysTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeInterceptorGetKeysTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorGetKeysTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- NodeInterceptorGetKeysTest.java 17 Aug 2006 21:57:59 -0000 1.8
+++ NodeInterceptorGetKeysTest.java 18 Aug 2006 15:40:40 -0000 1.9
@@ -50,8 +50,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
@@ -86,8 +86,8 @@
Transaction tx2 = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx2);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx2));
+ cache.getInvocationContext().setTransaction(tx2);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx2));
assertNull(cache.get("/one/two", "key1"));
mgr.commit();
@@ -119,8 +119,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
assertEquals(null, dummy.getCalled());
@@ -168,8 +168,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
1.10 +12 -12 JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorKeyValTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeInterceptorKeyValTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorKeyValTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- NodeInterceptorKeyValTest.java 17 Aug 2006 21:57:59 -0000 1.9
+++ NodeInterceptorKeyValTest.java 18 Aug 2006 15:40:40 -0000 1.10
@@ -48,8 +48,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
@@ -101,8 +101,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
@@ -158,8 +158,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
@@ -214,8 +214,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
@@ -272,8 +272,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
@@ -285,8 +285,8 @@
//start a new transaction
mgr.begin();
Transaction tx2 = mgr.getTransaction();
- InvocationContext.getCurrent().setTransaction(tx2);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx2));
+ cache.getInvocationContext().setTransaction(tx2);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx2));
SamplePojo pojo2 = new SamplePojo(21, "test");
1.9 +6 -6 JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorPutEraseTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeInterceptorPutEraseTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorPutEraseTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- NodeInterceptorPutEraseTest.java 17 Aug 2006 21:57:59 -0000 1.8
+++ NodeInterceptorPutEraseTest.java 18 Aug 2006 15:40:40 -0000 1.9
@@ -50,8 +50,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -104,8 +104,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
@@ -161,8 +161,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
1.9 +6 -6 JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorPutMapTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeInterceptorPutMapTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorPutMapTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- NodeInterceptorPutMapTest.java 17 Aug 2006 21:57:59 -0000 1.8
+++ NodeInterceptorPutMapTest.java 18 Aug 2006 15:40:40 -0000 1.9
@@ -51,8 +51,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -107,8 +107,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -166,8 +166,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
1.10 +8 -8 JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveDataTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeInterceptorRemoveDataTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveDataTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- NodeInterceptorRemoveDataTest.java 17 Aug 2006 21:57:59 -0000 1.9
+++ NodeInterceptorRemoveDataTest.java 18 Aug 2006 15:40:40 -0000 1.10
@@ -50,8 +50,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
cache.removeData("/one/two");
@@ -101,8 +101,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
Map temp = new HashMap();
@@ -158,8 +158,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -218,8 +218,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
1.9 +6 -6 JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveKeyValTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeInterceptorRemoveKeyValTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveKeyValTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- NodeInterceptorRemoveKeyValTest.java 17 Aug 2006 21:57:59 -0000 1.8
+++ NodeInterceptorRemoveKeyValTest.java 18 Aug 2006 15:40:40 -0000 1.9
@@ -57,8 +57,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
cache.remove("/one/two", "keyOne");
@@ -108,8 +108,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -166,8 +166,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
1.11 +14 -14 JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveNodeTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: NodeInterceptorRemoveNodeTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/NodeInterceptorRemoveNodeTest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- NodeInterceptorRemoveNodeTest.java 17 Aug 2006 21:57:59 -0000 1.10
+++ NodeInterceptorRemoveNodeTest.java 18 Aug 2006 15:40:40 -0000 1.11
@@ -57,8 +57,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
cache.remove("/one/two");
@@ -108,8 +108,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -169,8 +169,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -230,8 +230,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -314,8 +314,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -400,8 +400,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -487,8 +487,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
1.13 +6 -6 JBossCache/tests/functional/org/jboss/cache/optimistic/OpLockingInterceptorTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OpLockingInterceptorTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/OpLockingInterceptorTest.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -b -r1.12 -r1.13
--- OpLockingInterceptorTest.java 17 Aug 2006 21:57:59 -0000 1.12
+++ OpLockingInterceptorTest.java 18 Aug 2006 15:40:40 -0000 1.13
@@ -65,8 +65,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -156,8 +156,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -273,8 +273,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
1.10 +4 -4 JBossCache/tests/functional/org/jboss/cache/optimistic/OptimisticCreateIfNotExistsInterceptorTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: OptimisticCreateIfNotExistsInterceptorTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/OptimisticCreateIfNotExistsInterceptorTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- OptimisticCreateIfNotExistsInterceptorTest.java 17 Aug 2006 21:57:59 -0000 1.9
+++ OptimisticCreateIfNotExistsInterceptorTest.java 18 Aug 2006 15:40:40 -0000 1.10
@@ -53,8 +53,8 @@
workspace = entry.getTransactionWorkSpace();
// set invocation context elements
- InvocationContext.getCurrent().setGlobalTransaction(gtx);
- InvocationContext.getCurrent().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(gtx);
+ cache.getInvocationContext().setTransaction(tx);
}
public void testNodeCreation() throws Exception
@@ -126,8 +126,8 @@
txManager.commit();
// we should now remove stuff from the InvocationCtx
- InvocationContext.getCurrent().setGlobalTransaction(null);
- InvocationContext.getCurrent().setTransaction(null);
+ cache.getInvocationContext().setGlobalTransaction(null);
+ cache.getInvocationContext().setTransaction(null);
try
{
1.15 +5 -6 JBossCache/tests/functional/org/jboss/cache/optimistic/ThreadedOptimisticCreateIfNotExistsInterceptorTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ThreadedOptimisticCreateIfNotExistsInterceptorTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/ThreadedOptimisticCreateIfNotExistsInterceptorTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- ThreadedOptimisticCreateIfNotExistsInterceptorTest.java 17 Aug 2006 21:57:59 -0000 1.14
+++ ThreadedOptimisticCreateIfNotExistsInterceptorTest.java 18 Aug 2006 15:40:40 -0000 1.15
@@ -11,11 +11,10 @@
import org.jboss.cache.Fqn;
import org.jboss.cache.OptimisticTransactionEntry;
import org.jboss.cache.TreeCache;
-import org.jboss.cache.InvocationContext;
-import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.interceptors.Interceptor;
import org.jboss.cache.interceptors.OptimisticCreateIfNotExistsInterceptor;
import org.jboss.cache.loader.SamplePojo;
+import org.jboss.cache.misc.TestingUtil;
import org.jboss.cache.transaction.DummyTransactionManager;
import javax.transaction.Transaction;
@@ -38,14 +37,14 @@
protected void setTransactionsInInvocationCtx(TransactionManager mgr, TreeCache cache) throws Exception
{
- InvocationContext.getCurrent().setTransaction(mgr.getTransaction());
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction());
+ cache.getInvocationContext().setTransaction(mgr.getTransaction());
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction());
}
protected void resetInvocationCtx(TreeCache cache)
{
- InvocationContext.getCurrent().setTransaction(null);
- InvocationContext.getCurrent().setGlobalTransaction(null);
+ cache.getInvocationContext().setTransaction(null);
+ cache.getInvocationContext().setGlobalTransaction(null);
}
public void testDifferentTransactions() throws Exception
1.14 +10 -10 JBossCache/tests/functional/org/jboss/cache/optimistic/ValidatorInterceptorTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ValidatorInterceptorTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/optimistic/ValidatorInterceptorTest.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- ValidatorInterceptorTest.java 17 Aug 2006 21:57:59 -0000 1.13
+++ ValidatorInterceptorTest.java 18 Aug 2006 15:40:40 -0000 1.14
@@ -60,8 +60,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -143,8 +143,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -219,8 +219,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -330,8 +330,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
@@ -435,8 +435,8 @@
Transaction tx = mgr.getTransaction();
// inject InvocationContext
- InvocationContext.getCurrent().setTransaction(tx);
- InvocationContext.getCurrent().setGlobalTransaction(cache.getCurrentTransaction(tx));
+ cache.getInvocationContext().setTransaction(tx);
+ cache.getInvocationContext().setGlobalTransaction(cache.getCurrentTransaction(tx));
SamplePojo pojo = new SamplePojo(21, "test");
Map temp = new HashMap();
More information about the jboss-cvs-commits
mailing list