• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

JAS Session timeout and APPL End Dialog Events

BOster

Legendary Poster
I seem to recall that starting at some tools release level that when a JAS session timed out any open APPLs would effectively have some of the "termination" event(s) fired - I think the "End Dialog" event would be fired so that cleanup code would execute. Effectively like the user clicked the close button (I realize there are more events with the close button, but you get the idea). I swear that I observed this behavior when we moved from Xe to TR8.98. Basically the same behavior that happens when you just close your browser - the "closed browser detection" or what ever its called will close open applications and trigger end dialog events.

I am not seeing this session timeout behavior for some reason. Am I crazy??? Wasn't this a thing???
 

BOster

Legendary Poster
FYI, the reason I asked is because I don't think we have things set correctly yet in our new 9.1.5.1 dev environment, or its a bug with the new TR. I was able to finally test this in an environment were we still have 8.98 and it appears to be behaving like I expect/remember. I.e. after the JAS session times out it fires, at a minimum, the Form's "End Dialog" event for all the users open applications.

The way I tested this was by opening several applications that write to the business object reservation table (F00095) and then just letting everything time out. In our 8.98 environment after the JAS user session timeout the records in F00095 are removed. In our 9.1.5.1 environment after timeout, using the same test, the F00095 records remained.
 

craig_welton

Legendary Poster
Brian,

I have questions about this feature as well, but not just in 9.1.5.1 TR. I was told there is a JAS setting to control this (logout on close or something), but based on the "orphaned" data we see, the end dialog event is not consistently executed. When I test this by letting the session timeout or closing the browser it seems to work fine. Perhaps there are more variables to this ... maybe the # of open apps? If anyone has any info or experiences, please add.

thanks
Craig
 

BOster

Legendary Poster
I spent pretty much all day testing this on our old tools release 8.98 using doc ID 1488013.1 as my main guide. I can't find any official documentation on Oracle about what happens (or is supposed to happen) when a JAS session times out. What I have found so far is that it is crucial to have your app server web session (the value set in WAS/OAS/Weblogic) timeout BEFORE your "JAS Session" (timeout value set for UserSession in the jas.ini). This is noted in the 1488013.1 doc. If this is set correctly it appears that some sequence of APPL termination events fire, I assume the End Dialog event at a minimum but I need to setup some controlled test situations to try and figure out exactly which events fire and in which order. In other words if your form stack is three deep does it close the forms in reverse order or all at once???

I tested this with three applications; P42101, P4210 and a custom application. In P42101 and P4210 I simply opened up an existing order so that an object reservation record would get written to F00095. Then simply waited for timeout to see if the F00095 record was deleted. I also monitored in debug mode B0000183.jdeFreeEnvBSFN and it looks like it will also terminate the enterprise server session at the end as well.

If you DON'T get the timeout settings for the app server and jas.ini set correctly it definitely does NOT clean things up properly - it doesn't appear that any form events fire and doesn't appear to terminate the enterprise server session either (COK recycling would probably pick those up though).

Note, I also see the same type of cleanup behavior when I simply close the browser regardless of how I have my web session and UserSession values set so it is possible that behavior is controlled through other settings.
 

tonycoval

Active Member
dangling sessions in 9.1.5

We have run into this exact issue and here is exactly the problem (either with 9.1.5.1 or 9.1.5.2) there is one silly line of code that is missed - don't know if they accidentally deleted it out of a JSP or something else... But here you go.

When you close your browser, there is a standard javascript window.onunload event that is triggers, which calls up that tiny window that processes the session kill.

This code was in every single release since 8.11 the same way - in the latest greatest, the one line of " handleOnBrowserClose(); " is missing, which means that it detects the browser close, but doesn't call that function to create the little popup with the mafservice to kill everything!


<script type='text/javascript'>
try{
self.e1_Old_onunload_1 = window.onunload;} catch(problem){}
var e1_onunload_Handler_1 = function(event){
try{e1_Old_onunload_1(event);} catch(problem){}


self.name=self.original_name;

handleOnBrowserClose();


};
window.onunload = e1_onunload_Handler_1;

</script>


<script type='text/javascript'>
try{
self.e1_Old_onbeforeunload_1 = window.onbeforeunload;} catch(problem){}
var e1_onbeforeunload_Handler_1 = function(event){
try{e1_Old_onbeforeunload_1(event);} catch(problem){}




};
window.onbeforeunload = e1_onbeforeunload_Handler_1;

</script>

If you are curious yourself, just View Source in your browser after signing in, and search for "unload"

We have logged a ticket - hope this helps!
 

BOster

Legendary Poster
Thanks for the info, that will help. If they fix this we will probably need to get a POC. I will try to find some time to do some testing to see if we are not getting the nice cleanup that we did in 8.98 when the users just close their browser.

One interesting note. In my testing on 8.98 you had to have the web session time out before the value(s) set in the jas.ini - this was per the Oracle document and my testing showed that was the correct way to have them set. For 9.1.5, although not documented on Oracle's site that I can find, our CNC group was instructed by our consultants to have it the opposite (jas.ini timeout values set to time out before web session) - and my testing confirms that session cleanup happens correctly with them set that way.
 
Top