5 Replies Latest reply on Aug 7, 2008 4:41 AM by koatto

    specify jboss remoting marshaller for jbr-provider/listener

    koatto

      is there a way to specify a custom marshaller for the jbr-provider/listener element? i need to handle a specific wiring protocol.

      thanks

        • 1. Re: specify jboss remoting marshaller for jbr-provider/liste
          kconner

          You should be able to specify the remoting configuration parameters in the configuration. Any properties prefixed by 'jbr-' are passed through to remoting (with the prefix removed).

          • 2. Re: specify jboss remoting marshaller for jbr-provider/liste
            koatto

            i configured the jbr socket listener this way

            <jbr-provider host="localhost" name="JBR-Socket" protocol="socket">
             <jbr-bus busid="Socket-1" port="8888"/>
            </jbr-provider>
            ...
            <jbr-listener name="Socket-Gateway" busidref="Socket-1" is-gateway="true" maxThreads="1"/>
             ...


            it starts fine and waits for connections, but when i try to connect using telnet i get the following exceptien just after i typed the first character.
            What am i missing?
            thanks.

            java.lang.reflect.InvocationTargetException
             at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
             at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
             at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
             at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
             at org.jboss.remoting.transport.socket.ServerThread.createServerSocketWrapper(ServerThread.java:755)
             at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:375)
             at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:173)
            Caused by: java.io.StreamCorruptedException: invalid stream header
             at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:764)
             at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277)
             at org.jboss.remoting.loading.ObjectInputStreamWithClassLoader.<init>(ObjectInputStreamWithClassLoader.java:95)
             at org.jboss.remoting.serialization.impl.java.JavaSerializationManager.createInput(JavaSerializationManager.java:54)
             at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getMarshallingStream(SerializableUnMarshaller.java:72)
             at org.jboss.remoting.marshal.serializable.SerializableUnMarshaller.getMarshallingStream(SerializableUnMarshaller.java:55)
             at org.jboss.remoting.transport.socket.ClientSocketWrapper.createInputStream(ClientSocketWrapper.java:179)
             at org.jboss.remoting.transport.socket.ClientSocketWrapper.createStreams(ClientSocketWrapper.java:162)
             at org.jboss.remoting.transport.socket.ClientSocketWrapper.<init>(ClientSocketWrapper.java:66)
             at org.jboss.remoting.transport.socket.ServerSocketWrapper.<init>(ServerSocketWrapper.java:46)
             ... 7 more


            • 3. Re: specify jboss remoting marshaller for jbr-provider/liste
              kconner

              The default socket marshaller/unmarshaller uses java object serialisation.

              • 4. Re: specify jboss remoting marshaller for jbr-provider/liste
                koatto

                i can't understand where do i have to put the property element, under jbr-provider, jbr-bus or jbr-listener?

                i'm adding :

                <property name="jbr-datatype" value="plain"/>
                <property name="jbr-marshaller" value="PlainMarshaller"/>


                in order to have the jbrListener to use my marshaller on incoming connection what i have to do? jbossremoting doc states to specify it on the url with a syntax like that :

                socket://myhost:5400/?datatype=invocation


                but it seems not to work with jboss-esb cfg.

                Thanks.

                • 5. Re: specify jboss remoting marshaller for jbr-provider/liste
                  koatto

                  any idea?

                  thanks