You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Trustin Lee (JIRA)" <ji...@apache.org> on 2007/02/20 09:00:09 UTC

[jira] Resolved: (DIRMINA-298) Classic clients using ObjectSerializationOutputStream are unable to send data

     [ https://issues.apache.org/jira/browse/DIRMINA-298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Trustin Lee resolved DIRMINA-298.
---------------------------------

    Resolution: Cannot Reproduce
      Assignee: Trustin Lee

I tested your scenario with the following code, and failed to reproduce the problem.

import java.net.Socket;

import org.apache.mina.example.sumup.message.AddMessage;
import org.apache.mina.filter.codec.serialization.ObjectSerializationInputStream;
import org.apache.mina.filter.codec.serialization.ObjectSerializationOutputStream;

public class StreamClient
{
    public static void main( String[] args ) throws Throwable
    {
    	Socket s = new Socket("localhost", 8080);
    	ObjectSerializationInputStream in = new ObjectSerializationInputStream(s.getInputStream());
    	ObjectSerializationOutputStream out = new ObjectSerializationOutputStream(s.getOutputStream());
    	AddMessage m = new AddMessage();
    	
    	m.setSequence(0);
    	m.setValue(1);
    	out.writeObject(m);
    	
    	m.setSequence(1);
    	m.setValue(2);
    	out.writeObject(m);
    	
    	m.setSequence(2);
    	m.setValue(3);
    	out.writeObject(m);
    	
    	m.setSequence(3);
    	m.setValue(10);
    	out.writeObject(m);
    	
    	m.setSequence(4);
    	m.setValue(20);
    	out.writeObject(m);
    	
    	m.setSequence(5);
    	m.setValue(30);
    	out.writeObject(m);
    	
    	for(;;) {
    		System.out.println(in.readObject());
    	}
    }
}


> Classic clients using ObjectSerializationOutputStream are unable to send data
> -----------------------------------------------------------------------------
>
>                 Key: DIRMINA-298
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-298
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>         Environment: windows ibm jdk 1.4
>            Reporter: Gasser M. Abdallah
>         Assigned To: Trustin Lee
>
> When wrapping a classic client socket output stream with ObjectSerializationOutputStream for writting objects that object serialization decoder can read or when using the object serilazation codec from a mena client, nothing reachs the server, till an object containing 0A or 0D (line feed or line break) is written. I think this is due to the use of DataOutputStream
> To simply reproduce the error u can compile the SumUp example and run it the object serialization codec mode, with values like 1 2 10 20 30, u wil find that the final result is 60 (starting from the message with 10, message for 1 and 2 don't reach the server).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.