Skip to content

Commit

Permalink
I use close instead of stop to properly destroy the context
Browse files Browse the repository at this point in the history
  • Loading branch information
managea committed Aug 31, 2013
1 parent 9f3b0f7 commit 65df45c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/Global.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand Down Expand Up @@ -51,7 +50,7 @@ public void onStart(final Application app) {
@Override
public void onStop(final Application app) {
// This will call any destruction lifecycle methods and then release the beans e.g. @PreDestroy
ctx.stop();
ctx.close();

super.onStop(app);
}
Expand Down

0 comments on commit 65df45c

Please sign in to comment.