@James, yes it would, but why have createFault()? Why not have it
closer to what it is now with
Message getFault();
void setFault(Message fault); // instead of create fault
(and then we won't need the setFault(boolean);)
To me it looks pretty clean and simple.
if we set the OUT field with a header or not would be an
implementation detail.
From what it looks we may have a solution soon. Any more thoughts on
the IN vs OUT question?
$0.02
Hadrian
On Jul 9, 2009, at 12:47 PM, James Strachan wrote:
2009/7/9 Claus Ibsen <claus.ib...@gmail.com>:
Hi
I think it would be confusing if there is a setFault but no getFault?
But I understand the reason when you want to use OUT for both regular
OUT and FAULT. Where a header determine the type.
As its uncommon to set a fault we could as James suggested have a
factory method on Exchange to create a new one:
Message msg = exchange.createFault();
msg.setBody("Unknown order id " + id);
exchange.setOut(msg);
I wonder if this latter line is required? i.e. should
exchange.createFault() internally set the OUT?
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://fusesource.com/