Hi
Robert,
To answer the first part, with
our Flex applications we no longer store any data in the server session. We load
any required data by the UI at start-up and cache it in a global model
(ModelLocator if you are using Cairngorm). As for the session timeout, we config
out RemoteObject to use custom authentication, as follows:
<use-custom-authentication>true<use-custom-authentication>
Then we config the session timeout in the web.xml to
say 60 minutes. So if some user say leaves for a loooong lunch and returns
after 2 hours, the next remote called made will be rejected. We catch this in
the Services.mxml and return the user to the login view.
Sample:
/**
* Handles
failed authentication faults and re-routes regular application
faults.
*/
function
handleRemoteFault( event ):Void {
if( event.fault.faultcode ==
"Client.Authentication" || event.fault.faultcode == "401" )
{
EventBroadcaster.getInstance().broadcastEvent( EventList.LOGOFF
);
}
else
{
event.call.faultHandler( event
);
}
}
</mx:Script>
<!--
SystemServices remote reference -->
<mx:RemoteObject id="systemServices"
named="systemService" concurrency="single"
result="event.call.resultHandler(event.result)"
fault="handleRemoteFault( event )"
showBusyCursor="true" />
This handles the server restart scenario
as well.
As for the second portion, I don't believe
there is anyway to tell the user that "hey, we are doing a maintenance right
now". Since the server is not available, the remote call will simply
hang.
Dimitrios "Jimmy" Gianninas
RIA Developer
Optimal Payments Inc.
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Robert Brueckmann Sent: Monday, November 14, 2005 9:47 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] sessions and maintenance questions I have a question for you guys about how you’re currently designing your Flex applications.
Since a Flex application is not session-based in the sense of an application server session, how are you guys handling, say, you want a user to have to log back in if they remain inactive after 5 hours in the case of using remote objects? You’re not making actual HTTP requests in that case…are you still storing variables in the application server session upon start of a client’s session and checking the status of those variables every time a remote method call is made? Do you have some sort of filter that filters every remote method call to check every time? What about if the application server needs to be restarted in the middle of the day…granted the client doesn’t have any knowledge of this, do you just allow them to keep going without having to log back in or do you force them to log back in and if this is the case, how does the client application become away of such a change and the need for the user to have to log back in? What are you using to flag that status change in the case of remote objects?
Also…we want to have weekly and possibly, daily database maintenance periods…say from 2 am to 3 am. If, for some reason, one of our clients is logged into the site at that ungodly hour, right before they start performing maintenance, and has successfully logged in and started using out site, then the user tries to execute some action during the maintenance period, we want to throw them a little message saying the site is currently undergoing maintenance, and to try again later, and then forward the user to a maintenance page, the same maintenance page any other client would see if they came to our URL DURING the actual maintenance going on. What would be the best way to handle this? Change a variable in web.xml and restart the application server? I use remote objects for everything I do within the application, if I changed some variable in the web.xml file, that means I’d have to add code to every single method in all of my delegate classes to check the status of this variable every time a call is made before continuing on with the actual method call. Is there a more elegant way of doing this? Much like a servlet filter works?
Any help is greatly appreciated,
robert l. brueckmann senior web developer merlin securities 595 madison avenue new york, ny 10022 p: 212.822.4821 f: 212.822.4820
This message contains information from Merlin Securities, LLC,
or from one of its affiliates, that may be confidential and privileged. If you
are not an intended recipient, please refrain from any disclosure, copying,
distribution or use of this information and note that such actions are
prohibited. If you have received this transmission in error, please notify the
sender immediately by telephone or by replying to this
transmission.
Merlin Securities, LLC is a registered broker-dealer. Services
offered through Merlin Securities, LLC are not insured by the FDIC or any
other Federal Government Agency, are not deposits of or guaranteed
by Merlin Securities, LLC and may lose value. Nothing in this
communication shall constitute a solicitation or recommendation to buy or sell a
particular
security.
-- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
|
- RE: [flexcoders] sessions and maintenance questions Dimitrios Gianninas
- Re: [flexcoders] sessions and maintenance questio... Jaime Bermudez
- Re: [flexcoders] sessions and maintenance que... Douglas Knudsen
- RE: [flexcoders] sessions and maintenance questio... Dimitrios Gianninas
- Re: [flexcoders] sessions and maintenance que... Jaime Bermudez
- Re: [flexcoders] sessions and maintenance... Jaime Bermudez
- Re: [flexcoders] sessions and mainten... Jaime Bermudez