boolean persistent = message.isPersistent();
// shared object service
ISharedObjectService sharedObjectService = (ISharedObjectService) ScopeUtils.getScopeService(scope, ISharedObjectService.class, SharedObjectService.class, false);
if (!sharedObjectService.hasSharedObject(scope, name)) {
log.debug("Shared object service doesnt have requested object, creation will be attempted");
ISharedObjectSecurityService security = (ISharedObjectSecurityService) ScopeUtils.getScopeService(scope, ISharedObjectSecurityService.class);
if (security != null) {
// Check handlers to see if creation is allowed
for (ISharedObjectSecurity handler : security.getSharedObjectSecurity()) {
if (!handler.isCreationAllowed(scope, name, persistent)) {
log.debug("Shared object create failed, creation is not allowed");
sendSOCreationFailed(conn, message);
return;
}