- 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
Attachments
- application/octet-stream attachment: Serv3do3.java
Received on Wednesday, 16 February 2000 17:44:42 UTC