Hi Vishal, On Dec 6, 2007 2:53 PM, Vishal_Jain <[EMAIL PROTECTED]> wrote: > Hi Trustin, > > Yes i did try to follow the Thread model tutorial. As is evident, its not > clear to me :) > > I seem to have missed to understand, One Connector tied with one I/O > handler. Thanks for clearing that up for me. > now, for every session that is created by calling connector.connect(), i > need to attach some application specific data. > Would it be ok to wait on the ConnectFuture object to join() and then add > the data to the session attachment ? > (i ask because, connection setup may take a while and in the meantime i > would have received more requests to forward)
ConnectFuture completes after sessionOpened event is processed. Therefore, sessionCreated and sessionOpened event handlers will not see the attachment. You could attach in your IoHandler, or you could try org.apache.mina.handler.multiton package which helps you to create a handler in a per-session manner. > I can imagine its not easy to put up with silly questions :) > appreciate your patience. Questions are always important to me because it gives everyone an idea about improving MINA to reduce the number of questions. ;) Cheers, Trustin -- what we call human nature is actually human habit -- http://gleamynode.net/ -- PGP Key ID: 0x0255ECA6
