-
1. Re: HttpInvokers & Data Compression using GZIP streams
boa_ig Feb 19, 2006 11:28 PM (in response to jburugupalli)HI Jani
I now have problem with CompressionSocketFactory HttpInvoker.
Prompt, how you managed her(it) to realize?
Oleg. -
2. Re: HttpInvokers & Data Compression using GZIP streams
mich0 Feb 28, 2006 12:01 AM (in response to jburugupalli)Hi!
I also use CompressionSocketFactory in case of JRMPInvoker.
How can I use compression in HttpInvoker without changes in jboss kernel? -
3. Re: HttpInvokers & Data Compression using GZIP streams
boa_ig Feb 28, 2006 6:43 AM (in response to jburugupalli)Prompt where to search.
It can be made whether or not?
Please Helppppppppppppp -
4. Re: HttpInvokers & Data Compression using GZIP streams
boa_ig Feb 28, 2006 6:53 AM (in response to jburugupalli)I use example, org.jboss.test.hello testsuite package, is an example of using the HttpInvoker to configure a stateless session bean to use the RMI/HTTP protocol. How to me to add compression for RMI?
sory my bad English -
5. Re: HttpInvokers & Data Compression using GZIP streams
starksm64 Feb 28, 2006 11:05 AM (in response to jburugupalli)Look into the compression option on the tomcat http connector.
http://tomcat.apache.org/tomcat-5.5-doc/config/http.html -
6. Re: HttpInvokers & Data Compression using GZIP streams
boa_ig Mar 1, 2006 8:07 AM (in response to jburugupalli)<! - A HTTP/1.1 Connector on port 8080 - >
< Connector port = "8080" address = " $ {jboss.bind.address} "
compression = "force"
compressableMimeType = " application/x-www-form-urlencoded, application/x-java-serialized-object "
maxThreads = "250" strategy = "ms" maxHttpHeaderSize = "8192"
emptySessionPath = "true"
enableLookups = "false" redirectPort = "8443" acceptCount = "100"
connectionTimeout = "20000" disableUploadTimeout = "true" / >
..........................................................................
If to do(make) standart Tomcat, it is necessary Accept-Encoding "," x-gzip, x-deflate, gzip, deflate
I have added in console\remote\Util.java, mq\il\http\HTTPClient.java, http\interface\Utils.java
conn.setRequestProperty ("Accept-Encoding", " x-gzip, x-deflate, gzip, deflate ");
Does not work
The server compresses the data
The client does not understand stream -
7. Re: HttpInvokers & Data Compression using GZIP streams
starksm64 Mar 1, 2006 11:42 AM (in response to jburugupalli)You need to conditionally wrap the input stream:
URL url = new URL("http://localhost:8080/invoker/JNDIFactory"); URLConnection conn = url.openConnection(); conn.setRequestProperty("Accept-Encoding", "x-gzip, x-deflate, gzip, deflate, identity"); InputStream is = conn.getInputStream(); Map<String, List<String>> headers = conn.getHeaderFields(); System.out.println(headers); System.out.println(is); List<String> encoding = headers.get("Content-Encoding"); boolean gzip = encoding.contains("gzip"); if( gzip ) is = new GZIPInputStream(is); ObjectInputStream ois = new ObjectInputStream(is); Object proxy = ois.readObject(); System.out.println(proxy); is.close(); ois.close(); ... {X-Powered-By=[Servlet 2.4; JBoss-4.0.4.CR2 (build: CVSTag=JBoss_4_0_4_CR2 date=200602271624)/Tomcat-5.5], Content-Encoding=[gzip], Date=[Wed, 01 Mar 2006 16:36:59 GMT], null=[HTTP/1.1 200 OK], Server=[Apache-Coyote/1.1], Content-Type=[application/x-java-serialized-object; class=org.jboss.invocation.MarshalledValue], Transfer-Encoding=[chunked], Vary=[Accept-Encoding]} sun.net.www.protocol.http.HttpURLConnection$HttpInputStream@b1c5fa org.jboss.invocation.MarshalledValue@90426439
-
8. Re: HttpInvokers & Data Compression using GZIP streams
boa_ig Mar 2, 2006 7:15 AM (in response to jburugupalli)Thanks,
Compression is work (in testing)
JBoss plans this function to add in Released?
sory for my bad English
Oleg.