aboutsummaryrefslogtreecommitdiffstats
path: root/archiva-cli/src
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2014-07-30 13:11:23 +1000
committerBrett Porter <brett@apache.org>2014-07-30 13:11:23 +1000
commite7663d04db01ada3f3b87660b6ec49701fe3a750 (patch)
treebedbf586ebb7013aadae3ecf129b9d31a6330e9e /archiva-cli/src
parent352b8f61c9eff518be56a672750d3c10c5268ae2 (diff)
downloadarchiva-e7663d04db01ada3f3b87660b6ec49701fe3a750.tar.gz
archiva-e7663d04db01ada3f3b87660b6ec49701fe3a750.zip
destroy context on close
Diffstat (limited to 'archiva-cli/src')
-rw-r--r--archiva-cli/src/main/java/org/apache/archiva/cli/ArchivaCli.java15
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 )