You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by ti...@apache.org on 2018/01/19 17:28:47 UTC

[aries-tx-control] branch master updated (bdae9a1 -> e1afa6d)

This is an automated email from the ASF dual-hosted git repository.

timothyjward pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/aries-tx-control.git.


    from bdae9a1  tx-control-service spec fixes
     new eb3d657  Tx Control Service spec work Support XA recovery based on a system property as well as config admin. Correctly advertise recovery support Don't use a javax.resource exception that isn't imported
     new 0fc68c8  Tx Control spec compliance
     new 0553df8  Tx Control Service spec compliance
     new e1afa6d  Tx Control spec compliance

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../tx-control-service-xa}/.gitignore              |  1 -
 tx-control-services/tx-control-service-xa/bnd.bnd  |  3 +-
 .../service/xa/impl/TransactionContextImpl.java    | 24 ++++++---
 .../service/xa/impl/TransactionControlImpl.java    | 12 +++--
 .../service/xa/impl/TransactionContextTest.java    | 61 +++++++++++++++++++++-
 .../xa/impl/TransactionControlRunningTest.java     |  5 +-
 .../xa/impl/TransactionControlStatusTest.java      |  5 +-
 .../service/xa/impl/TransactionLifecycleTest.java  |  5 +-
 8 files changed, 99 insertions(+), 17 deletions(-)
 copy {tx-control-providers/jdbc/tx-control-provider-jdbc-xa => tx-control-services/tx-control-service-xa}/.gitignore (60%)

-- 
To stop receiving notification emails like this one, please contact
['"commits@aries.apache.org" <co...@aries.apache.org>'].

[aries-tx-control] 02/04: Tx Control spec compliance

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

timothyjward pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/aries-tx-control.git

commit 0fc68c8c57c98cb5ea7cf694a4301a8bec49af02
Author: Tim Ward <ti...@apache.org>
AuthorDate: Fri Jan 19 16:39:12 2018 +0000

    Tx Control spec compliance
    
    Make sure that we can't register pre-completion from inside a pre-completion callback
---
 .../service/xa/impl/TransactionContextImpl.java    |  8 ++++---
 .../service/xa/impl/TransactionContextTest.java    | 26 ++++++++++++++++++++++
 2 files changed, 31 insertions(+), 3 deletions(-)

diff --git a/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java b/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java
index 67eff17..cb1f6d1 100644
--- a/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java
+++ b/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java
@@ -70,6 +70,8 @@ public class TransactionContextImpl extends AbstractTransactionContextImpl imple
 	private final boolean readOnly;
 
 	private LocalResourceSupport localResourceSupport;
+	
+	private boolean noMorePreCompletion;
 
 	public TransactionContextImpl(RecoveryWorkAroundTransactionManager transactionManager, 
 			boolean readOnly, LocalResourceSupport localResourceSupport) {
@@ -195,9 +197,8 @@ public class TransactionContextImpl extends AbstractTransactionContextImpl imple
 
 	@Override
 	public void preCompletion(Runnable job) throws IllegalStateException {
-		TransactionStatus status = getTransactionStatus();
-		if (status.compareTo(MARKED_ROLLBACK) > 0) {
-			throw new IllegalStateException("The current transaction is in state " + status);
+		if (noMorePreCompletion) {
+			throw new IllegalStateException("The current transactional work has finished executing so a pre-completion callback can no longer be registered");
 		}
 
 		preCompletion.add(job);
@@ -444,6 +445,7 @@ public class TransactionContextImpl extends AbstractTransactionContextImpl imple
 		
 		@Override
 		public void beforeCompletion() {
+			noMorePreCompletion = true;
 			TransactionContextImpl.this.beforeCompletion(() -> safeSetRollbackOnly());
 		}
 
diff --git a/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextTest.java b/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextTest.java
index d782b94..cd2032a 100644
--- a/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextTest.java
+++ b/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextTest.java
@@ -467,6 +467,32 @@ public class TransactionContextTest {
 		
 		Mockito.verifyNoMoreInteractions(xaResource);
 	}
+	
+	@Test
+	public void tesXAResourcePreCompletionRegisterPreCompletion() throws Exception {
+		
+		ctx.registerXAResource(xaResource, null);
+		
+		Mockito.doAnswer(i -> {
+			assertEquals(ROLLING_BACK, ctx.getTransactionStatus());
+			return null;
+		}).when(xaResource).rollback(Mockito.any(Xid.class));
+		
+		ctx.preCompletion(() -> ctx.preCompletion(() -> {}));
+		
+		ctx.finish();
+		
+		ArgumentCaptor<Xid> captor = ArgumentCaptor.forClass(Xid.class);
+		
+		InOrder inOrder = Mockito.inOrder(xaResource);
+		
+		inOrder.verify(xaResource).start(captor.capture(), Mockito.eq(XAResource.TMNOFLAGS));
+		inOrder.verify(xaResource).setTransactionTimeout(Mockito.anyInt());
+		inOrder.verify(xaResource).end(Mockito.eq(captor.getValue()), Mockito.eq(XAResource.TMFAIL));
+		inOrder.verify(xaResource).rollback(Mockito.eq(captor.getValue()));
+		
+		Mockito.verifyNoMoreInteractions(xaResource);
+	}
 
 	@Test
 	public void testXAResourcePostCommitException() throws Exception {

-- 
To stop receiving notification emails like this one, please contact
"commits@aries.apache.org" <co...@aries.apache.org>.

[aries-tx-control] 04/04: Tx Control spec compliance

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

timothyjward pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/aries-tx-control.git

commit e1afa6ddb8be4b40bf22848d1e38840cb8bf6af2
Author: Tim Ward <ti...@apache.org>
AuthorDate: Fri Jan 19 17:27:40 2018 +0000

    Tx Control spec compliance
    
    Ensure that internal transaction management exceptions are wrapped in a spec TransactionException before being thrown to the client
---
 .../aries/tx/control/service/xa/impl/TransactionContextImpl.java      | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java b/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java
index 3f18dcf..fe58f84 100644
--- a/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java
+++ b/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java
@@ -318,7 +318,9 @@ public class TransactionContextImpl extends AbstractTransactionContextImpl imple
 					}
 				}
 			} catch (Exception e) {
-				recordFailure(e);
+				TransactionException te = e instanceof TransactionException ? (TransactionException) e :
+					new TransactionException("An error occurred in the transaction", e);
+				recordFailure(te);
 			}
 		} finally {
 			try {

-- 
To stop receiving notification emails like this one, please contact
"commits@aries.apache.org" <co...@aries.apache.org>.

[aries-tx-control] 03/04: Tx Control Service spec compliance

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

timothyjward pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/aries-tx-control.git

commit 0553df8dbce9712a971289ed22d8493a299d6487
Author: Tim Ward <ti...@apache.org>
AuthorDate: Fri Jan 19 16:59:35 2018 +0000

    Tx Control Service spec compliance
    
    A setRollbackOnly called in a pre-completion callback should not result in an exception being thrown to the client
---
 .../service/xa/impl/TransactionContextImpl.java    | 12 ++++++--
 .../service/xa/impl/TransactionContextTest.java    | 35 +++++++++++++++++++++-
 2 files changed, 44 insertions(+), 3 deletions(-)

diff --git a/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java b/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java
index cb1f6d1..3f18dcf 100644
--- a/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java
+++ b/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextImpl.java
@@ -38,6 +38,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.concurrent.atomic.AtomicReference;
 import java.util.function.Consumer;
 
+import javax.transaction.RollbackException;
 import javax.transaction.Status;
 import javax.transaction.Synchronization;
 import javax.transaction.SystemException;
@@ -48,6 +49,7 @@ import javax.transaction.xa.Xid;
 
 import org.apache.aries.tx.control.service.common.impl.AbstractTransactionContextImpl;
 import org.apache.geronimo.transaction.manager.RecoveryWorkAroundTransactionManager;
+import org.apache.geronimo.transaction.manager.SetRollbackOnlyException;
 import org.osgi.service.transaction.control.LocalResource;
 import org.osgi.service.transaction.control.TransactionContext;
 import org.osgi.service.transaction.control.TransactionException;
@@ -132,7 +134,6 @@ public class TransactionContextImpl extends AbstractTransactionContextImpl imple
 				throw new IllegalStateException("The transaction is already being committed");
 			case COMMITTED:
 				throw new IllegalStateException("The transaction is already committed");
-	
 			case ROLLING_BACK:
 			case ROLLED_BACK:
 				// A no op
@@ -307,7 +308,14 @@ public class TransactionContextImpl extends AbstractTransactionContextImpl imple
 					listener.beforeCompletion();
 					transactionManager.rollback();
 				} else {
-					transactionManager.commit();
+					try {
+						transactionManager.commit();
+					} catch (RollbackException re) {
+						if (re.getCause() instanceof SetRollbackOnlyException) {
+							// This means that a pre-completion callback called setRollbackOnly
+							// which can be safely ignored (i.e. it's not really an exception)
+						}
+					}
 				}
 			} catch (Exception e) {
 				recordFailure(e);
diff --git a/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextTest.java b/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextTest.java
index cd2032a..3fb3fd4 100644
--- a/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextTest.java
+++ b/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionContextTest.java
@@ -83,6 +83,7 @@ public class TransactionContextTest {
 	public void testSetRollbackOnly() {
 		ctx.setRollbackOnly();
 		assertTrue(ctx.getRollbackOnly());
+		assertEquals(MARKED_ROLLBACK, ctx.getTransactionStatus());
 	}
 	
 	@Test
@@ -183,15 +184,38 @@ public class TransactionContextTest {
 		
 		assertEquals(0, value.getAndSet(1));
 		
-		
 		ctx.setRollbackOnly();
 		
+		assertTrue(ctx.getRollbackOnly());
+		assertEquals(MARKED_ROLLBACK, ctx.getTransactionStatus());
+		
 		ctx.finish();
 
 		assertEquals(5, value.get());
 	}
 
 	@Test
+	public void testPreCompletionCallsSetRollbackOnly() throws Exception {
+		
+		ctx.registerXAResource(xaResource, null);
+		
+		AtomicInteger value = new AtomicInteger(0);
+		
+		ctx.preCompletion(() -> {
+			ctx.setRollbackOnly();
+			assertEquals(MARKED_ROLLBACK, ctx.getTransactionStatus());
+			value.compareAndSet(1, 5);
+		});
+		
+		assertEquals(0, value.getAndSet(1));
+		
+		ctx.finish();
+		
+		assertEquals(5, value.get());
+		assertEquals(ROLLED_BACK, ctx.getTransactionStatus());
+	}
+
+	@Test
 	public void testPostCompletion() throws Exception {
 		
 		AtomicInteger value = new AtomicInteger(0);
@@ -222,6 +246,9 @@ public class TransactionContextTest {
 		
 		ctx.setRollbackOnly();
 		
+		assertTrue(ctx.getRollbackOnly());
+		assertEquals(MARKED_ROLLBACK, ctx.getTransactionStatus());
+		
 		ctx.finish();
 		
 		assertEquals(5, value.get());
@@ -300,6 +327,9 @@ public class TransactionContextTest {
 		ctx.registerLocalResource(localResource);
 		ctx.setRollbackOnly();
 		
+		assertTrue(ctx.getRollbackOnly());
+		assertEquals(MARKED_ROLLBACK, ctx.getTransactionStatus());
+		
 		Mockito.doAnswer(i -> {
 			assertEquals(ROLLING_BACK, ctx.getTransactionStatus());
 			return null;
@@ -424,6 +454,9 @@ public class TransactionContextTest {
 		ctx.registerXAResource(xaResource, null);
 		ctx.setRollbackOnly();
 		
+		assertTrue(ctx.getRollbackOnly());
+		assertEquals(MARKED_ROLLBACK, ctx.getTransactionStatus());
+		
 		Mockito.doAnswer(i -> {
 			assertEquals(ROLLING_BACK, ctx.getTransactionStatus());
 			return null;

-- 
To stop receiving notification emails like this one, please contact
"commits@aries.apache.org" <co...@aries.apache.org>.

[aries-tx-control] 01/04: Tx Control Service spec work Support XA recovery based on a system property as well as config admin. Correctly advertise recovery support Don't use a javax.resource exception that isn't imported

Posted by ti...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

timothyjward pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/aries-tx-control.git

commit eb3d657b702b25a5dd88457670647b4233d1615c
Author: Tim Ward <ti...@apache.org>
AuthorDate: Fri Jan 19 16:15:49 2018 +0000

    Tx Control Service spec work
    Support XA recovery based on a system property as well as config admin.
    Correctly advertise recovery support
    Don't use a javax.resource exception that isn't imported
---
 tx-control-services/tx-control-service-xa/.gitignore         |  1 +
 tx-control-services/tx-control-service-xa/bnd.bnd            |  3 ++-
 .../tx/control/service/xa/impl/TransactionControlImpl.java   | 12 +++++++-----
 .../service/xa/impl/TransactionControlRunningTest.java       |  5 ++++-
 .../service/xa/impl/TransactionControlStatusTest.java        |  5 ++++-
 .../tx/control/service/xa/impl/TransactionLifecycleTest.java |  5 ++++-
 6 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/tx-control-services/tx-control-service-xa/.gitignore b/tx-control-services/tx-control-service-xa/.gitignore
new file mode 100644
index 0000000..b83d222
--- /dev/null
+++ b/tx-control-services/tx-control-service-xa/.gitignore
@@ -0,0 +1 @@
+/target/
diff --git a/tx-control-services/tx-control-service-xa/bnd.bnd b/tx-control-services/tx-control-service-xa/bnd.bnd
index 8dd8683..02fcc35 100644
--- a/tx-control-services/tx-control-service-xa/bnd.bnd
+++ b/tx-control-services/tx-control-service-xa/bnd.bnd
@@ -63,4 +63,5 @@ Import-Package: !javax.resource.*, \
                 org.osgi.service.transaction.control, \
                 *
     
-Provide-Capability: osgi.service;objectClass="org.osgi.service.transaction.control.TransactionControl";osgi.local.enabled="true";osgi.xa.enabled="true";uses:="org.osgi.service.transaction.control"
\ No newline at end of file
+Provide-Capability: osgi.service;objectClass="org.osgi.service.transaction.control.TransactionControl";osgi.local.enabled="true";osgi.xa.enabled="true";osgi.recovery.enabled="true";uses:="org.osgi.service.transaction.control"
+
diff --git a/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionControlImpl.java b/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionControlImpl.java
index 516ba50..11e2031 100644
--- a/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionControlImpl.java
+++ b/tx-control-services/tx-control-service-xa/src/main/java/org/apache/aries/tx/control/service/xa/impl/TransactionControlImpl.java
@@ -30,7 +30,6 @@ import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Map;
 
-import javax.resource.spi.IllegalStateException;
 import javax.transaction.SystemException;
 import javax.transaction.xa.XAResource;
 
@@ -153,19 +152,21 @@ public class TransactionControlImpl extends AbstractTransactionControlImpl {
 	}
 
 	private HOWLLog getLog(BundleContext ctx) throws Exception {
-		Object recovery = config.getOrDefault("recovery.log.enabled", false);
+		Object recovery = config.getOrDefault("recovery.log.enabled", 
+				Boolean.parseBoolean(String.valueOf(ctx.getProperty(
+						"org.apache.aries.tx.control.service.xa.recovery.log.enabled"))));
 		
 		if (recovery instanceof Boolean ? (Boolean) recovery : Boolean.valueOf(recovery.toString())) {
-			String logFileExt = "log";
+            String logFileExt = "log";
             String logFileName = "transaction";
             
             String logFileDir;
 
             Object o = config.get("recovery.log.dir");
             if(o == null) {
-            	logFileDir = ctx.getDataFile("recoveryLog").getAbsolutePath();
+                logFileDir = ctx.getDataFile("recoveryLog").getAbsolutePath();
             } else {
-            	logFileDir = o.toString();
+                logFileDir = o.toString();
             }
             
             File f = new File(logFileDir);
@@ -264,6 +265,7 @@ public class TransactionControlImpl extends AbstractTransactionControlImpl {
 		
 		props.put("osgi.xa.enabled", Boolean.TRUE);
 		props.put("osgi.local.enabled", getLocalResourceSupport() != DISABLED);
+		props.put("osgi.recovery.enabled", log != null);
 		props.put(Constants.SERVICE_DESCRIPTION, "The Apache Aries Transaction Control Service for XA Transactions");
 		props.put(Constants.SERVICE_VENDOR, "Apache Aries");
 		
diff --git a/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionControlRunningTest.java b/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionControlRunningTest.java
index a7ad5d0..aa5c0a0 100644
--- a/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionControlRunningTest.java
+++ b/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionControlRunningTest.java
@@ -35,6 +35,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
+import org.osgi.framework.BundleContext;
 import org.osgi.service.transaction.control.LocalResource;
 import org.osgi.service.transaction.control.ResourceProvider;
 import org.osgi.service.transaction.control.ScopedWorkException;
@@ -44,6 +45,8 @@ import org.osgi.service.transaction.control.TransactionStatus;
 public class TransactionControlRunningTest {
 
 	@Mock
+	BundleContext ctx;
+	@Mock
 	ResourceProvider<Object> testProvider;
 	@Mock
 	LocalResource testResource;
@@ -52,7 +55,7 @@ public class TransactionControlRunningTest {
 
 	@Before
 	public void setUp() throws Exception {
-		txControl = new TransactionControlImpl(null, Collections.emptyMap());
+		txControl = new TransactionControlImpl(ctx, Collections.emptyMap());
 	}
 
 	@Test
diff --git a/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionControlStatusTest.java b/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionControlStatusTest.java
index 7f3a797..28ae10c 100644
--- a/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionControlStatusTest.java
+++ b/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionControlStatusTest.java
@@ -37,6 +37,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
+import org.osgi.framework.BundleContext;
 import org.osgi.service.transaction.control.LocalResource;
 import org.osgi.service.transaction.control.ResourceProvider;
 import org.osgi.service.transaction.control.TransactionContext;
@@ -45,6 +46,8 @@ import org.osgi.service.transaction.control.TransactionContext;
 public class TransactionControlStatusTest {
 
 	@Mock
+	BundleContext ctx;
+	@Mock
 	ResourceProvider<Object> testProvider;
 	@Mock
 	LocalResource testResource;
@@ -58,7 +61,7 @@ public class TransactionControlStatusTest {
 
 		resource = new Object();
 		
-		txControl = new TransactionControlImpl(null, Collections.emptyMap());
+		txControl = new TransactionControlImpl(ctx, Collections.emptyMap());
 	}
 
 	@Test
diff --git a/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionLifecycleTest.java b/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionLifecycleTest.java
index a85cdf1..d82cede 100644
--- a/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionLifecycleTest.java
+++ b/tx-control-services/tx-control-service-xa/src/test/java/org/apache/aries/tx/control/service/xa/impl/TransactionLifecycleTest.java
@@ -30,6 +30,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.mockito.Mock;
 import org.mockito.runners.MockitoJUnitRunner;
+import org.osgi.framework.BundleContext;
 import org.osgi.service.transaction.control.LocalResource;
 import org.osgi.service.transaction.control.ResourceProvider;
 
@@ -37,6 +38,8 @@ import org.osgi.service.transaction.control.ResourceProvider;
 public class TransactionLifecycleTest {
 
 	@Mock
+	BundleContext ctx;
+	@Mock
 	ResourceProvider<Object> testProvider;
 	@Mock
 	LocalResource testResource;
@@ -45,7 +48,7 @@ public class TransactionLifecycleTest {
 
 	@Before
 	public void setUp() throws Exception {
-		txControl = new TransactionControlImpl(null, Collections.emptyMap());
+		txControl = new TransactionControlImpl(ctx, Collections.emptyMap());
 	}
 
 	@Test

-- 
To stop receiving notification emails like this one, please contact
"commits@aries.apache.org" <co...@aries.apache.org>.