[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Messaging and Remoting

clebert.suconic@jboss.com do-not-reply at jboss.com
Mon Oct 23 16:26:07 EDT 2006


The only observation I have from the document is about byte arrays
(http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossMessagingRemotingAPIExtensions)



If we need to deal with byte[] directly,  having byte[] on the signature will force us (and remoting) to duplicate the object, maybe serialize it before flushing it out to the streaming.

I would like to propose something like access to Input/OutputStream directly saving the need of converting an object to byte[] before sending it.


    RemotingOutputStream stream = client.getDirectOutputStream();
  |     stream.close(); // will dismiss the stream and but client in a state to receive other calls.
  | 
  | 

So, the example would be:

    Client client = new Client("bidirectional://jmsserverbox:7777", "EXAMPLE-SUBSYSTEM");

    client.connect()
    client.addHandler(new MessagingCallbackHandler());

    Object result = client.invoke(new MessagingInvocation());


    OutputStream output = client.getDirectOutput(); // this will return a RemotingOutputStream
    InputStream input = client.getDirectInput();
    out.write(...);
    input.read(); // reads the answer
    out.close();


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980188#3980188

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980188



More information about the jboss-dev-forums mailing list