Merged 5.2.N (5.2.1) to HEAD (5.2)

125772 rmunteanu: Merged 5.1.N (5.1.2) to 5.2.N (5.2.1)
      125587 mward: ACE-5052: close spring application context in FTPServerBean


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@127799 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2016-06-03 16:11:36 +00:00
parent 4ca7800805
commit c89f1f5315

View File

@@ -164,11 +164,12 @@ public class FTPServerBean extends AbstractLifecycleBean
out.println("FTP Server Test");
out.println("---------------");
ClassPathXmlApplicationContext ctx = null;
try
{
// Create the configuration service in the same way that Spring creates it
ApplicationContext ctx = new ClassPathXmlApplicationContext("alfresco/application-context.xml");
ctx = new ClassPathXmlApplicationContext("alfresco/application-context.xml");
// Get the FTP server bean
@@ -227,6 +228,13 @@ public class FTPServerBean extends AbstractLifecycleBean
{
ex.printStackTrace();
}
finally
{
if (ctx != null)
{
ctx.close();
}
}
System.exit(1);
}