This content has been marked as final. Show 7 replies
The 15 minute delay you are seeing is the result of the Forms runtime being orphaned. After 15 minutes of not hearing from the client, the runtime assumes that the client is gone and all related server side processes and sessions are terminated. The length of time is determined by FORMS_TIMEOUT, which has a default value of 15. That said, it is important that you do not change this value to something less than the value of HEARTBEAT, which is 2 by default. In fact, I always recommend that the value of FORMS_TIMEOUT always be at least a total of 2 greater than HEARTBEAT. So if HEARTBEAT is 2 then FORMS_TIMEOUT should be 4 or greater.1 person found this helpful
As for preventing the X'g out of the browser, well there are probably many ways to do it. The question is, how much effort do you want to put into handling it. The easiest way will be with java script, however many examples will only work with Internet Explorer. Browser like Firefox would need minor setting changes in order for similar code to work. If you have access to MyOracleSupport, take a look at this note for more information:
<blockquote>How To Trap Attempts At Closing The Browser Running A Forms Application (Doc ID 605327.1)</blockquote>
Great. Where do I find these two parameters?
FORMS_TIMEOUT is set in default.env and HEARTBEAT is set in formsweb.cfg . However, these may not defined by default in 10.1.2. So if you want to change the default value(s), you first would need to define the parameter. The documentation is a good starting place:1 person found this helpful
So the doc you recommended is awesome. Thank you. It has me using this java script code:
It displays a pop-up with the message and two buttons. OK to continue closing the broswer, and Cancel to keep the browser open.
Would you or anyone happen to know if there is an alternate function that would show only the Cancel button? Or is there a way to force both buttons to leave the browser open? It's so close to what I need, but it still gives the uncooperative user an option to mess up if they choose OK.
You won't get any better than this. The browser will always offer the user an option to close. Think about an unwanted pop-up advert from some dodgy internet site, you're not interested and want to get rid of it, if the browser allowed the web developer to not allow users to exit, you'd get a lot of angry surfers changing to a browser that did let you exit.1 person found this helpful
Hi. I'm finding that the message pops up even when the user attempts to exit my form using the exit_form built-in? I was hoping the pop-up would only occur when the user attempts to close the browser by clicking the X. Is this the expected functionality or an I doing something wrong by using the exit_form built-in?
The java script in the web page and the actual form (java applet) don't communicate with each other. Therefore, the browser has no idea that the form was exited or if it is still running. The js suggestion is useful in most cases, but does not take into account every situation. Likely js can be enhanced or replaced by something else. If IE is the main browser being used, then VBScripting may offer some better options. A Google search can help you with that.
If you plan to use the js option, I'd recommend wording your dialog to say something like the following:
<blockquote>" +Be sure that you have properly saved your work and exited the application before closing the browser. If you have not properly exited the application, click Cancel now. Closing the browser without exiting the application first can leave some changes unrecorded or prevent other users from gaining access to them.+ "</blockquote>
Now, with all that in mind, the problem you are describing has been an issue for quite some time. However, with each new release of Forms and the JRE the handling of this issue has improved. For example, if you are using Forms 10.1.2.0 and an older JRE you likely will find that if a user exit the browser while a form is still running the server side process will remain running at least until FORMS_TIMEOUT is reached. In 10.1.2.3 with a newer JRE (e.g. 1.6.0_10+), the server side process will almost immediately terminate when the browser is close assuming no uncommitted changes have been made to the db. In v11, even with uncommitted data, the server side process will close almost immediately. Obviously there may be some conditions that can cause an orphaned server side proc, but generally the complete session will be terminated if the client is shutdown. Uncommitted changes will rollback.
Consider moving to Forms 11.1.2 ;)