diff options
author | Brett Porter <brett@apache.org> | 2014-07-30 13:11:23 +1000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2014-07-30 13:11:23 +1000 |
commit | e7663d04db01ada3f3b87660b6ec49701fe3a750 (patch) | |
tree | bedbf586ebb7013aadae3ecf129b9d31a6330e9e /archiva-cli | |
parent | 352b8f61c9eff518be56a672750d3c10c5268ae2 (diff) | |
download | archiva-e7663d04db01ada3f3b87660b6ec49701fe3a750.tar.gz archiva-e7663d04db01ada3f3b87660b6ec49701fe3a750.zip |
destroy context on close
Diffstat (limited to 'archiva-cli')
-rw-r--r-- | archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java index 102f4bfe8..4bb426a62 100644 --- a/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java +++ b/archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java @@ -110,7 +110,20 @@ public class ArchivaCli return; } - new ArchivaCli().execute( command ); + ArchivaCli cli = new ArchivaCli(); + try + { + cli.execute( command ); + } + finally + { + cli.destroy(); + } + } + + private void destroy() + { + applicationContext.destroy(); } private void execute( Commands command ) |