Package org.wso2.carbon.registry.core

Examples of org.wso2.carbon.registry.core.CollectionImpl.discard()


                                    "group [" + axisServiceGroup.getServiceGroupName() + "]" +
                                    getTenantIdAndDomainString();
                            log.error(msg, e);
                        }
                    }
                    serviceGroup.discard();
                }
            } else if (eventType == AxisEvent.SERVICE_REMOVE) {
                Parameter svcHistoryParam = axisServiceGroup.getParameter(
                        CarbonConstants.KEEP_SERVICE_HISTORY_PARAM);
                if (svcHistoryParam == null || svcHistoryParam.getValue() == null ||
View Full Code Here


                        }
                    }
                }

                if (service != null) {
                    service.discard();
                }

            } catch (Axis2ModuleNotFound e) {
                addFaultyServiceDueToModule(e.getModuleName(), axisService);
                stopService(axisService, axisService.getAxisConfiguration());
View Full Code Here

                        pf.getModulePM().handleExistingModuleInit(module, axisModule);
                    } catch (Exception e) {
                        log.error("Could not handle initialization of existing module" +
                                getTenantIdAndDomainString(), e);
                    }
                    module.discard();
                } else { // this is a new module which has not been registered in the DB yet
                    try {
                        pf.getModulePM().handleNewModuleAddition(axisModule, moduleName,
                                moduleVersion);
                    } catch (Exception e) {
View Full Code Here

                        // don't overide the param if it alread exists and locked..
                        if (!(p != null && p.isLocked())) {
                            axisModule.addParameter(parameter);
                        }
                    }
                    resource.discard();
                }
                parameters.discard();
            }
            axisModule.getPolicySubject().clear();
View Full Code Here

                    Resource resource = configRegistry.get(policyResource);
                    if (!(resource instanceof Collection)) {
                        Policy policy = PolicyEngine.getPolicy(resource.getContentStream());
                        axisModule.getPolicySubject().attachPolicy(policy);
                    }
                    resource.discard();
                }
                policies.discard();
            }

            PersistenceUtils.handleGlobalParams(axisModule, moduleResource);
View Full Code Here

        if (configRegistry.resourceExists(resourcePath)) {
            Resource resource = configRegistry.get(resourcePath);
            resource.setProperty(RegistryResources.ModuleProperties.GLOBALLY_ENGAGED,
                    String.valueOf(engage));
            configRegistry.put(resourcePath, resource);
            resource.discard();
        } else {
            handleException("Trying to engage or disengage unavailable module " + module.getName());
        }
        configRegistry.commitTransaction();
    }
View Full Code Here

        resource.setProperty("bundleContext-root", contextRoot);
        String requestIP =
                org.apache.axis2.util.Utils.getIpAddress(serverConfigContext.getAxisConfiguration());
        resource.setProperty("host-name", requestIP);
        registry.put(RegistryResources.CONNECTION_PROPS, resource);
        resource.discard();
    }

    public void stopListenerManager() throws AxisFault {
        try {
            ListenerManager listenerManager = dataHolder.getListenerManager();
View Full Code Here

        Registry registry = getRegistry(request);
        Resource resource = registry.get(path);
        resource.setContent(textContent);
        registry.put(path, resource);
        resource.discard();

        return false;
    }

    public boolean processNewContent(
View Full Code Here

            configRegistry.beginTransaction();
            if (configRegistry.resourceExists(serviceResourcePath)) {
                Resource serviceResource = configRegistry.get(serviceResourcePath);
                serviceResource.setProperty(propertyName, propertyValue);
                configRegistry.put(serviceResourcePath, serviceResource);
                serviceResource.discard();
            }
            configRegistry.commitTransaction();
        } catch (Throwable e) {
            handleExceptionWithRollback("Unable to set property " + propertyName
                    + " to service group " + serviceGroup.getServiceGroupName(), e);
View Full Code Here

                paramResource.addProperty(RegistryResources.ParameterProperties.NAME, paramName);
                paramResource.addProperty(RegistryResources.ParameterProperties.TYPE, Integer
                        .toString(paramType));
                paramResource.setContent(parameter.getParameterElement().toString());
                configRegistry.put(paramResourcePath, paramResource);
                paramResource.discard();
                configRegistry.commitTransaction();
            }
        }
           
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.