> Fault mediator make the message in hand s fault message, it doesn't
> trigger a fault to the transport. You can try writing a custom mediator
> and throwing a SynapseException at the mediate method. I am afraid there
> is no way that you can fault a sequence in the standard configuration,
> not sure whether that is good or not after looking at your requirement. :-)
>

I tried writing  a custom mediator :
Unfortunately it doesn't work.  Throwing a SynapseException does not
trigger the VFS to move the file to the error folder.
It still happyly moves my file to the transport.vfs.MoveAfterProcess.

mediator snippet:
public boolean mediate(MessageContext messageContext) {
                if (log.isDebugEnabled())
                        log.debug("FaultMediator.mediate()");
                
                log.error("FaultMediator invoking fault, message = " + message 
+ " ,
message2 = ");

              throw new SynapseException("Faulting: " + message + ", " + 
message2);
}


I get the folling loggin.
[2009-09-02 12:05:16,010] DEBUG - VFSTransportListener Processing file
:file:///c:/dir/Incoming/inbox/S_USERDATA_20090713_093939_000008.xml
[2009-09-02 12:05:16,026]  INFO - LogMediator To: ,MessageID:
urn:uuid:F9C82012783CAD548C1251885917857,Directi
on: request
[2009-09-02 12:05:16,041] ERROR - FaultMediator FaultMediator invoking
fault, message = txt , message2 =
[2009-09-02 12:05:16,041] DEBUG - VFSTransportListener Processed file
: file:///c:/dir/Incoming/inbox/S_USERDATA_20090713_093939_000008.xml
of Content-type : application/xml
[2009-09-02 12:05:16,041] DEBUG - VFSTransportListener Moving to file
:file:///c:/dir/Incoming/processed/S_USERDATA_20090713_093939_000008.xml


Besides this problem, an exception not caused by a custom mediator,
also doesn't make the VFS move the file to the
transport.vfs.MoveAfterFailure|MoveAfterErrors directory.
for example: when server in the URL of a call-out sequence is down,
you get an exception (as expected). However the VFS still moves the
file happily to the transport.vfs.MoveAfterProcess folder.

Question: how to trigger the VFS to move a message. (After the VFS
itself has successfully read the file) to the
MoveAfterErrors|MoveAfterFailure folder.
side question: when will MoveAfterFailure be used, and when MoveAfterErrors ?


version: ESB v2.1

Regards,
Harm

_______________________________________________
Esb-java-user mailing list
[email protected]
https://wso2.org/cgi-bin/mailman/listinfo/esb-java-user

Reply via email to