Working with Jax Rs, how to clean up temporary file after response in JAX-RS REST Service?

0 votes
asked Mar 12, 2016 by n8022 (640 points)
I am returning temporary file from my JAX-RS REST Service like below:@GET@Produces(MediaType.

4 Answers

0 votes
answered Mar 28, 2016 by Concepcion (600 points)
Best answer

Jersey and Play are generally close for REST services.
Note, only RESTful services, no UI components at all. Perhaps using an MVC framework for REST only services is 'wrong'. More info in this link For RESTful services in Java, is JAX-RS better than an MVC framework like Swing, Grails or Play?
commented Mar 30, 2016 by Limitations (110 points)
Let's look at the Future option first
0 votes
answered Mar 13, 2016 by Threads (1,070 points)
REST is about the design of URI patterns and templates.
We add an additional header to the response output in the around Write To() method.
This call signals to the runtime that the asynchronous response will be resumed.
0 votes
answered Apr 11, 2016 by Me1676 (1,120 points)
Check out the answer I gave here
This helps demonstrate what I mean
commented Apr 12, 2016 by Different (160 points)
Future or an Invocation callback method that the developer provides
0 votes
answered Apr 30, 2016 by Deluco (220 points)
I think this might answer your question. You can also take help from following thread RESTful Services JAX-RS 2.0 | PACKT Books
commented May 2, 2016 by gb_For (170 points)
Behind the scenes the method readEntity() opens java

What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!