You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Julien Vermillard (JIRA)" <ji...@apache.org> on 2009/10/12 11:55:32 UTC

[jira] Commented: (DIRMINA-714) Packet sequence is unordered in multi thread.

    [ https://issues.apache.org/jira/browse/DIRMINA-714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764634#action_12764634 ] 

Julien Vermillard commented on DIRMINA-714:
-------------------------------------------

    public static int generateSeq(DemuxRomiEncoder enc, IoSession session) {
        AtomicInteger seq = (AtomicInteger) session.getAttribute("send_seq");

        int id;
        if (seq == null) {
            seq = new AtomicInteger(-1);
            session.setAttribute("send_seq", seq);
        }
        id = seq.getAndIncrement();
        
        if (enc.server)
            System.out.println("[Thread-" + Thread.currentThread().getId()
                    + "][" + session.getId() + "] RESERVED = " + seq);
        return id;
    }


> Packet sequence is unordered in multi thread.
> ---------------------------------------------
>
>                 Key: DIRMINA-714
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-714
>             Project: MINA
>          Issue Type: Bug
>          Components: Filter
>    Affects Versions: 2.0.0-M5
>         Environment: xp
>            Reporter: ncanis2
>            Assignee: Edouard De Oliveira
>             Fix For: 2.0.0-M7
>
>         Attachments: mina_m6_seq_test_src.zip, org.zip
>
>
> Hi.
> Packet sequence is unordered.
> = Server & Client = 
> chain.addLast("codec", new ProtocolCodecFilter(rcf));
> chain.addLast("executor", getExecuteFilter());    => OrderedThreadPoolExecutor c = new OrderedThreadPoolExecutor(20,100);
> If server send 1,2,3,4,5,6 , client receive 1,2,3,4,6  from server.
> Clients : 100.
> where I am wrong? 

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