cancel
Showing results for 
Search instead for 
Did you mean: 

Appeon - IWA - Terminate Session / Display 'You have been logged out.'

Former Member
0 Kudos

Greetings All,

To prevent users from tying up licenses, I am attempting to implement something that will ideally:

1) Terminate the session on the Appeon Server

2) Display a message to user stating that you have been logged out.

3) Possibly display a message prior stating 'Click Okay to Stay Logged In.'

I tried putting 'Halt Close' in the Idle event and after the threshold has been reached, the application just vanishes.

And I don't see any Appeon Extended Functions that address what we seem like a required function.  I don't want people complaining that they cannot log in because there are a bunch of IWA applications sitting idle.  Also, I want to set the timeout period based on other factors than just at the application level.

Also, if I have done even one transaction when the application terminates using 'Halt Close', I get "Appeon.Server.Services.TransactionServices.TransactionException: Transaction has timed out. The transaction has rolled back: sqlca at..."

Which is odd because I have never see this error in an Appeon Web Application in the browser.

Anyway, I run the IWA again and the transaction does not appear to be rolled back.  And I use commit; where needed so not sure what is going on.

All I do know is that I don't users to see there messages.

Thanks for any suggestions!!

Paul

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member185283
Participant
0 Kudos

The easiest way is just configure an appropriate timeout setting in the Appeon Enterprise Manager (AEM). 

Former Member
0 Kudos

Hi Paul;

   Excellent point on saving Appeon Sessions from running over your server license when the uses get dostracted or just walk away leaving your Appeon Web and/or Mobile applications running. Each running application is tying up a server session and thus one license count.

  This how its down within my STD framework

1) I use an INI file to control each application's timeout. In the example below ... 10 minutes:

2) Each application then puts out a message screen with a link back to the application when the IDLE is exceeded ...

3) If the user does not active the "Return to XXXX application" link then the LOCK screen is closed (actually a DataWindow) and the IDLE time is exceeded again, the application close is requested to the Application Controller via the "of_shtudown_application()" method request!

4) In the "of_shutdown_application" method  a Shutdown Flag is set in the Application Controller that a ShutDown is in effect.

5) The Window Manager in the framework closes all Windows in the reverse order they were opened.

6) All CloseQuery events check the Application Controller's "of_is_shutdown()" method. If TRUE ...

    -  no messages are given

    -  All transactions are Rolled Back

7) The browser is then automatically closed via the AEM setting in the Appeon Server ....

Note: I have had Appeon Web applications now running in my government clients for 3+ years that have never exceeded their 50/100 user license based on this technique! The Appeon Server's support multiple Appeon Web applications with dozend of concurrent users active 24 hours a day.

HTH

Regards ... Chris

Former Member
0 Kudos

I finally figured out that my current setup does not like commit statements, so I took them all out and the application works great.

The only problem I have now is that I cannot get the application to execute code from in an Exit button that does NOT result in 'Error -1','Commit Transaction'.

I have tried every combination of the following:

//br.TriggerEvent(Close!)

//commit using SQLCA;

//disconnect using SQLCA;

//Halt Close

//exit

//return

close(w_ml_shuttle_login)

//close(parent)

Can someone kindly point me in the right direction?

Thanks!!

Paul

Former Member
0 Kudos

"my current setup does not like commit statements"

that doesn't sound right.  what database do you use, and what lock settings do you have?  there is the whole thing with chained transactions that has dependency on the driver depending on your database.   also aem logs all database errors - even if you dont', so you may see problems that you just didn't notice before.


I  have no problems with transactions - commits or anything.  I did have to change some default values in the datasource timeout in AEM for some longer running processes. 



also, you should look at the application transactions time out setting.  by default it is set for 1 hour, but you may want to adjust this.  I have found that chrome does not always remove the appeon session when a user closes chrome (rather than closing the application).  apparently this is a known problem with chrome that isn't specific to appeon.  anyway this timeout in appeon is the only way to free up the license for this particular issue.

In any case, i also have an idle in my PB app to close out, as well as the appeon aem setting.  I don't provide a warning, i just close it.  Harsh?  maybe, but i haven't had any complaints.