public void eventSourceAdded(SynapseEventSource eventSource) { log.info("Event source : " + eventSource.getName() + " was added " + "to the Synapse configuration successfully"); }
public void eventSourceRemoved(SynapseEventSource eventSource) { log.info("Event source : " + eventSource.getName() + " was removed " + "from the Synapse configuration successfully"); }
public void eventSourceAdded(SynapseEventSource eventSource) { log.info("Event source : " + eventSource.getName() + " was added " + "to the Synapse configuration successfully"); }
public void eventSourceRemoved(SynapseEventSource eventSource) { log.info("Event source : " + eventSource.getName() + " was removed " + "from the Synapse configuration successfully"); }
/** * Undeploys all event sources. * * @throws AxisFault if an error occurs undeploying the event sources. */ private void undeployEventSources() throws AxisFault { log.info("Undeploying EventSources..."); for (SynapseEventSource eventSource : synapseConfiguration.getEventSources()) { configurationContext.getAxisConfiguration().removeService(eventSource.getName()); } }
public void eventSourceAdded(SynapseEventSource eventSource) { tracker.get(EVENT_SRC).add(eventSource.getName()); }
public void eventSourceRemoved(SynapseEventSource eventSource) { tracker.get(EVENT_SRC).remove(eventSource.getName()); }
es.setFileName((new File(fileName)).getName()); if (log.isDebugEnabled()) { log.debug("EventSource named '" + es.getName() + "' has been built from the file " + fileName); if (!existingArtifactName.equals(es.getName())) { log.info("EventSource named " + existingArtifactName + " has been Undeployed"); log.debug("Initialized the EventSource : " + es.getName()); getSynapseConfiguration().addEventSource(es.getName(), es); if (log.isDebugEnabled()) { log.debug("EventSource " + (existingArtifactName.equals(es.getName()) ? "update" : "deployment") + " from file : " + fileName + " : Completed"); log.info("EventSource named '" + es.getName() + "' has been " + (existingArtifactName.equals(es.getName()) ? "update" : "deployed") + " from file : " + fileName); return es.getName(); } else { handleSynapseArtifactDeploymentError("EventSource Update Failed. The artifact " +
/** * Undeploys all event sources. * * @throws AxisFault if an error occurs undeploying the event sources. */ private void undeployEventSources() throws AxisFault { log.info("Undeploying EventSources..."); for (SynapseEventSource eventSource : synapseConfiguration.getEventSources()) { configurationContext.getAxisConfiguration().removeService(eventSource.getName()); } }
es.setFileName((new File(fileName)).getName()); if (log.isDebugEnabled()) { log.debug("EventSource named '" + es.getName() + "' has been built from the file " + fileName); log.debug("Initialized the EventSource : " + es.getName()); getSynapseConfiguration().addEventSource(es.getName(), es); if (log.isDebugEnabled()) { log.debug("EventSource Deployment from file : " + fileName + " : Completed"); log.info("EventSource named '" + es.getName() + "' has been deployed from file : " + fileName); return es.getName(); } else { handleSynapseArtifactDeploymentError("EventSource Deployment Failed. The " +
es.setFileName((new File(fileName)).getName()); if (log.isDebugEnabled()) { log.debug("EventSource named '" + es.getName() + "' has been built from the file " + fileName); if (!existingArtifactName.equals(es.getName())) { log.info("EventSource named " + existingArtifactName + " has been Undeployed"); log.debug("Initialized the EventSource : " + es.getName()); getSynapseConfiguration().addEventSource(es.getName(), es); if (log.isDebugEnabled()) { log.debug("EventSource " + (existingArtifactName.equals(es.getName()) ? "update" : "deployment") + " from file : " + fileName + " : Completed"); log.info("EventSource named '" + es.getName() + "' has been " + (existingArtifactName.equals(es.getName()) ? "update" : "deployed") + " from file : " + fileName); return es.getName(); } else { handleSynapseArtifactDeploymentError("EventSource Update Failed. The artifact " +
@Override public void undeploySynapseArtifact(String artifactName) { if (log.isDebugEnabled()) { log.debug("EventSource Undeployment of the event source named : " + artifactName + " : Started"); } try { SynapseEventSource es = getSynapseConfiguration().getEventSource(artifactName); if (es != null) { getSynapseConfiguration().removeEventSource(artifactName); if (log.isDebugEnabled()) { log.debug("EventSource Undyou neeeployment of the EventSource named : " + artifactName + " : Completed"); } log.info("EventSource named '" + es.getName() + "' has been undeployed"); } else if (log.isDebugEnabled()) { log.debug("Event source " + artifactName + " has already been undeployed"); } } catch (Exception e) { handleSynapseArtifactDeploymentError("EventSource Undeployement of EventSource named : " + artifactName + " : Failed", e); } }
es.setFileName((new File(fileName)).getName()); if (log.isDebugEnabled()) { log.debug("EventSource named '" + es.getName() + "' has been built from the file " + fileName); log.debug("Initialized the EventSource : " + es.getName()); getSynapseConfiguration().addEventSource(es.getName(), es); if (log.isDebugEnabled()) { log.debug("EventSource Deployment from file : " + fileName + " : Completed"); log.info("EventSource named '" + es.getName() + "' has been deployed from file : " + fileName); return es.getName(); } else { handleSynapseArtifactDeploymentError("EventSource Deployment Failed. The " +
@Override public void undeploySynapseArtifact(String artifactName) { if (log.isDebugEnabled()) { log.debug("EventSource Undeployment of the event source named : " + artifactName + " : Started"); } try { SynapseEventSource es = getSynapseConfiguration().getEventSource(artifactName); if (es != null) { getSynapseConfiguration().removeEventSource(artifactName); if (log.isDebugEnabled()) { log.debug("EventSource Undyou neeeployment of the EventSource named : " + artifactName + " : Completed"); } log.info("EventSource named '" + es.getName() + "' has been undeployed"); } else if (log.isDebugEnabled()) { log.debug("Event source " + artifactName + " has already been undeployed"); } } catch (Exception e) { handleSynapseArtifactDeploymentError("EventSource Undeployement of EventSource named : " + artifactName + " : Failed", e); } }
public static SynapseEventSource defineEventSource(SynapseConfiguration config, OMElement elem, Properties properties) { SynapseEventSource eventSource = null; try { eventSource = EventSourceFactory.createEventSource(elem, properties); if (eventSource != null) { config.addEventSource(eventSource.getName(), eventSource); } } catch (Exception e) { String msg = "Event Source configuration cannot be built"; handleConfigurationError(SynapseConstants.FAIL_SAFE_MODE_EVENT_SOURCE, msg, e); } return eventSource; }
private static void createEventSources(SynapseConfiguration synapseConfig, String rootDirPath, Properties properties) { File eventsDir = new File(rootDirPath, EVENTS_DIR); if (eventsDir.exists()) { if (log.isDebugEnabled()) { log.debug("Loading event sources from : " + eventsDir.getPath()); } Iterator events = FileUtils.iterateFiles(eventsDir, extensions, false); while (events.hasNext()) { File file = (File) events.next(); OMElement document = null; try { document = getOMElement(file); } catch (Exception e) { String msg = "Error while building Event Source configuration from file : " + file.getName(); handleConfigurationError(SynapseConstants.FAIL_SAFE_MODE_EVENT_SOURCE, msg, e); } if (document != null) { SynapseEventSource eventSource = SynapseXMLConfigurationFactory. defineEventSource(synapseConfig, document, properties); if (eventSource != null) { eventSource.setFileName(file.getName()); synapseConfig.getArtifactDeploymentStore().addArtifact( file.getAbsolutePath(), eventSource.getName()); } } } } }
public static SynapseEventSource defineEventSource(SynapseConfiguration config, OMElement elem, Properties properties) { SynapseEventSource eventSource = null; try { eventSource = EventSourceFactory.createEventSource(elem, properties); if (eventSource != null) { config.addEventSource(eventSource.getName(), eventSource); } } catch (Exception e) { String msg = "Event Source configuration cannot be built"; handleConfigurationError(SynapseConstants.FAIL_SAFE_MODE_EVENT_SOURCE, msg, e); } return eventSource; }
private static void createEventSources(SynapseConfiguration synapseConfig, String rootDirPath, Properties properties) { File eventsDir = new File(rootDirPath, EVENTS_DIR); if (eventsDir.exists()) { if (log.isDebugEnabled()) { log.debug("Loading event sources from : " + eventsDir.getPath()); } Iterator events = FileUtils.iterateFiles(eventsDir, extensions, false); while (events.hasNext()) { File file = (File) events.next(); try { OMElement document = getOMElement(file); SynapseEventSource eventSource = SynapseXMLConfigurationFactory. defineEventSource(synapseConfig, document, properties); if (eventSource != null) { eventSource.setFileName(file.getName()); synapseConfig.getArtifactDeploymentStore().addArtifact( file.getAbsolutePath(), eventSource.getName()); } } catch (Exception e) { String msg = "Event source configuration cannot be built from : " + file.getName(); handleConfigurationError(SynapseConstants.FAIL_SAFE_MODE_EVENT_SOURCE, msg, e); } } } }
public OMElement serializeEventSource(SynapseEventSource source, SynapseConfiguration synapseConfig, OMElement parent) throws Exception { File eventsDir = createDirectory(currentDirectory, MultiXMLConfigurationBuilder.EVENTS_DIR); OMElement eventSrcElem = EventSourceSerializer.serializeEventSource(null, source); String fileName = source.getFileName(); if (fileName != null) { if (currentDirectory == rootDirectory) { handleDeployment(eventsDir, fileName, source.getName(), synapseConfig.getArtifactDeploymentStore()); } File eventSrcFile = new File(eventsDir, source.getFileName()); writeToFile(eventSrcElem, eventSrcFile); } else if (parent != null) { parent.addChild(eventSrcElem); } return eventSrcElem; }
public OMElement serializeEventSource(SynapseEventSource source, SynapseConfiguration synapseConfig, OMElement parent) throws Exception { File eventsDir = createDirectory(currentDirectory, MultiXMLConfigurationBuilder.EVENTS_DIR); OMElement eventSrcElem = EventSourceSerializer.serializeEventSource(null, source); String fileName = source.getFileName(); if (fileName != null) { if (currentDirectory == rootDirectory) { handleDeployment(eventsDir, fileName, source.getName(), synapseConfig.getArtifactDeploymentStore()); } File eventSrcFile = new File(eventsDir, source.getFileName()); writeToFile(eventSrcElem, eventSrcFile); } else if (parent != null) { parent.addChild(eventSrcElem); } return eventSrcElem; }