/**
* Unregisters the profile registered in {@link #start()}.
*/
public void stop() throws Exception
{
ProfileService profSvc = getProfileService();
ProfileKey profKey = getProfileKey();
if (profSvc != null && profKey != null)
{
try
{
// Inactivate first if needed
if (profSvc.getActiveProfileKeys().contains(profKey))
{
releaseProfile();
}
profSvc.unregisterProfile(profKey);
}
catch (NoSuchProfileException e)
{
log.warn("Could not unregister unknown profile " + profKey);
}