Examples of MediationPersistenceManager


Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager

            String fileName = null;
            if (st instanceof AbstractStartup) {
                fileName = st.getFileName();
            }
            synapseConfiguration.removeStartup(name);
            MediationPersistenceManager pm = ServiceBusUtils.getMediationPersistenceManager(
                    synapseConfiguration.getAxisConfiguration());
            pm.deleteItem(name, fileName, ServiceBusConstants.ITEM_TYPE_TASK);

        } else {
            log.warn("Cannot delete the startup named " + name
                    + ", it doesn't exists in the SynapseConfiguration");
        }
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager

    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);
    }
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager

            if (!keepHistory) {
                ProxyService proxySvc = synapseConfig.getProxyService(axisService.getName());
                if (proxySvc != null) {
                    synapseConfig.removeProxyService(axisService.getName());
                    MediationPersistenceManager pm = getMediationPersistenceManager();
                    pm.deleteItem(proxySvc.getName(), proxySvc.getFileName(),
                            ServiceBusConstants.ITEM_TYPE_PROXY_SERVICE);
                    log.info("Deleted the proxy service : " + proxySvc.getName());

                } else if (log.isDebugEnabled()) {
                    log.debug("Proxy Service representing the service " + axisService.getName()
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager

    private void persistChanges(String proxyName, AxisConfiguration axisConfiguration) {
        Parameter param = axisConfiguration.getParameter(ServiceBusConstants.SUSPEND_PERSISTENCE);
        if (param != null && Boolean.parseBoolean((String) param.getValue())) {
            return;
        }
        MediationPersistenceManager mpm = getMediationPersistenceManager();
        if (mpm != null) {
            mpm.saveItem(proxyName, ServiceBusConstants.ITEM_TYPE_PROXY_SERVICE);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager

                SynapseConfiguration synapseConfiguration = getSynapseConfiguration();
                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

                // then we startup the new.
                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

            MessageStore removedMessageStore = configuration.getMessageStore(name);
            configuration.removeMessageStore(name);
            String fileName = removedMessageStore.getFileName();
            removedMessageStore.destroy();

            MediationPersistenceManager pm = getMediationPersistenceManager();
            pm.deleteItem(removedMessageStore.getName(),
                    fileName,ServiceBusConstants.ITEM_TYPE_MESSAGE_STORE);

        } else {
            handleException(log, "Message Store " + name + " does not exist", null);
        }
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager

            lock.lock();
            SynapseConfiguration synCfg = getSynapseConfiguration();
            SequenceMediator sequence = synCfg.getDefinedSequences().get(sequenceName);
            if (sequence != null) {
                synCfg.removeSequence(sequenceName);
                MediationPersistenceManager pm = getMediationPersistenceManager();
                pm.deleteItem(sequenceName, sequence.getFileName(),
                        ServiceBusConstants.ITEM_TYPE_SEQUENCE);
            } else {
                handleException("No defined sequence with name " + sequenceName
                        + " found to delete in the Synapse configuration");
            }
View Full Code Here

Examples of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager

        }
        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

            lock.lock();
            SynapseConfiguration synapseConfiguration = getSynapseConfiguration();
            SynapseEventSource eventSource = synapseConfiguration.getEventSource(eventsourceName);
            if (eventSource != null) {
                synapseConfiguration.removeEventSource(eventsourceName);
                MediationPersistenceManager pm = getMediationPersistenceManager();
                pm.deleteItem(eventsourceName, eventSource.getFileName(),
                        ServiceBusConstants.ITEM_TYPE_EVENT_SRC);
            } else {
                log.warn("No event source exists by the name : " + eventsourceName);
            }
        } catch (Exception e) {
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.