Hi Mark,

On 1/13/07, Mark Webb <[EMAIL PROTECTED]> wrote:

yes.  Think of it as a multi-threaded web server going to a single
threaded
database, where the database query could have an identifier that is placed
into the query results.  The problem is that Http request #2 might make a
database query in 1 second, where Http request #1 would make a query that
takes 10 seconds.  I need a way to correlate the data inside of MINA, and
I
almost think that MINA does this already.


To be short, it is possible.  You can create one acceptor and one
connector.  The acceptor could accept multiple connections, and its all
IoHandlers could have a reference to IoSession or IoConnector to access the
connection to the database query processor.  When the database query
processor receives a response message, you could correlate it with an
appropriate IoSession (the acceptor side one) with some data structure such
as Map.  It shouldn't be that hard though.

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP key fingerprints:
* E167 E6AF E73A CBCE EE41  4A29 544D DE48 FE95 4E7E
* B693 628E 6047 4F8F CFA4  455E 1C62 A7DC 0255 ECA6

Reply via email to