You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Unreal Jiang <si...@yahoo.com> on 2007/01/16 14:34:18 UTC
When should we close the handlers in CXF?
Hi guy,
In JAX-WS spec, it describe that A handlers 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.
RE: When should we close the handlers in CXF?
Posted by Unreal Jiang <si...@yahoo.com>.
Hi Jervis,
Thanks for your reply.
I agree to you idea. Maybe there have some resources assigned in REQUEST message handlers should be shared by RESPONSE message handlers. So we should close handlers just at the end of a MEP, and client side once, server side once.
Cheers
Unreal
"Liu, Jervis" <jl...@iona.com> wrote: 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:sinbad_jia@yahoo.com]
Sent: Tue 1/16/2007 9:34 PM
To: cxf-dev@incubator.apache.org
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.
---------------------------------
Don't get soaked. Take a quick peak at the forecast
with theYahoo! Search weather shortcut.
RE: When should we close the handlers in CXF?
Posted by "Liu, Jervis" <jl...@iona.com>.
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:sinbad_jia@yahoo.com]
Sent: Tue 1/16/2007 9:34 PM
To: cxf-dev@incubator.apache.org
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.