Hi Unreal, My understanding is that the handler's close method should be called at the end of a MEP. See below from JAX-WS section 9.3.2.3: "A handler's close method is called at the conclusion of a message exchange pattern (MEP). It is called just prior to the binding dispatching the final message, fault or exception of the MEP and may be used to clean up per-MEP resources allocated by a handler." For example for a request-response MEP, on the client side, close method should be called at the end of inbound interceptor chain (when client receives the reponse), on the server side close method should be called at the end of outbound interceptor chain. Havn't got chance to check Sun's RI code, but I do not think it conforms to spec if the close method are called four times in a standard request-reponse MEP. Cheers, Jervis
________________________________ From: Unreal Jiang [mailto:[EMAIL PROTECTED] Sent: Tue 1/16/2007 9:34 PM To: [email protected] Subject: When should we close the handlers in CXF? Hi guy, In JAX-WS spec, it describe that A handler's close method is called at the conclusion of a message exchange pattern (MEP). How can we apprehend it? Does it mean that we should close handlers when the response is returned to client? But in sun's ri, it close handlers at handlers process finished such as outband & inbound handler chain finished at both client and server side, so there have four times close in a request-response MEP. Do you guys have any idea about Which approach is conform to spec? Any comment will be appreciated. Cheers Unreal --------------------------------- Any questions? Get answers on any topic at Yahoo! Answers. Try it now.
