I added the session-config tag to my web.xml only to get the following warning in my weblogic console:
 
"Deployment descriptor "web.xml" is malformed.  Check against the DTD: org.xml.sax.SAXParseException: The content of element type "web-app" must match "<icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*, etc.
 
The problem seems to be that the session-config tag is missing from the list of acceptable tags, but I'm not sure why since I came across the <session-config> tag on BEA's site.  I'm running BEA-Weblogic with JRockit 1.4.2_04 JVM.
 
- Jaime


 
On 11/16/05, Dimitrios Gianninas <[EMAIL PROTECTED]> wrote:
Hi Jamie,
 
Once you set the web session time to a particular value, like so (in the web.xml):
 
<session-config >
    <session-timeout>60</ session-timeout>
</session-config >
 
Then what happens is, after 60 minutes of inactivity, the next remote call will fail because the user is not longer authenticated at the server level. And yes, the remote call will fail with one of the two faultcodes mentioned below. So I essential kick the user back to the login page.
 
If you don't set your RemoteObjects to use-custom-authentication, then none of this matters. Then will keep working forever... not safe in a production environment at all.
 
Hope that helps!
 
Dimitrios "Jimmy" Gianninas
RIA Developer
Optimal Payments Inc.
 


From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com] On Behalf Of Jaime Bermudez
Sent: Wednesday, November 16, 2005 11:01 AM
To: [EMAIL PROTECTED]
Cc: Dimitrios Gianninas
Subject: Re: [flexcoders] sessions and maintenance questions

 
Dimitrios,
 
Sounds like your solution may solve a similar issue for a project I'm working on.  Can you explain how the custom authentication relates to a timeout?  Is it the only way to get one of the two fault codes you're checking for?  Also, I checked web.xml and I don't see any timeout setting.
 
Thanks,
 
Jaime

 
On 11/14/05, Dimitrios Gianninas < [EMAIL PROTECTED]> wrote:
 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: flexcoders@yahoogroups.com] 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
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




YAHOO! GROUPS LINKS




Reply via email to