Skip to content

Commit

Permalink
fixed usage of internal requester API
Browse files Browse the repository at this point in the history
  • Loading branch information
ddossot committed Dec 28, 2009
1 parent 96237b8 commit ed177ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Expand Up @@ -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;

Expand All @@ -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);

Expand Down
Expand Up @@ -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">
Expand Down

0 comments on commit ed177ed

Please sign in to comment.