Skip to content

Commit 50f5b13

Browse files
committedMay 24, 2017
convert comment to method name
1 parent b9e0176 commit 50f5b13

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed
 

‎framework/src/play/db/jpa/JPAPlugin.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -263,15 +263,18 @@ public static String getDefaultDialect(Configuration dbConfig, String driver) {
263263

264264
@Override
265265
public void onApplicationStop() {
266-
// Close all presistence units
267-
for(EntityManagerFactory emf: JPA.emfs.values()) {
268-
if(emf.isOpen()){
266+
closeAllPersistenceUnits();
267+
}
268+
269+
private void closeAllPersistenceUnits() {
270+
for (EntityManagerFactory emf : JPA.emfs.values()) {
271+
if (emf.isOpen()) {
269272
emf.close();
270273
}
271274
}
272-
JPA.emfs.clear();
275+
JPA.emfs.clear();
273276
}
274-
277+
275278
@Override
276279
public void afterFixtureLoad() {
277280
if (JPA.isEnabled()) {

0 commit comments

Comments
 (0)