// Disable hotdeployment scanning
for(ProfileKey key : profileService.getActiveProfileKeys())
{
try
{
Profile profile = profileService.getActiveProfile(key);
if(profile.isMutable() && profile instanceof MutableProfile)
((MutableProfile) profile).enableModifiedDeploymentChecks(false);
}
catch(NoSuchProfileException ignore) { }
}
// Deactivate the root profile
try
{
// Release
profileService.deactivateProfile(profileKey);
}
catch(Throwable t)
{
log.warn("Error deactivating profile: " + this.profileKey, t);
}
try
{
// Unregister
Profile profile = profileService.getProfile(profileKey);
profileService.unregisterProfile(profileKey);
}
catch(Throwable t)
{
log.warn("Error unregistering profile: " + this.profileKey, t);