-
1. Re: JMS Object Serialization
chris_white Mar 30, 2004 3:34 AM (in response to chris_white)Sorry for the x3 topic creation, but the forum encountered errors when i went to submit and apparently the topic 'did not exists'.
-
2. Re: JMS Object Serialization
genman Mar 30, 2004 1:10 PM (in response to chris_white)There is no facility for compressing all data stored. However, you can create a wrapper for your compressible Objects:
import java.io.*; import java.util.zip.GZIPOutputStream; public class CompressedSerializable implements Serializable { private Serializable o; // uncompressed object public CompressedSerializable(Serializable o) { this.o = o; } private void writeObject(java.io.ObjectOutputStream out) throws IOException { ObjectOutputStream oos = new ObjectOutputStream(new GZIPOutputStream(out)); oos.write(o); oos.flush(); } private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException; }
You could, of course, modify UIL2 yourself and post a patch. It probably would be easy to find the code that sends the payload and GZIP it if a flag is set. -
3. Re: JMS Object Serialization
adrian.brock Mar 30, 2004 5:30 PM (in response to chris_white)All the tcp/ip connection factories take customizable socket factories.
See docs/examples/jms/https-service.xml where ssl sockets are configured.
The JBoss testsuite contains implementations of GZIP socket factories.
http://cvs.sourceforge.net/viewcvs.py/jboss/jbosstest/src/main/org/jboss/test/invokers/ejb/
Regards,
Adrian -
4. Re: JMS Object Serialization
thoennes Mar 31, 2004 6:49 AM (in response to chris_white)Please also note, that using the standard Java GZipOutputStream has some severe
limitations: If you do a flush which is necessary after each serialized object written to
the stream, you basically loose your complete compression dictionary. The behaviour is
then as if you compress every object alone. In this case, there is no advantage of the
GZipSocket over the compressed payload object.
See the related bug in the bug parade:
http://developer.java.sun.com/developer/bugParade/bugs/4813885.html
Cheers, Joerg