diff --git a/source/java/org/alfresco/util/schemacomp/DbToXML.java b/source/java/org/alfresco/util/schemacomp/DbToXML.java index 4bbdc30070..f801cbcda0 100644 --- a/source/java/org/alfresco/util/schemacomp/DbToXML.java +++ b/source/java/org/alfresco/util/schemacomp/DbToXML.java @@ -93,8 +93,14 @@ public class DbToXML } String contextPath = args[0]; File outputFile = new File(args[1]); - ApplicationContext context = new FileSystemXmlApplicationContext(contextPath); + + // Create the Spring context + FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext(contextPath); DbToXML dbToXML = new DbToXML(context, outputFile); + dbToXML.execute(); + + // Shutdown the Spring context + context.close(); } }