Examples of saveItem()


Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.saveItem()

    public static void shutDown() {
    }

    private static void persistStartup(Startup startup, AxisConfiguration axisCfg) {
        MediationPersistenceManager pm = ServiceBusUtils.getMediationPersistenceManager(axisCfg);
        pm.saveItem(startup.getName(), ServiceBusConstants.ITEM_TYPE_TASK);
    }

    private static void handleException(String msg) {
        log.error(msg);
        throw new IllegalArgumentException(msg);
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.saveItem()

        if (param != null && Boolean.parseBoolean((String) param.getValue())) {
            return;
        }
        MediationPersistenceManager mpm = getMediationPersistenceManager();
        if (mpm != null) {
            mpm.saveItem(proxyName, ServiceBusConstants.ITEM_TYPE_PROXY_SERVICE);
        }
    }

    private MediationPersistenceManager getMediationPersistenceManager() {
        Parameter p = synapseConfig.getAxisConfiguration().getParameter(
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.saveItem()

                String fileName = ServiceBusUtils.generateFileName(messageStore.getName());
                messageStore.setFileName(fileName);
                messageStore.init(getSynapseEnvironment());
                synapseConfiguration.addMessageStore(messageStore.getName(), messageStore);
                MediationPersistenceManager mp = getMediationPersistenceManager();
                mp.saveItem(messageStore.getName(), ServiceBusConstants.ITEM_TYPE_MESSAGE_STORE);
            } else {
                String message = "Unable to create Message Store ";
                handleException(log, message, null);
            }
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.saveItem()

                String fileName = oldMessageStore.getFileName();
                messageStore.setFileName(fileName);
                messageStore.init(getSynapseEnvironment());
                configuration.addMessageStore(messageStore.getName(),messageStore);
                MediationPersistenceManager mp = getMediationPersistenceManager();
                mp.saveItem(messageStore.getName(),ServiceBusConstants.ITEM_TYPE_MESSAGE_STORE);
            } else {
                assert false;
                String message = "Unexpected Error!!! Message store with name "
                        + messageStore.getName() + " does not exist";
                handleException(log,message,null);
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.saveItem()

        return null;
    }

    private void persistSequence(SequenceMediator sequence) throws SequenceEditorException {
        MediationPersistenceManager pm = getMediationPersistenceManager();
        pm.saveItem(sequence.getName(), ServiceBusConstants.ITEM_TYPE_SEQUENCE);
    }
}
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.saveItem()

    }

    private void persistEventSource(SynapseEventSource eventsource)
            throws EventSourceAdminException {
        MediationPersistenceManager pm = getMediationPersistenceManager();
        pm.saveItem(eventsource.getName(), ServiceBusConstants.ITEM_TYPE_EVENT_SRC);
    }
}
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.saveItem()

                            true, new Properties());
            ex.setFileName(ServiceBusUtils.generateFileName(ex.getName()));
            ex.init();
            config.addPriorityExecutor(name, ex);
            MediationPersistenceManager pm = getMediationPersistenceManager();
            pm.saveItem(name, ServiceBusConstants.ITEM_TYPE_EXECUTOR);
            log.info("Adding priority-executor with name: " + name);
        } catch (AxisFault axisFault) {
            log.error("Error occured while building a priority executor from " +
                    "the configuration element" + axisFault.getMessage());
            throw axisFault;
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.saveItem()

    }

    private void persistProxyService(ProxyService proxy) throws ProxyAdminException {
        MediationPersistenceManager pm = getMediationPersistenceManager();
        if (pm != null) {
            pm.saveItem(proxy.getName(), ServiceBusConstants.ITEM_TYPE_PROXY_SERVICE);
        }
    }


View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.saveItem()

                    (UserRegistry) getConfigSystemRegistry());
            updater.update(configElement);

            MediationPersistenceManager pm = getMediationPersistenceManager();
            if (pm != null) {
                pm.saveItem(null, ServiceBusConstants.ITEM_TYPE_FULL_CONFIG);
            }

        } catch (Exception e) {
            handleException("Error while updating the Synapse configuration", e);
        } finally {
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager.saveItem()

        synapseConfig.addSequence(seq.getName(), seq);
        synapseConfig.addEndpoint(endpoint.getName(), endpoint);
        synapseConfig.addProxyService(proxy.getName(), proxy);

        MediationPersistenceManager pm = getMediationPersistenceManager();
        pm.saveItem(seq.getName(), ServiceBusConstants.ITEM_TYPE_SEQUENCE);
        pm.saveItem(endpoint.getName(), ServiceBusConstants.ITEM_TYPE_ENDPOINT);
        pm.saveItem(proxy.getName(), ServiceBusConstants.ITEM_TYPE_PROXY_SERVICE);

        hold();
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.