[jboss-user] [Remoting] - Re: Compression marshalling
do-not-reply at jboss.com
Tue Sep 16 00:43:11 EDT 2008
anonymous wrote :
| finally... i solved it and got a solution...
I like to hear that! I'm concerned, though, that the same solution didn't work for Remoting 2.4. Did you just give up on 2.4, or is there anything else you can tell me about your experiments with 2.4?
As for EJB 2.1, the situation is complicated by the fact that the Connector used by EJB 2.1, the one configured in .../server/$CONFIG/conf/jboss-service.xml, uses a special marshaller and unmarshaller: org.jboss.invocation.unified.marshall.InvocationMarshaller and org.jboss.invocation.unified.marshall.InvocationUnMarshaller. By default, org.jboss.remoting.marshal.compress.CompressingMarshaller and org.jboss.remoting.marshal.compress.CompressingUnMarshaller, which are derived from org.jboss.remoting.marshal.serializable.SerializableMarshaller and org.jboss.remoting.marshal.serializable.SerializableUnMarshaller respectively, will call super.write() and super.read(). But for EJB2.1, you want them to call InvocationMarshaller.write() and InvocationUnMarshaller.read() instead. The way to do that programmaticaly is
| InvocationMarshaller im = new InvocationMarshaller();
| CompressingMarshaller cm = new CompressingMarshaller(im);
| InvocationUnMarshaller ium = new InvocationUnMarshaller();
| CompressingUnMarshaller cum = new CompressingUnMarshaller(ium);
To do it declaratively, I would derive new classes from CompressingMarshaller and CompressingUnMarshaller which create instances of InvocationMarshaller and InvocationUnMarshaller. E.g.,
| public MyCompressingMarshaller()
| wrappedMarshaller = new InvocationMarshaller();
| public MyCompressingUnMarshaller()
| wrappedUnMarshaller = new InvocationUnMarshaller();
Then replace the "marshaller" and "unmarshaller" attributes in the definition of the "jboss.remoting:service=Connector,transport=socket" MBean in jboss-service.xml with the names of your classes.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4176664#4176664
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4176664
More information about the jboss-user