JDO PersistenceManager synchronization performs close attempt after completion (if necessary; SPR-8846)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -323,6 +323,11 @@ public abstract class PersistenceManagerFactoryUtils {
|
||||
return this.newPersistenceManager;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean shouldReleaseAfterCompletion(PersistenceManagerHolder resourceHolder) {
|
||||
return !resourceHolder.getPersistenceManager().isClosed();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void releaseResource(PersistenceManagerHolder resourceHolder, PersistenceManagerFactory resourceKey) {
|
||||
releasePersistenceManager(resourceHolder.getPersistenceManager(), resourceKey);
|
||||
|
||||
Reference in New Issue
Block a user