On Wed, 2006-04-12 at 23:08 -0400, Srinath Perera wrote:
> yep numbers look good :)
> 
> My senario is if Web Service return a object (Bean) it should be
> written to the output stream without buiding OM. This may change if a
> handlers accsess the body, but if they do not, OM should write them
> out directly.

This is not impossible but requires hacking: do we expect a specific
method signature to write it or introduce an interface? 

If the performance is acceptable then why bother? Yes it should
definitely lead to further perf improvement, but only in cases the
payload is never read. I'm happy to special case this pattern, but it
doesn't seem like a critical 1.0 feature to me because its really a
fined tuned optimization and because it can be done without changing any
current publicly visible APIs. (It may require the introduction of a new
one (the interface saying "I can write directly") but AFAICT it does not
require any change to whta we have now.)

> I am thinking about a fake OM Element ..which wrap a object ..  if
> first accsess is a write, it is written to stream directly without
> buiding a tree. We discussed lot about this .. I think we have this
> implemented too.

That said, if the code's done then why not I guess. Where is the code?

BTW your approach won't work .. what's needed is a dirty bit to remember
whether the child of soap:Body has been read into OM. If not, if the
that element has some flag saying its capable of direct write, then the
sender would have to give the stax writer and ask it to write itself
instead of asking for stax pull events and then writing those events.

Sanjiva.

Reply via email to