cancel
Showing results for 
Search instead for 
Did you mean: 

How to execute a set of statements when the alfresco is shutting down

somil
Champ in-the-making
Champ in-the-making
Hi,
I have a use case where I have to update a db table when my alfresco is shutting down. is there any method using which we can do that? or if we can have some trigger which in alfresco which could start up a job which would do that.
4 REPLIES 4

sujaypillai
Confirmed Champ
Confirmed Champ
Hi,

Are you trying to connect to the same DB on which Alfresco listens?

Here is a wiki page for reference - https://wiki.alfresco.com/wiki/Shutdown_Implementation

somil
Champ in-the-making
Champ in-the-making
Hi Sujay,
This is now an obselete class. This is not present in the alfresco version 4.2.

mrogers
Star Contributor
Star Contributor
Yes you can write an event handler for shutdown.   Most event handlers for alfresco are for startup, but there are shutdown handlers too,  they work in the same way.

somil
Champ in-the-making
Champ in-the-making
Hey Mrogers,
Thanks for the advice. Is there any documentation for writing such handlers in alfresco and registering them in the context.