From: Amit D. <ami...@ho...> - 2002-07-31 15:17:47
|
Now if we consider that the pool mamager is called from a JSP/Servlet the following happens when a jsp/servlet's browser window is closed or the stop button is pressed. The servlet/jsp is a thread which continues to execute in the servlet container even if a stop button or browser window is closed only after the jsp/serlet thread has finished its task will an IO Exceotion be thrown that too to the web server. Plz comment. - Amit >From: Stefaan Delanghe <st...@ya...> >To: jav...@li... >Subject: [Javtools-poolmngr] Craching server >Date: Wed, 31 Jul 2002 06:54:55 -0700 (PDT) > > >I though of another issue which may occure during the execution of >transactions. > >When a user request a transaction and this is being executed (connection >taken) it >could be that the user interupts the complete application (for example >craching pc >or closing a web browser). > >This means that a transaction is executed while this is not neccessary >anymore for >the user who requested it. >In light of this matter the transaction MAY NOT be executed since the >application >terminated in a abnormal manner. > >This occurence happens the most on a web application. > >For example: > >user request jsp page which executes several statements. >But click on the stop button or closes the window. >Then the transactions on the requested jsp page may not be executed. > >Your comments > >Stefaan > > > > > > > >===== >Stefaan Delanghe >ICQ: 110055343 > >__________________________________________________ >Do You Yahoo!? >Yahoo! Health - Feel better, live better >http://health.yahoo.com > > >------------------------------------------------------- >This sf.net email is sponsored by: Dice - The leading online job board >for high-tech professionals. Search and apply for tech jobs today! >http://seeker.dice.com/seeker.epl?rel_code=31 >_______________________________________________ >Javtools-poolmngr mailing list >Jav...@li... >https://lists.sourceforge.net/lists/listinfo/javtools-poolmngr _________________________________________________________________ MSN Photos is the easiest way to share and print your photos: http://photos.msn.com/support/worldwide.aspx |
From: Stefaan D. <st...@ya...> - 2002-07-31 15:38:30
|
When a user interupts the program by clicking for example the stop button the jsp page is still executed. Which means that the transactions will be executed while they MUST NOT be executed. Commenting on your test scenario, the web server only receives a io exception at the end of the execution of the jsp page. We should normally capture such execptions and act accordingly. How to solve this problem?????? Stefaan ===== Stefaan Delanghe ICQ: 110055343 __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com |
From: John K. <joh...@ya...> - 2002-07-31 16:02:39
|
A possible solution, even though I might be way off the mark here, might be to somehow access the actual HTTP Connection (HttpURLConnection) and use this to constantly monitor the state of the client. This could be done using a light-weight thread with a simple polling algorithm. The thread sends a message/event the moment the client terminates the connection or invalidates the session. I'm not sure how, but I'm guessing there is some way to access the actual HTTP socket and monitor its state. Please Comment. John. __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com |
From: Amit D. <ami...@ho...> - 2002-08-01 06:33:21
|
In response to john kellys mail : I did have this in mind but this means each jsp spawns 2 threads viz a poller and one which interacts with the pool manager to get data. the pooler (by some http method let that not bother us now) might figure out if the client ahs dicsonnected and will stop the other thread. The first issue that comes to my mind is ... we should not handle the response object.Its bad practice handling the response/request other than the scope of the web server (which our PoolMgr wud be) Secondly it makes a basic assumption that this poolManager will be used by HTTP Clients only. Also if we stick to the threads spawned by each JSP , we might end up choking the JVM by spawning a large no of threads,this can very much happen in large volume sites. Plz comment - Amit >From: John Kelly <joh...@ya...> >To: jav...@li... >Subject: Re: [Javtools-poolmngr] Craching server >Date: Wed, 31 Jul 2002 09:01:52 -0700 (PDT) > >A possible solution, even though I might be way off >the mark here, might be to somehow access the actual >HTTP Connection (HttpURLConnection) and use this to >constantly monitor the state of the client. This could >be done using a light-weight thread with a simple >polling algorithm. The thread sends a message/event >the moment the client terminates the connection or >invalidates the session. > >I'm not sure how, but I'm guessing there is some way >to access the actual HTTP socket and monitor its >state. > >Please Comment. > >John. > >__________________________________________________ >Do You Yahoo!? >Yahoo! Health - Feel better, live better >http://health.yahoo.com > > >------------------------------------------------------- >This sf.net email is sponsored by: Dice - The leading online job board >for high-tech professionals. Search and apply for tech jobs today! >http://seeker.dice.com/seeker.epl?rel_code=31 >_______________________________________________ >Javtools-poolmngr mailing list >Jav...@li... >https://lists.sourceforge.net/lists/listinfo/javtools-poolmngr _________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com |
From: Isabelle M. <met...@pa...> - 2002-08-02 19:42:46
|
Let's look at 3 scenarios : (1) no crashes, but user forgets to commit their transaction. I'm saying that's their problem. (2) the user returns a connection to the pool and has forgotten to commit. We should rollback. (3) the client crashes - we need to find out whether the database will notice and close the connection.Besides, there's no good way for us to know that the client is no longer there, aside from implementing a heartbeat. Isabelle ----- Original Message ----- From: "Stefaan Delanghe" <st...@ya...> To: "Isabelle Muszynski" <met...@pa...> Sent: Wednesday, July 31, 2002 9:26 PM Subject: Re: [Javtools-poolmngr] Craching server > I don't know what you mean with this. This issue taks about > the application interupts which have nothing to do with the > cache manager. > > Stefaan > > > --- Isabelle Muszynski <met...@pa...> wrote: > > I don't think the cache manager should commit or rollback, this is the > > domain of whomever borrowed the connection from the pool. At most you should > > always rollback for in case they forgot to either commit or rollback. > > > > Isabelle > > > > ----- Original Message ----- > > From: "Stefaan Delanghe" <st...@ya...> > > To: <jav...@li...> > > Sent: Wednesday, July 31, 2002 3:54 PM > > Subject: [Javtools-poolmngr] Craching server > > > > > > > > > > I though of another issue which may occure during the execution of > > transactions. > > > > > > When a user request a transaction and this is being executed (connection > > taken) it > > > could be that the user interupts the complete application (for example > > craching pc > > > or closing a web browser). > > > > > > This means that a transaction is executed while this is not neccessary > > anymore for > > > the user who requested it. > > > In light of this matter the transaction MAY NOT be executed since the > > application > > > terminated in a abnormal manner. > > > > > > This occurence happens the most on a web application. > > > > > > For example: > > > > > > user request jsp page which executes several statements. > > > But click on the stop button or closes the window. > > > Then the transactions on the requested jsp page may not be executed. > > > > > > Your comments > > > > > > Stefaan > > > > > > > > > > > > > > > > > > > > > > > > ===== > > > Stefaan Delanghe > > > ICQ: 110055343 > > > > > > __________________________________________________ > > > Do You Yahoo!? > > > Yahoo! Health - Feel better, live better > > > http://health.yahoo.com > > > > > > > > > ------------------------------------------------------- > > > This sf.net email is sponsored by: Dice - The leading online job board > > > for high-tech professionals. Search and apply for tech jobs today! > > > http://seeker.dice.com/seeker.epl?rel_code=31 > > > _______________________________________________ > > > Javtools-poolmngr mailing list > > > Jav...@li... > > > https://lists.sourceforge.net/lists/listinfo/javtools-poolmngr > > > > > > > > ===== > Stefaan Delanghe > ICQ: 110055343 > > __________________________________________________ > Do You Yahoo!? > Yahoo! Health - Feel better, live better > http://health.yahoo.com > |
From: Stefaan D. <st...@ya...> - 2002-07-31 15:27:41
|
Hi Amit, The problem I stated I got from other people who have a simular situation although it was not in java. These were in fact on a cfm (Coldfusion) and asp. I did not know how a jsp page would react to it. In someother situations. I had people discussing in fact that a query was executed enduassly because of an interuption of some sort in the application. the problem on web pages would be that a pool manager will be put in a application scope. How to you resolve such situations when a session interruption occurs? Stefaan ===== Stefaan Delanghe ICQ: 110055343 __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com |