The only place this exists currently is in the JBoss Bean Deployer.
I was planning that this should go in the yet to be written profile service,
but I don't see why this shouldn't also be in the plain deployer for people that
don't want to use the profile service.
I would think that this should also include an optional registration of a shutdown hook
for when people press ctrl-c, KILL TERM, etc.
The only issue would be that it makes the assumption that there is only one deployer
per kernel or one kernel per JVM, which is something I don't want to assume.