polishing

This commit is contained in:
Juergen Hoeller
2011-08-12 10:03:28 +00:00
parent 8f01770f29
commit da36c2b8b8
2 changed files with 3 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ public abstract class JdoDaoSupport extends DaoSupport {
*/
public final void setPersistenceManagerFactory(PersistenceManagerFactory persistenceManagerFactory) {
if (this.jdoTemplate == null || persistenceManagerFactory != this.jdoTemplate.getPersistenceManagerFactory()) {
this.jdoTemplate = createJdoTemplate(persistenceManagerFactory);
this.jdoTemplate = createJdoTemplate(persistenceManagerFactory);
}
}

View File

@@ -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.
@@ -161,6 +161,7 @@ public class DefaultTransactionStatus extends AbstractTransactionStatus {
* Delegate the flushing to the transaction object,
* provided that the latter implements the {@link SmartTransactionObject} interface.
*/
@Override
public void flush() {
if (this.transaction instanceof SmartTransactionObject) {
((SmartTransactionObject) this.transaction).flush();