Hi,
I'm a new person on this list, and I have encountered an issue with the
RESTEasy Client Framework.
While trying to transfer a 7.5 MB file over a simple PUT request using the
client framework, the client freezes for minutes while very slowly building a
temporary file, with 100% CPU utilization. RESTEasy version is 2.3.5_final.
The behaviour is reproduced on a code as simple the one below. The temporary
file is built before even looking up the address of the server. I don't quite
understand why a temporary file is necessary in the first place.
Can others reproduce this problem or is it unique to my circumstances?
Code:
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import javax.ws.rs.Consumes;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import org.jboss.resteasy.client.ProxyFactory;
import org.junit.Test;
public class DummyTest {
@Path("/dummy")
interface DummyService {
@PUT
@Consumes("*/*")
String process( InputStream data );
}
@Test
public void test() throws FileNotFoundException {
DummyService service = ProxyFactory.create( DummyService.class,
"http://nonexistent.domain/rest/" );
service.process( new FileInputStream( "<path to a large file>" ) );
}
}
--
Reino Ruusu
Research Scientist
VTT Technical Research Centre of Finland / Systems Engineering
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may
_______________________________________________
Resteasy-users mailing list
Resteasy-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/resteasy-users