update to spec
git-svn-id: https://svn.apache.org/repos/asf/geronimo/components/txmanager/trunk@806899 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/geronimo-connector/src/main/java/org/apache/geronimo/connector/GeronimoBootstrapContext.java b/geronimo-connector/src/main/java/org/apache/geronimo/connector/GeronimoBootstrapContext.java
index 09d7f5a..8847a01 100644
--- a/geronimo-connector/src/main/java/org/apache/geronimo/connector/GeronimoBootstrapContext.java
+++ b/geronimo-connector/src/main/java/org/apache/geronimo/connector/GeronimoBootstrapContext.java
@@ -21,6 +21,8 @@
import javax.resource.spi.UnavailableException;
import javax.resource.spi.XATerminator;
import javax.resource.spi.work.WorkManager;
+import javax.resource.spi.work.WorkContext;
+import javax.transaction.TransactionSynchronizationRegistry;
/**
* GBean BootstrapContext implementation that refers to externally configured WorkManager
@@ -72,4 +74,12 @@
return new Timer();
}
+ public TransactionSynchronizationRegistry getTransactionSynchronizationRegistry() {
+ return null;
+ }
+
+ public boolean isContextSupported(Class<? extends WorkContext> aClass) {
+ return false;
+ }
+
}
diff --git a/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java b/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java
index c9ef362..ca53282 100644
--- a/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java
+++ b/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/GeronimoWorkManager.java
@@ -65,7 +65,7 @@
*/
private Executor scheduledWorkExecutorPool;
- private final Collection<InflowContextHandler> inflowContextHandlers;
+ private final Collection<WorkContextHandler> workContextHandlers;
private final WorkExecutor scheduleWorkExecutor = new ScheduleWorkExecutor();
@@ -79,11 +79,11 @@
this(null, null, null, null);
}
- public GeronimoWorkManager(Executor sync, Executor start, Executor sched, Collection<InflowContextHandler> inflowContextHandlers) {
+ public GeronimoWorkManager(Executor sync, Executor start, Executor sched, Collection<WorkContextHandler> workContextHandlers) {
syncWorkExecutorPool = sync;
startWorkExecutorPool = start;
scheduledWorkExecutorPool = sched;
- this.inflowContextHandlers = inflowContextHandlers == null ? Collections.<InflowContextHandler>emptyList() : inflowContextHandlers;
+ this.workContextHandlers = workContextHandlers == null ? Collections.<WorkContextHandler>emptyList() : workContextHandlers;
}
public void doStart() throws Exception {
@@ -116,7 +116,7 @@
* @see javax.resource.spi.work.WorkManager#doWork(javax.resource.spi.work.Work)
*/
public void doWork(Work work) throws WorkException {
- executeWork(new WorkerContext(work, inflowContextHandlers), syncWorkExecutor, syncWorkExecutorPool);
+ executeWork(new WorkerContext(work, workContextHandlers), syncWorkExecutor, syncWorkExecutorPool);
}
/* (non-Javadoc)
@@ -129,7 +129,7 @@
WorkListener workListener)
throws WorkException {
WorkerContext workWrapper =
- new WorkerContext(work, startTimeout, execContext, workListener, inflowContextHandlers);
+ new WorkerContext(work, startTimeout, execContext, workListener, workContextHandlers);
workWrapper.setThreadPriority(Thread.currentThread().getPriority());
executeWork(workWrapper, syncWorkExecutor, syncWorkExecutorPool);
}
@@ -138,7 +138,7 @@
* @see javax.resource.spi.work.WorkManager#startWork(javax.resource.spi.work.Work)
*/
public long startWork(Work work) throws WorkException {
- WorkerContext workWrapper = new WorkerContext(work, inflowContextHandlers);
+ WorkerContext workWrapper = new WorkerContext(work, workContextHandlers);
workWrapper.setThreadPriority(Thread.currentThread().getPriority());
executeWork(workWrapper, startWorkExecutor, startWorkExecutorPool);
return System.currentTimeMillis() - workWrapper.getAcceptedTime();
@@ -154,7 +154,7 @@
WorkListener workListener)
throws WorkException {
WorkerContext workWrapper =
- new WorkerContext(work, startTimeout, execContext, workListener, inflowContextHandlers);
+ new WorkerContext(work, startTimeout, execContext, workListener, workContextHandlers);
workWrapper.setThreadPriority(Thread.currentThread().getPriority());
executeWork(workWrapper, startWorkExecutor, startWorkExecutorPool);
return System.currentTimeMillis() - workWrapper.getAcceptedTime();
@@ -164,7 +164,7 @@
* @see javax.resource.spi.work.WorkManager#scheduleWork(javax.resource.spi.work.Work)
*/
public void scheduleWork(Work work) throws WorkException {
- WorkerContext workWrapper = new WorkerContext(work, inflowContextHandlers);
+ WorkerContext workWrapper = new WorkerContext(work, workContextHandlers);
workWrapper.setThreadPriority(Thread.currentThread().getPriority());
executeWork(workWrapper, scheduleWorkExecutor, scheduledWorkExecutorPool);
}
@@ -179,7 +179,7 @@
WorkListener workListener)
throws WorkException {
WorkerContext workWrapper =
- new WorkerContext(work, startTimeout, execContext, workListener, inflowContextHandlers);
+ new WorkerContext(work, startTimeout, execContext, workListener, workContextHandlers);
workWrapper.setThreadPriority(Thread.currentThread().getPriority());
executeWork(workWrapper, scheduleWorkExecutor, scheduledWorkExecutorPool);
}
diff --git a/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/TransactionContextHandler.java b/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/TransactionContextHandler.java
new file mode 100644
index 0000000..62ed49d
--- /dev/null
+++ b/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/TransactionContextHandler.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+
+package org.apache.geronimo.connector.work;
+
+import javax.resource.spi.work.TransactionContext;
+import javax.resource.spi.work.WorkCompletedException;
+import javax.transaction.xa.XAException;
+import javax.transaction.InvalidTransactionException;
+import javax.transaction.SystemException;
+
+import org.apache.geronimo.transaction.manager.XAWork;
+import org.apache.geronimo.transaction.manager.ImportedTransactionActiveException;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public class TransactionContextHandler implements WorkContextHandler<TransactionContext>{
+
+ private final XAWork xaWork;
+
+ public TransactionContextHandler(XAWork xaWork) {
+ this.xaWork = xaWork;
+ }
+
+ public void before(TransactionContext workContext) throws WorkCompletedException {
+ if (workContext.getXid() != null) {
+ try {
+ long transactionTimeout = workContext.getTransactionTimeout();
+ //translate -1 value to 0 to indicate default transaction timeout.
+ xaWork.begin(workContext.getXid(), transactionTimeout < 0 ? 0 : transactionTimeout);
+ } catch (XAException e) {
+ throw (WorkCompletedException)new WorkCompletedException("Transaction import failed for xid " + workContext.getXid(), WorkCompletedException.TX_RECREATE_FAILED).initCause(e);
+ } catch (InvalidTransactionException e) {
+ throw (WorkCompletedException)new WorkCompletedException("Transaction import failed for xid " + workContext.getXid(), WorkCompletedException.TX_RECREATE_FAILED).initCause(e);
+ } catch (SystemException e) {
+ throw (WorkCompletedException)new WorkCompletedException("Transaction import failed for xid " + workContext.getXid(), WorkCompletedException.TX_RECREATE_FAILED).initCause(e);
+ } catch (ImportedTransactionActiveException e) {
+ throw (WorkCompletedException)new WorkCompletedException("Transaction already active for xid " + workContext.getXid(), WorkCompletedException.TX_CONCURRENT_WORK_DISALLOWED).initCause(e);
+ }
+ }
+ }
+
+ public void after(TransactionContext workContext) throws WorkCompletedException {
+ if (workContext.getXid() != null) {
+ try {
+ xaWork.end(workContext.getXid());
+ } catch (XAException e) {
+ throw (WorkCompletedException)new WorkCompletedException("Transaction end failed for xid " + workContext.getXid(), WorkCompletedException.TX_RECREATE_FAILED).initCause(e);
+ } catch (SystemException e) {
+ throw (WorkCompletedException)new WorkCompletedException("Transaction end failed for xid " + workContext.getXid(), WorkCompletedException.TX_RECREATE_FAILED).initCause(e);
+ }
+ }
+ }
+
+ public Class<TransactionContext> getHandledClass() {
+ return TransactionContext.class;
+ }
+
+ public boolean required() {
+ return false;
+ }
+}
diff --git a/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/TransactionInflowContextHandler.java b/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/TransactionInflowContextHandler.java
deleted file mode 100644
index 5bcd0d1..0000000
--- a/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/TransactionInflowContextHandler.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-package org.apache.geronimo.connector.work;
-
-import javax.resource.spi.work.TransactionInflowContext;
-import javax.resource.spi.work.WorkCompletedException;
-import javax.transaction.xa.XAException;
-import javax.transaction.InvalidTransactionException;
-import javax.transaction.SystemException;
-
-import org.apache.geronimo.transaction.manager.XAWork;
-import org.apache.geronimo.transaction.manager.ImportedTransactionActiveException;
-
-/**
- * @version $Rev$ $Date$
- */
-public class TransactionInflowContextHandler implements InflowContextHandler<TransactionInflowContext>{
-
- private final XAWork xaWork;
-
- public TransactionInflowContextHandler(XAWork xaWork) {
- this.xaWork = xaWork;
- }
-
- public void before(TransactionInflowContext inflowContext) throws WorkCompletedException {
- if (inflowContext.getXid() != null) {
- try {
- long transactionTimeout = inflowContext.getTransactionTimeout();
- //translate -1 value to 0 to indicate default transaction timeout.
- xaWork.begin(inflowContext.getXid(), transactionTimeout < 0 ? 0 : transactionTimeout);
- } catch (XAException e) {
- throw (WorkCompletedException)new WorkCompletedException("Transaction import failed for xid " + inflowContext.getXid(), WorkCompletedException.TX_RECREATE_FAILED).initCause(e);
- } catch (InvalidTransactionException e) {
- throw (WorkCompletedException)new WorkCompletedException("Transaction import failed for xid " + inflowContext.getXid(), WorkCompletedException.TX_RECREATE_FAILED).initCause(e);
- } catch (SystemException e) {
- throw (WorkCompletedException)new WorkCompletedException("Transaction import failed for xid " + inflowContext.getXid(), WorkCompletedException.TX_RECREATE_FAILED).initCause(e);
- } catch (ImportedTransactionActiveException e) {
- throw (WorkCompletedException)new WorkCompletedException("Transaction already active for xid " + inflowContext.getXid(), WorkCompletedException.TX_CONCURRENT_WORK_DISALLOWED).initCause(e);
- }
- }
- }
-
- public void after(TransactionInflowContext inflowContext) throws WorkCompletedException {
- if (inflowContext.getXid() != null) {
- try {
- xaWork.end(inflowContext.getXid());
- } catch (XAException e) {
- throw (WorkCompletedException)new WorkCompletedException("Transaction end failed for xid " + inflowContext.getXid(), WorkCompletedException.TX_RECREATE_FAILED).initCause(e);
- } catch (SystemException e) {
- throw (WorkCompletedException)new WorkCompletedException("Transaction end failed for xid " + inflowContext.getXid(), WorkCompletedException.TX_RECREATE_FAILED).initCause(e);
- }
- }
- }
-
- public Class<TransactionInflowContext> getHandledClass() {
- return TransactionInflowContext.class;
- }
-
- public boolean required() {
- return false;
- }
-}
diff --git a/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/InflowContextHandler.java b/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkContextHandler.java
similarity index 80%
rename from geronimo-connector/src/main/java/org/apache/geronimo/connector/work/InflowContextHandler.java
rename to geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkContextHandler.java
index 5e0ad3c..431de6c 100644
--- a/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/InflowContextHandler.java
+++ b/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkContextHandler.java
@@ -20,17 +20,17 @@
package org.apache.geronimo.connector.work;
-import javax.resource.spi.work.InflowContext;
+import javax.resource.spi.work.WorkContext;
import javax.resource.spi.work.WorkCompletedException;
/**
* @version $Rev$ $Date$
*/
-public interface InflowContextHandler<E extends InflowContext> {
+public interface WorkContextHandler<E extends WorkContext> {
- void before(E inflowContext) throws WorkCompletedException;
+ void before(E workContext) throws WorkCompletedException;
- void after(E inflowContext) throws WorkCompletedException;
+ void after(E workContext) throws WorkCompletedException;
Class<E> getHandledClass();
diff --git a/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkerContext.java b/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkerContext.java
index 4f5c2d7..d80fa01 100644
--- a/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkerContext.java
+++ b/geronimo-connector/src/main/java/org/apache/geronimo/connector/work/WorkerContext.java
@@ -26,9 +26,9 @@
import javax.resource.NotSupportedException;
import javax.resource.spi.work.ExecutionContext;
-import javax.resource.spi.work.InflowContext;
-import javax.resource.spi.work.InflowContextProvider;
-import javax.resource.spi.work.TransactionInflowContext;
+import javax.resource.spi.work.WorkContext;
+import javax.resource.spi.work.WorkContextProvider;
+import javax.resource.spi.work.TransactionContext;
import javax.resource.spi.work.Work;
import javax.resource.spi.work.WorkAdapter;
import javax.resource.spi.work.WorkCompletedException;
@@ -50,7 +50,7 @@
private static final Logger log = LoggerFactory.getLogger(WorkerContext.class);
- private static final List<InflowContext> NO_INFLOW_CONTEXT = Collections.emptyList();
+ private static final List<WorkContext> NO_INFLOW_CONTEXT = Collections.emptyList();
/**
* Null WorkListener used as the default WorkListener.
@@ -123,18 +123,18 @@
*/
private final ExecutionContext executionContext;
- private final List<InflowContextHandler> inflowContextHandlers;
+ private final List<WorkContextHandler> workContextHandlers;
/**
* Create a WorkWrapper.
- * TODO include a InflowContextLifecycleListener
+ * TODO include a WorkContextLifecycleListener
* @param work Work to be wrapped.
- * @param inflowContextHandlers InflowContextHandlers supported by this work manager
+ * @param workContextHandlers WorkContextHandlers supported by this work manager
*/
- public WorkerContext(Work work, Collection<InflowContextHandler> inflowContextHandlers) {
+ public WorkerContext(Work work, Collection<WorkContextHandler> workContextHandlers) {
adaptee = work;
- this.inflowContextHandlers = new ArrayList<InflowContextHandler>(inflowContextHandlers);
+ this.workContextHandlers = new ArrayList<WorkContextHandler>(workContextHandlers);
executionContext = null;
workListener = NULL_WORK_LISTENER;
}
@@ -142,20 +142,20 @@
/**
* Create a WorkWrapper with the specified execution context.
*
- * TODO include a InflowContextLifecycleListener
+ * TODO include a WorkContextLifecycleListener
* @param aWork Work to be wrapped.
* @param aStartTimeout a time duration (in milliseconds) within which the
* execution of the Work instance must start.
* @param execContext an object containing the execution context with which
* the submitted Work instance must be executed.
* @param workListener an object which would be notified when the various
- * @param inflowContextHandlers InflowContextHandlers supported by this work manager
- * @throws javax.resource.spi.work.WorkRejectedException if executionContext supplied yet Work implements InflowContextProvider
+ * @param workContextHandlers WorkContextHandlers supported by this work manager
+ * @throws javax.resource.spi.work.WorkRejectedException if executionContext supplied yet Work implements WorkContextProvider
*/
public WorkerContext(Work aWork,
long aStartTimeout,
ExecutionContext execContext,
- WorkListener workListener, Collection<InflowContextHandler> inflowContextHandlers) throws WorkRejectedException {
+ WorkListener workListener, Collection<WorkContextHandler> workContextHandlers) throws WorkRejectedException {
adaptee = aWork;
startTimeOut = aStartTimeout;
if (null == workListener) {
@@ -163,15 +163,15 @@
} else {
this.workListener = workListener;
}
- if (aWork instanceof InflowContextProvider) {
+ if (aWork instanceof WorkContextProvider) {
if (execContext != null) {
- throw new WorkRejectedException("Execution context provided but Work implements InflowContextProvider");
+ throw new WorkRejectedException("Execution context provided but Work implements WorkContextProvider");
}
executionContext = null;
} else {
executionContext = execContext;
}
- this.inflowContextHandlers = new ArrayList<InflowContextHandler>(inflowContextHandlers);
+ this.workContextHandlers = new ArrayList<WorkContextHandler>(workContextHandlers);
}
/* (non-Javadoc)
@@ -305,59 +305,59 @@
//Implementation note: we assume this is being called without an interesting TransactionContext,
//and ignore/replace whatever is associated with the current thread.
try {
- List<InflowContext> inflowContexts = NO_INFLOW_CONTEXT;
+ List<WorkContext> workContexts = NO_INFLOW_CONTEXT;
if (executionContext != null) {
- TransactionInflowContext txInflowContext = new TransactionInflowContext();
+ TransactionContext txWorkContext = new TransactionContext();
try {
- txInflowContext.setTransactionTimeout(executionContext.getTransactionTimeout());
+ txWorkContext.setTransactionTimeout(executionContext.getTransactionTimeout());
} catch (NotSupportedException e) {
throw new WorkRejectedException("Could not read tx timeout");
}
- inflowContexts = Collections.<InflowContext>singletonList(txInflowContext);
- } else if (adaptee instanceof InflowContextProvider) {
- inflowContexts = ((InflowContextProvider) adaptee).getInflowContexts();
+ workContexts = Collections.<WorkContext>singletonList(txWorkContext);
+ } else if (adaptee instanceof WorkContextProvider) {
+ workContexts = ((WorkContextProvider) adaptee).getWorkContexts();
}
- List<InflowContextHandler> sortedHandlers = new ArrayList<InflowContextHandler>(inflowContexts.size());
- for (InflowContext inflowContext : inflowContexts) {
+ List<WorkContextHandler> sortedHandlers = new ArrayList<WorkContextHandler>(workContexts.size());
+ for (WorkContext workContext : workContexts) {
boolean found = false;
- for (Iterator<InflowContextHandler> it = inflowContextHandlers.iterator(); it.hasNext();) {
- InflowContextHandler inflowContextHandler = it.next();
+ for (Iterator<WorkContextHandler> it = workContextHandlers.iterator(); it.hasNext();) {
+ WorkContextHandler workContextHandler = it.next();
//TODO is this the right way around?
- if (inflowContext.getClass().isAssignableFrom(inflowContextHandler.getHandledClass())) {
+ if (workContext.getClass().isAssignableFrom(workContextHandler.getHandledClass())) {
it.remove();
- sortedHandlers.add(inflowContextHandler);
+ sortedHandlers.add(workContextHandler);
found = true;
break;
}
}
if (!found) {
- throw new WorkCompletedException("Duplicate or unhandled InflowContext: " + inflowContext);
+ throw new WorkCompletedException("Duplicate or unhandled WorkContext: " + workContext);
}
}
- for (Iterator<InflowContextHandler> it = inflowContextHandlers.iterator(); it.hasNext();) {
- InflowContextHandler inflowContextHandler = it.next();
- if (!inflowContextHandler.required()) {
+ for (Iterator<WorkContextHandler> it = workContextHandlers.iterator(); it.hasNext();) {
+ WorkContextHandler workContextHandler = it.next();
+ if (!workContextHandler.required()) {
it.remove();
}
}
- // TODO use a InflowContextLifecycleListener
+ // TODO use a WorkContextLifecycleListener
int i = 0;
- for (InflowContext inflowContext : inflowContexts) {
- sortedHandlers.get(i++).before(inflowContext);
+ for (WorkContext workContext : workContexts) {
+ sortedHandlers.get(i++).before(workContext);
}
- for (InflowContextHandler inflowContextHandler: inflowContextHandlers) {
- inflowContextHandler.before(null);
+ for (WorkContextHandler workContextHandler: workContextHandlers) {
+ workContextHandler.before(null);
}
try {
adaptee.run();
} finally {
int j = 0;
- for (InflowContext inflowContext : inflowContexts) {
- sortedHandlers.get(j++).after(inflowContext);
+ for (WorkContext workContext : workContexts) {
+ sortedHandlers.get(j++).after(workContext);
}
- for (InflowContextHandler inflowContextHandler: inflowContextHandlers) {
- inflowContextHandler.after(null);
+ for (WorkContextHandler workContextHandler: workContextHandlers) {
+ workContextHandler.after(null);
}
}
diff --git a/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java b/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java
index fc1446d..084f26e 100644
--- a/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java
+++ b/geronimo-connector/src/test/java/org/apache/geronimo/connector/BootstrapContextTest.java
@@ -31,8 +31,8 @@
import junit.framework.TestCase;
import org.apache.geronimo.connector.work.GeronimoWorkManager;
-import org.apache.geronimo.connector.work.TransactionInflowContextHandler;
-import org.apache.geronimo.connector.work.InflowContextHandler;
+import org.apache.geronimo.connector.work.TransactionContextHandler;
+import org.apache.geronimo.connector.work.WorkContextHandler;
import org.apache.geronimo.transaction.manager.GeronimoTransactionManager;
import org.apache.geronimo.transaction.manager.XAWork;
@@ -97,8 +97,8 @@
*/
public void testGetSetWorkManager() throws Exception {
GeronimoTransactionManager transactionManager = new GeronimoTransactionManager();
- TransactionInflowContextHandler txInflowContextHandler = new TransactionInflowContextHandler(transactionManager);
- GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, Collections.<InflowContextHandler>singletonList(txInflowContextHandler));
+ TransactionContextHandler txWorkContextHandler = new TransactionContextHandler(transactionManager);
+ GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, Collections.<WorkContextHandler>singletonList(txWorkContextHandler));
GeronimoBootstrapContext context = new GeronimoBootstrapContext(manager, transactionManager);
WorkManager wm = context.getWorkManager();
@@ -110,8 +110,8 @@
*/
public void testGetSetXATerminator() throws Exception {
GeronimoTransactionManager transactionManager = new GeronimoTransactionManager();
- TransactionInflowContextHandler txInflowContextHandler = new TransactionInflowContextHandler(transactionManager);
- GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, Collections.<InflowContextHandler>singletonList(txInflowContextHandler));
+ TransactionContextHandler txWorkContextHandler = new TransactionContextHandler(transactionManager);
+ GeronimoWorkManager manager = new GeronimoWorkManager(pool, pool, pool, Collections.<WorkContextHandler>singletonList(txWorkContextHandler));
GeronimoBootstrapContext context = new GeronimoBootstrapContext(manager, transactionManager);
XATerminator xat = context.getXATerminator();
diff --git a/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java b/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
index 258f737..e7e63cd 100644
--- a/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
+++ b/geronimo-connector/src/test/java/org/apache/geronimo/connector/work/PooledWorkManagerTest.java
@@ -52,7 +52,7 @@
super.setUp();
XAWork xaWork = new GeronimoTransactionManager();
- TransactionInflowContextHandler txInflowContextHandler = new TransactionInflowContextHandler(xaWork);
+ TransactionContextHandler txWorkContextHandler = new TransactionContextHandler(xaWork);
int poolSize = 1;
int keepAliveTime = 30000;
ThreadPoolExecutor pool = new ThreadPoolExecutor(
@@ -65,7 +65,7 @@
pool.setThreadFactory(new ThreadPoolThreadFactory("Connector Test", getClass().getClassLoader()));
- workManager = new GeronimoWorkManager(pool, pool, pool, Collections.<InflowContextHandler>singletonList(txInflowContextHandler));
+ workManager = new GeronimoWorkManager(pool, pool, pool, Collections.<WorkContextHandler>singletonList(txWorkContextHandler));
workManager.doStart();
}