HI,

I'm as starter with Servicemix and I've a problem with file:poller (I use
SM4)

I want to send a file to a servicemix-bean. The bean get the file but I get
an exception 

[EMAIL PROTECTED]
java.io.IOException: Could not delete file
\mesb\transactions_in\deploy_me-test.xml
        at
org.apache.servicemix.file.FilePollerEndpoint.process(FilePollerEndpoint.java:295)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:585)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:558)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:436)
        at
org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:334)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
        at java.lang.Thread.run(Thread.java:619)

Could anybody give me a hint what's wrong.

Here my sources:
<beans xmlns:file="http://servicemix.apache.org/file/1.0";
        xmlns:mesb="urn:mxy:esb:host:transactions">
        
        
        <file:poller service="mesb:hostTransactionsReader"
                endpoint="poller" file="file:/mxy_esb/transactions_in"
                targetService="mesb:hostTransactionsProcessor"
                targetEndpoint="hostTransactionsEndpoint"
                deleteFile="true"
                autoCreateDirectory="true"
                period="20000"
                delay="20000"
                
                />

                <!-- 
                autoCreateDirectory="true"
                archive="file:/mxy_esb/transactions_archive"
                 --> 

</beans>

<beans xmlns:bean="http://servicemix.apache.org/bean/1.0";
        xmlns:mesb="urn:mxy:esb:host:transactions">
        
        <bean:endpoint service="mesb:hostTransactionsProcessor"
                endpoint="hostTransactionsEndpoint" 
bean="#hostTransactionsProcessorBean"
/>
                
        <bean id="hostTransactionsProcessorBean" 
                class="at.mxy.esb.host.transactions.processor.ProcessorBean" />
</beans>


package at.mxy.esb.host.transactions.processor;

import org.apache.servicemix.MessageExchangeListener;

import javax.annotation.Resource;
import javax.jbi.messaging.DeliveryChannel;
import javax.jbi.messaging.ExchangeStatus;
import javax.jbi.messaging.MessageExchange;
import javax.jbi.messaging.MessagingException;

public class ProcessorBean implements MessageExchangeListener {

    @Resource
    private DeliveryChannel channel;

    public void onMessageExchange(MessageExchange exchange) throws
MessagingException {
        System.out.println("==>>>>>>>>>>>>>>>>> Received exchange: " +
exchange);
        
        exchange.setStatus(ExchangeStatus.DONE);
        channel.send(exchange);
    }

}

TIA
Martin
-- 
View this message in context: 
http://www.nabble.com/file%3Apoller--%3E-Could-not-delete-file-tp19643952p19643952.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Reply via email to