On 29/11/11 01:22, Benson Margulies wrote:
On Mon, Nov 28, 2011 at 9:22 AM, Sergey Beryozkin<[email protected]> wrote:
Hi Benson
On 27/11/11 14:38, Benson Margulies wrote:
I have a REST endpoint which, in some cases, reboots itself. (The
overall system uses a Tanuki JSW launcher, and it calls System.exit to
ask for a restart).
It would be cleaner if there were a way to push the reply before the
service function returns. Otherwise, I need to create a thread that
pauses for a bit and then calls exit.
Is there something?
Not sure if it can help, but you can get HttpServletResponse injected (with
@Context) and then write directly to its ServletOutputStream which will be
noticed by the CXF response chain,
Were you going to finish this sentence? If I just write a response,
what's the response chain going to do?
Writing via (decorated) ServletOutputStream will notify CXF that the
response was already committed so the response chain won't do anything
additional in this case
Cheers, Sergey