Package org.wso2.carbon.mediation.initializer.persistence

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


        }
    }

    private void persistTemplate(Template template) throws AxisFault {
       if (template instanceof Template) {
            MediationPersistenceManager pm = getMediationPersistenceManager();
            pm.saveItem(((Template) template).getName(), ServiceBusConstants.ITEM_TYPE_TEMPLATE_ENDPOINTS);
        }
    }
View Full Code Here


        Resource result = targetRegistry.executeQuery(null, parameters);
        return (String[]) result.getContent();
    }

    private void persistEndpoint(Endpoint ep) throws EndpointAdminException {
        MediationPersistenceManager pm = getMediationPersistenceManager();
        pm.saveItem(ep.getName(), ServiceBusConstants.ITEM_TYPE_ENDPOINT);
    }
View Full Code Here

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

    }
*/

    private void persistTemplate(Mediator template) throws AxisFault {
       if (template instanceof TemplateMediator) {
            MediationPersistenceManager pm = getMediationPersistenceManager();
            pm.saveItem(((TemplateMediator) template).getName(), ServiceBusConstants.ITEM_TYPE_TEMPLATE);
        }
    }
View Full Code Here

                            "persistence worker interval, Using defaults", e);
                }
            }

            // Finally init the persistence manager
            MediationPersistenceManager pm = new MediationPersistenceManager(
                    ServiceBusConstants.DISABLED.equals(regPersistence) ? null : registry,
                    configurationLocation,
                    synCfgConfiguration, intervalInMillis, name);

            try {
View Full Code Here

                            "persistence worker interval, Using defaults", e);
                }
            }

            // Finally init the persistence manager
            MediationPersistenceManager pm = new MediationPersistenceManager(registry,
                    configurationInformation.getSynapseXMLLocation(),
                    synCfgSvc.getSynapseConfiguration(), intervalInMillis, configName);

            configCtxSvc.getServerConfigContext().getAxisConfiguration().addParameter(new Parameter(
                    ServiceBusConstants.PERSISTENCE_MANAGER, pm));
View Full Code Here

                    log.error("Invalid value " + interval + " specified for the mediation " +
                            "persistence worker interval, Using defaults", e);
                }
            }

            MediationPersistenceManager pm = new MediationPersistenceManager(registry,
                    contextInfo.getServerConfigurationInformation().getSynapseXMLLocation(),
                    contextInfo.getSynapseConfiguration(), intervalInMillis, configName);

            configurationContext.getAxisConfiguration().addParameter(
                    new Parameter(ServiceBusConstants.PERSISTENCE_MANAGER, pm));
View Full Code Here

                } else {
                    Entry entry = EntryFactory.createEntry(elem,
                            getSynapseConfiguration().getProperties());
                    entry.setFileName(ServiceBusUtils.generateFileName(entry.getKey()));
                    getSynapseConfiguration().addEntry(entryKey, entry);
                    MediationPersistenceManager pm
                            = ServiceBusUtils.getMediationPersistenceManager(getAxisConfig());
                    pm.saveItem(entry.getKey(), ServiceBusConstants.ITEM_TYPE_ENTRY);
                }
                if (log.isDebugEnabled()) {
                    log.debug("Local registry entry : " + entryKey + " added to the configuration");
                }
                return true;
View Full Code Here

                    getSynapseConfiguration().removeEntry(key);
                    Entry entry = EntryFactory.createEntry(elem,
                            getSynapseConfiguration().getProperties());
                    getSynapseConfiguration().addEntry(key, entry);
                    entry.setFileName(oldEntry.getFileName());
                    MediationPersistenceManager pm
                            = ServiceBusUtils.getMediationPersistenceManager(getAxisConfig());
                    pm.saveItem(key, ServiceBusConstants.ITEM_TYPE_ENTRY);

                    if (log.isDebugEnabled()) {
                        log.debug("Added local entry : " + key + " into the configuration");
                    }
                }
View Full Code Here

            entryKey = entryKey.trim();
            SynapseConfiguration synapseConfiguration = getSynapseConfiguration();
            Entry entry = synapseConfiguration.getDefinedEntries().get(entryKey);
            if (entry != null) {
                synapseConfiguration.removeEntry(entryKey);
                MediationPersistenceManager pm
                            = ServiceBusUtils.getMediationPersistenceManager(getAxisConfig());
                pm.deleteItem(entryKey, entry.getFileName(), ServiceBusConstants.ITEM_TYPE_ENTRY);
                if (log.isDebugEnabled()) {
                    log.debug("Deleted local entry with key : " + entryKey);
                }
                return true;
            } else {
View Full Code Here

TOP

Related Classes of org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager$PersistenceRequest

Copyright © 2018 www.massapicom. 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.