W3C home > Mailing lists > Public > www-jigsaw@w3.org > January to February 2000

Re: Handling multiple requests (Request Queueing/Pooling?)

From: j Brax <jBrax@compuserve.com>
Date: Wed, 16 Feb 2000 16:33:50 -0500 (EST)
To: <sanath@math.edu>
Cc: "JigSaw Mail" <www-jigsaw@w3.org>
Message-ID: <LPBBLLFJOBPBABEFPOALOEAICAAA.jBrax@compuserve.com>
Ok, here is real world code, used in the real world, for financial purpose.
It's an example, it's done using servlet; it could be done using something
else; meanwhile, end user gets only HHTP thing and nothing else :
I've got an main servlet class processing user's request;
it then read an INI file and call other servlets; code exmaple :
if ( Mess.equals( SQLMN )) {
 RequestDispatcher dispatch =
etServletContext().getRequestDispatcher( SqlServlet + "?File=" + Mess1 +
Mess2 + Mess4 );
 dispatch.include(req, res);
 }

As you can see, sql is readed in a file.

I've got three servlets for handling sql requests :
- one for insert, update to be done quickly
- one for list box select, quick one
- one for slow sql

You've got here the last one, retrieving parameters and displaying results.
The only problem I've got is the following :
If a user cancel it's request, I do not detect it and sql query goes on.
This particular
user is meanwhile affected because next query will use the same queue;
rather radical
solution not certainly not a smart one ...

So, here's the code, it might seem rather simple; it might work in an other
manner using EJB. Otherwise, the idea seems good to me, having a process
doing separately the job to handle database connection and so on.


Good work - regards -  j Brax



Received on Wednesday, 16 February 2000 17:44:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 9 April 2012 12:13:34 GMT