You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by da...@daune-consult.com on 2005/04/21 11:33:18 UTC

ProtocolSession attachment

Hi all,

I have just realized during tests that when IoProtocolAcceptor is used,
ProtocolSession attachment is internally used by IoAdapter.

I used my own attachment, which lead to a ClassCastException. As I have the MINA
source code, it was easy to figure out where the error came from. But for a
plain user only having JAR, it would have been more difficult.

IMHO, making it clear in the documentation is enough.

Cheers,

J-F

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Re: ProtocolSession attachment

Posted by da...@daune-consult.com.
Selon Trustin Lee <tr...@gmail.com>:

> Hi,
>
> 2005/4/21, daune.jf@daune-consult.com <da...@daune-consult.com>:
> > Hi all,
> >
> > I have just realized during tests that when IoProtocolAcceptor is used,
> > ProtocolSession attachment is internally used by IoAdapter.
> >
> > I used my own attachment, which lead to a ClassCastException. As I have the
> MINA
> > source code, it was easy to figure out where the error came from. But for a
> > plain user only having JAR, it would have been more difficult.
> >
> > IMHO, making it clear in the documentation is enough.
>
> I added some statements about user-defined attributes in
> IoProtocolAcceptor/Connector JavaDoc.  WDYT?
>
> Thanks,
> Trustin

I would make it clear that attachment is reserved for internal use.

The fact that user-defined attibutes are shared is another point.

Cheers,

J-F



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.


Re: ProtocolSession attachment

Posted by Trustin Lee <tr...@gmail.com>.
Hi,

2005/4/21, daune.jf@daune-consult.com <da...@daune-consult.com>:
> Hi all,
> 
> I have just realized during tests that when IoProtocolAcceptor is used,
> ProtocolSession attachment is internally used by IoAdapter.
> 
> I used my own attachment, which lead to a ClassCastException. As I have the MINA
> source code, it was easy to figure out where the error came from. But for a
> plain user only having JAR, it would have been more difficult.
> 
> IMHO, making it clear in the documentation is enough.

I added some statements about user-defined attributes in
IoProtocolAcceptor/Connector JavaDoc.  WDYT?

Thanks,
Trustin
-- 
what we call human nature is actually human habit
--
http://gleamynode.net/