Does the kernel make a distinction between undeploy and shutdown with serialized attachments? IMO, undeploy deletes the DeploymentContext's serialized attachments, while shutdown does not.
We really need this distinction for unit testing where the same jar name might be deployed numerous times and yet be entirely different internally.
Its not a kernel notion. Its a combined usage of the MainDeployer and ProfileService. shutdown is MainDeployer.removeDeploymentContext(DeploymentContext). Undeployming is Profile.removeDeployment().