Permalink
Browse files

fixed usage of internal requester API

  • Loading branch information...
1 parent 96237b8 commit ed177edd24633a6438f67b1ea539d701b02e843c ddossot committed Dec 28, 2009
@@ -3,6 +3,7 @@
import org.apache.commons.codec.digest.DigestUtils;
import org.mule.api.MuleEventContext;
import org.mule.api.MuleMessage;
+import org.mule.api.endpoint.InboundEndpoint;
import org.mule.api.lifecycle.Callable;
import org.mule.transport.file.FileConnector;
@@ -27,10 +28,13 @@ public void setFileConnector(final FileConnector fileConnector) {
public Object onCall(final MuleEventContext eventContext) throws Exception {
final String fileName = eventContext.getMessageAsString();
-
- final MuleMessage requestedFileMessage = eventContext.requestEvent(
- "file://" + sourceFolder + "/" + fileName + "?connector="
- + fileConnectorName, 0);
+ final String endpointUri = "file://" + sourceFolder + "/"
+ + fileName + "?connector=" + fileConnectorName;
+
+ final InboundEndpoint endpoint = eventContext.getMuleContext()
+ .getRegistry().lookupEndpointFactory().getInboundEndpoint(endpointUri);
+
+ final MuleMessage requestedFileMessage = eventContext.requestEvent(endpoint, 0);
eventContext.setStopFurtherProcessing(true);
@@ -15,7 +15,7 @@
<service name="Md5FileHasher">
<inbound>
- <vm:inbound-endpoint path="Md5FileHasher.In" />
+ <vm:inbound-endpoint path="Md5FileHasher.In" synchronous="true" />
</inbound>
<pooled-component>
<singleton-object class="com.clood.component.Md5FileHasher">

0 comments on commit ed177ed

Please sign in to comment.