mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-22 15:12:38 +00:00
ACE-5052: close spring application context in FTPServerBean
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.1.N/root@125587 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user