-
1. Re: CompressingMarshaller and clientConnectAddress
ron_sigal Sep 14, 2007 9:37 PM (in response to klauserber)There are two options:
1. You can append the clientConnectAddress parameter to the InvokerLocator:<attribute name="InvokerLocator">socket://${jboss.bind.address}:3873/?marshaller=org.jboss.remoting.marshal.compress.CompressingMarsh aller&unmarshaller=org.jboss.remoting.marshal.compress.CompressingUnMarshaller&clientConnectAddress=bluemonkeydiamond.com</attribute>
or you can add attribute elements for the marshaller and unmarshaller to the invoker element:<mbean code="org.jboss.remoting.transport.Connector" name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3"> <depends>jboss.aop:service=AspectDeployer</depends> <attribute name="Configuration"> <config> <invoker transport="socket"> <attribute name="numAcceptThreads">1</attribute> <attribute name="maxPoolSize">360</attribute> <attribute name="clientMaxPoolSize" isParam="true">50</attribute> <attribute name="timeout" isParam="true">60000</attribute> <attribute name="serverBindAddress">${jboss.bind.address}</attribute> <attribute name="serverBindPort">3873</attribute> <attribute name="clientConnectAddress"> ###THE_CLIENT_CONNECT_ADDRESS###</attribute> <attribute name="backlog">200</attribute> <attribute name="marshaller">org.jboss.remoting.marshal.compress.CompressingMarshaller</attribute> <attribute name="unmarshaller">org.jboss.remoting.marshal.compress.CompressingUnMarshaller</attribute> </invoker> <handlers> <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler> </handlers> </config> </attribute> </mbean>
See Section 5.1.1.2. "Declarative configuration" of the Remoting Guide (http://labs.jboss.com/jbossremoting/docs/guide/index.html). -
2. Re: CompressingMarshaller and clientConnectAddress
klauserber Sep 24, 2007 10:14 AM (in response to klauserber)Thank you Ron for your help.
With the first solution, the client can not connect, because it get's the wrong connect address. With the second solution, the application is working but with no compression (analysed with wireshark).
In other words: The configurations have no effect. What is wrong with my configuration?
Here is the whole thing again:<mbean code="org.jboss.remoting.transport.Connector" name="jboss.remoting:type=Connector,name=DefaultEjb3Connector,handler=ejb3"> <depends>jboss.aop:service=AspectDeployer</depends> <attribute name="Configuration"> <config> <invoker transport="socket"> <attribute name="numAcceptThreads">1</attribute> <attribute name="maxPoolSize">360</attribute> <attribute name="clientMaxPoolSize" isParam="true">50</attribute> <attribute name="timeout" isParam="true">60000</attribute> <attribute name="serverBindAddress">${jboss.bind.address}</attribute> <attribute name="serverBindPort">3873</attribute> <attribute name="clientConnectAddress">###THE_CLIENT_CONNECT_ADDRESS###</attribute> <attribute name="backlog">200</attribute> <attribute name="marshaller">org.jboss.remoting.marshal.compress.CompressingMarshaller</attribute> <attribute name="unmarshaller">org.jboss.remoting.marshal.compress.CompressingUnMarshaller</attribute> </invoker> <handlers> <handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler> </handlers> </config> </attribute> </mbean>
-
3. Re: CompressingMarshaller and clientConnectAddress
ron_sigal Oct 10, 2007 5:51 PM (in response to klauserber)Hi Klaus,
You want the compressing marshaller and unmarshaller to work on both sides of the connection, of course, which means you want to tell the client about them, which you do by way of InvokerLocator parameters. When use use the Configuration attribute, only the "subattributes" labeled with isParam="true" get added to the InvokerLocator. Your marshaller and unmarshaller attributes don't have this label, so the client doesn't know about them. This is confusing to me, though, since the client and server shouldn't be able to communicate if they're using different marshaller/unmarshallers. Still, it's a place to start.
I should mention that some people have reported problems with the compression marshaller, particularly in the context of EJBs. See JBREM-677 "Compression marshalling fails intermittently." (http://jira.jboss.com/jira/browse/JBREM-677).