if (jsDomain.isRemote()){
ownerDomainId=defaultDomainId;
}
}
SecurityDomainImpl newDomain = new SecurityDomainImpl();
newDomain.setName(jsDomain.getName());
newDomain.setOwnerDomainId(ownerDomainId);
newDomain.setRemote(jsDomain.isRemote());
newDomain.setEnabled(jsDomain.isEnabled());
try{
domainStorageManager.addDomain(newDomain);
} catch (Exception e){
throw new SerializerException(SerializerException.CREATE_OBJECT_FAILED.create(new String[] { "SecurityDomain",
e.getMessage() }), e);