Fixes to subsystems for clean shutdown

- FTPConfigSection / CIFSConfigSection now aware of whether they constructed the authenticator themselves
- AbstractTriggerBean doesn't try to unschedule a trigger if the scheduler is already shut down
- RuntimeExecBootstrapBean can cope with running in a subsystem and shutting down without the VM shutting down
- DefaultManagedApplicationContextFactory will start up the application context it is proxying to if it has not already been started

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13846 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2009-04-06 11:42:03 +00:00
parent a51ebd0441
commit e28632de9e
3 changed files with 28 additions and 4 deletions

View File

@@ -54,6 +54,7 @@ import org.alfresco.service.cmr.security.PersonService;
import org.alfresco.service.transaction.TransactionService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.DisposableBean;
/**
* CIFS Authenticator Base Class
@@ -63,7 +64,7 @@ import org.apache.commons.logging.LogFactory;
*
* @author gkspencer
*/
public abstract class CifsAuthenticatorBase extends CifsAuthenticator
public abstract class CifsAuthenticatorBase extends CifsAuthenticator implements DisposableBean
{
// Logging
@@ -521,4 +522,12 @@ public abstract class CifsAuthenticatorBase extends CifsAuthenticator
return txService.getUserTransaction( txService.isReadOnly() ? true : false);
}
/**
* Handle tidy up on container shutdown
*/
public void destroy() throws Exception
{
closeAuthenticator();
}
}

View File

@@ -41,12 +41,13 @@ import org.alfresco.service.cmr.security.AuthorityService;
import org.alfresco.service.transaction.TransactionService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.DisposableBean;
/**
*
* @author gkspencer
*/
public abstract class FTPAuthenticatorBase implements FTPAuthenticator {
public abstract class FTPAuthenticatorBase implements FTPAuthenticator, DisposableBean {
// Logging
@@ -249,4 +250,14 @@ public abstract class FTPAuthenticatorBase implements FTPAuthenticator {
return txService.getUserTransaction( txService.isReadOnly() ? true : false);
}
/**
* Handle tidy up on container shutdown
*/
public void destroy()
{
closeAuthenticator();
}
}