You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2016/09/11 14:47:22 UTC
tomee git commit: TOMEE-1778 close the howl tx log if there
Repository: tomee
Updated Branches:
refs/heads/master 4319dac5d -> 6e28335ad
TOMEE-1778 close the howl tx log if there
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/6e28335a
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/6e28335a
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/6e28335a
Branch: refs/heads/master
Commit: 6e28335ad4d70720c65d212641b70d3c6770da96
Parents: 4319dac
Author: Romain manni-Bucau <rm...@gmail.com>
Authored: Sun Sep 11 16:46:54 2016 +0200
Committer: Romain manni-Bucau <rm...@gmail.com>
Committed: Sun Sep 11 16:46:54 2016 +0200
----------------------------------------------------------------------
.../resource/GeronimoTransactionManagerFactory.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/6e28335a/container/openejb-core/src/main/java/org/apache/openejb/resource/GeronimoTransactionManagerFactory.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/resource/GeronimoTransactionManagerFactory.java b/container/openejb-core/src/main/java/org/apache/openejb/resource/GeronimoTransactionManagerFactory.java
index 5facdd4..081d0e2 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/resource/GeronimoTransactionManagerFactory.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/resource/GeronimoTransactionManagerFactory.java
@@ -36,6 +36,8 @@ import org.apache.openejb.loader.SystemInstance;
import org.apache.openejb.monitoring.LocalMBeanServer;
import org.apache.openejb.monitoring.ObjectNameBuilder;
import org.apache.openejb.util.Duration;
+import org.apache.openejb.util.LogCategory;
+import org.apache.openejb.util.Logger;
import javax.transaction.xa.XAException;
import javax.transaction.xa.XAResource;
@@ -119,8 +121,11 @@ public class GeronimoTransactionManagerFactory {
}
public static class DestroyableTransactionManager extends GeronimoTransactionManager implements DestroyableResource {
+ private final TransactionLog txLog;
+
public DestroyableTransactionManager(final int defaultTransactionTimeoutSeconds, final XidFactory xidFactory, final TransactionLog transactionLog) throws XAException {
super(defaultTransactionTimeoutSeconds, xidFactory, transactionLog);
+ this.txLog = transactionLog;
}
@Override
@@ -139,6 +144,13 @@ public class GeronimoTransactionManagerFactory {
} catch (final Throwable notImportant) {
// no-op
}
+ if (txLog != null) {
+ try {
+ HOWLLog.class.cast(txLog).doStop();
+ } catch (final Throwable /*Exception + NoClassDefFoundError*/ e) {
+ Logger.getInstance(LogCategory.OPENEJB, DestroyableTransactionManager.class).error(e.getMessage(), e);
+ }
+ }
}
}