This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" | |
| xmlns:twitter="http://www.mulesoft.org/schema/mule/twitter" | |
| xmlns:mongo="http://www.mulesoft.org/schema/mule/mongo" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" | |
| xmlns:spring="http://www.springframework.org/schema/beans" xmlns:core="http://www.mulesoft.org/schema/mule/core" | |
| xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| version="CE-3.2.1" | |
| xsi:schemaLocation=" | |
| http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $requestUrl = $_GET['url']; | |
| switch($requestUrl){ | |
| case "schema/mule/tools/3.2/mule-tools.xsd":{ | |
| $targetUrl = "https://raw.github.com/stephenfenech/integrationcocktail-blog/master/mule/mule-tools/src/main/resources/META-INF/mule-tools.xsd"; | |
| break; | |
| } | |
| default : $targetUrl = "https://raw.github.com/stephenfenech/integrationcocktail-blog/master/mule/mule-tools/src/main/resources/META-INF/mule-tools.xsd"; | |
| } | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RewriteEngine on | |
| RewriteCond %{REQUEST_FILENAME} !-d | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteCond %{THE_REQUEST} .*\.xsd | |
| RewriteRule ^(.*)$ myproxy.php?url=$1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Lifecycle lifecycle=muleContext.getRegistry().lookupObject(flowName); | |
| if(lifecycle == null) | |
| { | |
| throw new DefaultMuleException("No flow found with name "+flowName); | |
| } | |
| String actionTaken=null; | |
| logger.debug("Excecuting " + action + " on " + flowName); | |
| if(lifecycle instanceof Service) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.ic.mule.tools.processor.control; | |
| import ... | |
| public class FlowController implements MessageProcessor{ | |
| ... | |
| @Override | |
| public MuleEvent process(MuleEvent event) throws MuleException { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.ic.camel.tools.bean.exception; | |
| import org.apache.camel.Exchange; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| public class RethrowException { | |
| Logger logger=LoggerFactory.getLogger(RethrowException.class); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void performAction(Exchange exchange) throws Exception { | |
| //Skipping some lines here... | |
| if (routeId.equals(exchange.getFromRouteId())) { | |
| // Run the controlling in a separate thread in order for the current | |
| // flow to finish | |
| final String finalRouteId = routeId; | |
| context.getExecutorServiceManager().newSingleThreadExecutor(this, "RouteControllerSelf").execute(new Runnable() { | |
| @Override | |
| public void run() { | |
| try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void performAction(Exchange exchange) throws Exception { | |
| //Skipping some lines here... | |
| if (routeId.equals(exchange.getFromRouteId())) { | |
| // Run the controlling in a separate thread in order for the current | |
| // flow to finish | |
| final String finalRouteId = routeId; | |
| new Thread(new Runnable() { | |
| @Override | |
| public void run() { | |
| try { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.ic.camel.tools.bean.control; | |
| import org.apache.camel.CamelContext; | |
| import org.apache.camel.Exchange; | |
| import org.ic.camel.tools.IntegrationCocktailConstants; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| public class RouteController { | |
| public static final String START = "START"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.ic.service; | |
| import org.junit.runner.RunWith; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.test.context.ContextConfiguration; | |
| import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; | |
| @RunWith(SpringJUnit4ClassRunner.class) | |
| @ContextConfiguration(locations = "classpath:/META-INF/spring/applicationContext*.xml") | |
| public class CocktailServiceTest extends AbstractSecurityTest { |
NewerOlder