public ProfileServiceUtils( boolean secured ) throws NamingException
{
this.secured = secured;
SecuredProfileServiceAccess jaasUtils = null;
jaasUtils = secured ? SecuredProfileServiceAccess.getSecuredInstance() : SecuredProfileServiceAccess.getUnsecuredInstance();
// NPE will occur here if exception happens above.
// TODO: Move ejtt's members initialization to some init() method to avoid this nasty thing.
this.profileService = jaasUtils.getProfileService();
this.managementView = jaasUtils.getManagementView();
this.deploymentManager = jaasUtils.getDeploymentManager();
}