Skip to content

Commit

Permalink
BZ-1036761 - It is not possible to restore a ksession on Oracle11gR2 …
Browse files Browse the repository at this point in the history
…due to RuntimeException: Unable to begin transaction

(cherry picked from commit f67a81b)
  • Loading branch information
mswiderski committed Dec 16, 2013
1 parent 8d74b37 commit 8d22332
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
Expand Up @@ -21,6 +21,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;

Expand Down Expand Up @@ -64,7 +65,20 @@ public ThreadPoolSchedulerService(int poolSize) {
public void initScheduler(TimerService globalTimerService) {
this.globalTimerService = globalTimerService;

this.scheduler = new ScheduledThreadPoolExecutor(poolSize);
this.scheduler = new ScheduledThreadPoolExecutor(poolSize, new ThreadFactory() {

@Override
public Thread newThread(Runnable runnable) {

return new Thread(runnable) {

@Override
public void interrupt() {
// do nothing to not impact parts like transaction log in bitronix
}
};
}
});
}

@Override
Expand Down
Expand Up @@ -190,6 +190,7 @@ public void setUp() throws Exception {
@After
public void tearDown() throws Exception {
clearHistory();
disposeRuntimeManager();
if (setupDataSource) {
if (emf != null) {
emf.close();
Expand All @@ -199,8 +200,7 @@ public void tearDown() throws Exception {
ds.close();
ds = null;
}
}
disposeRuntimeManager();
}
}

/**
Expand Down

0 comments on commit 8d22332

Please sign in to comment.