Re: [flexcoders] sessions and maintenance questions

2005-11-21 Thread Jaime Bermudez



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-timeout60/
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
RIADeveloper
Optimal Payments Inc.



From: flexcoders@yahoogroups.com [mailto:
flexcoders@yahoogroups.com] On Behalf Of Jaime BermudezSent: Wednesday, November 16, 2005 11:01 AMTo: 
[EMAIL PROTECTED]Cc: Dimitrios GianninasSubject: 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 explainhow thecustom 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-upand 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-authenticationtrueuse-custom-authentication 


Then we config the session timeout in the web.xml to say 60 minutes. So if some user sayleaves for a lng 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
RIADeveloper
Optimal Payments Inc.



From: flexcoders@yahoogroups.com [mailto:
 flexcoders@yahoogroups.com] On Behalf Of Robert BrueckmannSent: Monday, November 14, 2005 9:47 AMTo: 
flexcoders@yahoogroups.comSubject: [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

Re: [flexcoders] sessions and maintenance questions

2005-11-21 Thread Jaime Bermudez



Ok, so I misread the line. The session-config tag is there, butI'm not sure why I'm getting the warning. Could it have something todo w/ the ? that appears after the tag in the below list?

On 11/21/05, Jaime Bermudez [EMAIL PROTECTED] wrote:

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-timeout60/ 
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
RIADeveloper
Optimal Payments Inc.



From: flexcoders@yahoogroups.com [mailto:
 flexcoders@yahoogroups.com] On Behalf Of Jaime BermudezSent: Wednesday, November 16, 2005 11:01 AMTo: 
[EMAIL PROTECTED]Cc: Dimitrios GianninasSubject: 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 explainhow thecustom 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-upand 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-authenticationtrueuse-custom-authentication 


Then we config the session timeout in the web.xml to say 60 minutes. So if some user sayleaves for a lng 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
RIADeveloper
Optimal Payments Inc.



From: flexcoders@yahoogroups.com [mailto:
 flexcoders@yahoogroups.com] On Behalf Of Robert BrueckmannSent: Monday, November 14, 2005 9:47 AMTo: 
flexcoders@yahoogroups.comSubject: [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

Re: [flexcoders] sessions and maintenance questions

2005-11-21 Thread Jaime Bermudez



On second thought, I had the ordering of the tags wrong. Works fine now.
On 11/21/05, Jaime Bermudez [EMAIL PROTECTED] wrote:

Ok, so I misread the line. The session-config tag is there, butI'm not sure why I'm getting the warning. Could it have something todo w/ the ? that appears after the tag in the below list?


On 11/21/05, Jaime Bermudez [EMAIL PROTECTED]
 wrote: 

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-timeout60/ 
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
RIADeveloper
Optimal Payments Inc.



From: flexcoders@yahoogroups.com [mailto:
 flexcoders@yahoogroups.com] On Behalf Of Jaime BermudezSent: Wednesday, November 16, 2005 11:01 AMTo: 
[EMAIL PROTECTED]Cc: Dimitrios GianninasSubject: 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 explainhow thecustom 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-upand 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-authenticationtrueuse-custom-authentication 


Then we config the session timeout in the web.xml to say 60 minutes. So if some user sayleaves for a lng 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
RIADeveloper
Optimal Payments Inc.



From: flexcoders@yahoogroups.com [mailto:
 flexcoders@yahoogroups.com] On Behalf Of Robert BrueckmannSent: Monday, November 14, 2005 9:47 AMTo: 
flexcoders@yahoogroups.comSubject: [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

Re: [flexcoders] sessions and maintenance questions

2005-11-16 Thread Jaime Bermudez



Dimitrios,

Sounds like your solution may solve a similar issue for a project I'm working on. Can you explainhow thecustom 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-upand 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-authenticationtrueuse-custom-authentication


Then we config the session timeout in the web.xml to say 60 minutes. So if some user sayleaves for a lng 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
RIADeveloper
Optimal Payments Inc.



From: flexcoders@yahoogroups.com [mailto:
flexcoders@yahoogroups.com] On Behalf Of Robert BrueckmannSent: Monday, November 14, 2005 9:47 AMTo: 
flexcoders@yahoogroups.comSubject: [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 fromMerlin 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

Re: [flexcoders] sessions and maintenance questions

2005-11-16 Thread Douglas Knudsen



We use the same approach as Dimitrios exmplained.
if not in your web.xml file, just add it inside the web-app tag (from the JRun perspective) 

session-configsession-timeout60/session-timeout/session-configfor a 60 minute timeout.DK
On 11/16/05, Jaime Bermudez [EMAIL PROTECTED] wrote:



Dimitrios,

Sounds like your solution may solve a similar issue for a project
I'm working on. Can you explainhow thecustom
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-upand 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-authenticationtrueuse-custom-authentication


Then we config the session timeout
in the web.xml to say 60 minutes. So if some user sayleaves for a
lng 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
RIADeveloper
Optimal Payments Inc.



From: flexcoders@yahoogroups.com [mailto:

flexcoders@yahoogroups.com] On Behalf Of Robert BrueckmannSent: Monday, November 14, 2005 9:47 AMTo: 

flexcoders@yahoogroups.comSubject: [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 fromMerlin Securities, LLC, or from
one of its affiliates, that may

RE: [flexcoders] sessions and maintenance questions

2005-11-16 Thread Dimitrios Gianninas





Hi Jamie,

Once you set the web session time to a 
particular value, like so (in the web.xml):

session-config
 
session-timeout60/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
RIADeveloper
Optimal Payments Inc.



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Jaime 
BermudezSent: Wednesday, November 16, 2005 11:01 AMTo: 
[EMAIL PROTECTED]Cc: Dimitrios 
GianninasSubject: 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 explainhow thecustom 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-upand 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-authenticationtrueuse-custom-authentication 
  
  Then we config the session timeout in the web.xml to say 60 minutes. So if some user 
  sayleaves for a lng 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
  RIADeveloper
  Optimal Payments 
Inc.
  
  
  
  From: flexcoders@yahoogroups.com [mailto: 
  flexcoders@yahoogroups.com] On Behalf Of Robert 
  BrueckmannSent: Monday, November 14, 2005 9:47 AMTo: flexcoders@yahoogroups.comSubject: [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 caseare 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 daygranted 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? 
  
  Alsowe want to 
  have weekly and possibly, daily database maintenance periodssay 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 mes

[flexcoders] sessions and maintenance questions

2005-11-14 Thread Robert Brueckmann









I have a question for you guys about how
youre 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? Youre not
making actual HTTP requests in that caseare you still storing variables
in the application server session upon start of a clients 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 daygranted the client doesnt 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?



Alsowe want to have weekly and
possibly, daily database maintenance periodssay 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 Id 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 fromMerlin 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 throughMerlin Securities, LLC are not insured by the FDIC or any other Federal Government Agency, are not deposits of or guaranteed byMerlin Securities, LLCand 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



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  









RE: [flexcoders] sessions and maintenance questions

2005-11-14 Thread Dimitrios Gianninas





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-upand 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-authenticationtrueuse-custom-authentication

Then we config the session timeout in the web.xml to 
say 60 minutes. So if some user sayleaves for a lng 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
RIADeveloper
Optimal Payments Inc.



From: flexcoders@yahoogroups.com 
[mailto:[EMAIL PROTECTED] On Behalf Of Robert 
BrueckmannSent: Monday, November 14, 2005 9:47 AMTo: 
flexcoders@yahoogroups.comSubject: [flexcoders] sessions and 
maintenance questions



I have a question for 
you guys about how youre 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? Youre 
not making actual HTTP requests in that caseare you still storing variables in 
the application server session upon start of a clients 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 daygranted the client doesnt 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?

Alsowe want to have 
weekly and possibly, daily database maintenance periodssay 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 Id 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 fromMerlin 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 throughMerlin Securities, LLC are not insured by the FDIC or any 
other Federal Government Agency, are not d