Thanks for the Reply Seth

I will try the below now but to tell the truth in the past when my
subscriber was receiving messages it did not keep the session alive.
My problem is that I think the session-timeout setting times out no
matter what activity occurs i.e. even it is being pushed messages.

Just to clarify and make sure I am on the same page as you Seth, when
you say "(as long as no messages are being pushed to the Consumer)".
In the case of AMF polling I presume this is where no messages exist
therefor the poll brings back no messages for the subscriber. 

Regards,
John

--- In [email protected], "Seth Hodgson" <[EMAIL PROTECTED]> wrote:
>
> Hi John,
> 
> I'd recommend trying a simple scenario with a tweaked J2EE session
timeout and destination <session-timeout> like so:
> 
> 1. Set your J2EE session timeout to 2 minutes in web.xml for your app.
> 2. Set <session-timeout> for your destination to 1 minute.
> 3. In a little Flex app, create a Consumer that is not configured to
resubscribe. By default a Consumer's resubscribeAttempts and
resubscribeInterval properties cause it to reconnect and resubscribe
if connectivity to the server is lost. You can just set
resubscribeAttempts to zero to disable this behavior. Once that is
set, go ahead and subscribe to this destination. 
> 
> After 1 minute the subscription to the destination will time out (as
long as no messages are being pushed to the Consumer) and the Consumer
will become unsubscribed. When this happens the polling channel on the
client will stop issuing poll requests to the server for this Consumer
and with no poll requests to keep your J2EE session alive it should
expire approximately two minutes later.
> 
> HTH,
> Seth
> 
> ________________________________________
> From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of johnwalshdoon
> Sent: Wednesday, November 22, 2006 1:48 AM
> To: [email protected]
> Subject: [flexcoders] Re: Issue with "session-timeout" Network
setting on Destinations with AMF Pollin
> 
> Hi Seth,
> 
> Thanks for the detailed reply. The issue I have with the J2EE security
> and AMF polling is that in order to pull the latest chat messages down
> to my subscribed consumer I need to have AMF polling turned on. My
> security is implemented using J2EE form based security whereby a HTTP
> session exists for the user after they login. 
> 
> The fact that AMF polling is on it then means that the HTTP session
> never times out on my J2EE application server as there is a constant
> poll to the server. I was hoping I could time out the polling on the
> destination using the session timeout setting described below but as
> you describe below this timeout setting doesn't necessarily monitor
> activity over the destination only server pushes down to the consumer. 
> 
> Any ideas on how I can still implement the J2EE HTTP session security
> while having AMF polling turned on would be great. 
> 
> Thanks for your help so far.
> 
> Regards,
> John
> 
> --- In [email protected], "Seth Hodgson" <shodgson@> wrote:
> >
> > Hi John,
> > 
> > Would you mind providing a bit more detail/context regarding the
> issue you've hit with using J2EE security with AMF polling?
> > 
> > The <session-timeout> (somewhat unfortunately named..) doesn't have
> anything to do with the FlexSession for your connection (either over
> HTTP or RTMP). It is a timeout for Consumer or DataService
> subscriptions to the destination, and it is based on the last time a
> message was pushed to that subscriber. So even if other components
> (RemoteObjects/Producers/etc.) in your Flex app are sending messages
> to this destination, if no messages are pushed to this subscribed
> Consumer within the "session-timeout" limit it will be automatically
> unsubscribed on the server. This is more likely when message
> headers/selectors or subtopics are being used because only a subset of
> general message traffic though the destination will be pushed to each
> subscriber. This timeout doesn't impact FlexSession, it just removes
> this specific "idle" subscription that hasn't been receiving any
> messages. Hopefully that helps clarify the documentation.
> > 
> > Best,
> > Seth 
> > 
> > ________________________________________
> > From: [email protected] [mailto:[EMAIL PROTECTED]
> On Behalf Of johnwalshdoon
> > Sent: Tuesday, November 21, 2006 7:54 AM
> > To: [email protected]
> > Subject: [flexcoders] Issue with "session-timeout" Network setting
> on Destinations with AMF Polling.
> > 
> > Hi all,
> > 
> > I have an issue with session timeouts at the moment regarding AMF
> Polling. Our application incorporates a 2 way chat component using an
> AMF channel with AMF polling enabled. The issue I have is that there
> is no way to integrate J2EE security successfully if you have AMF
> polling turned on. I have read all the very informative threads on
> this forum so I attempted a workaround.
> > 
> > The work around I aimed to use was to set the network session
> timeout on the destination. Once this time elapses the J2EE app
> server HTTP Session will start ticking. This is all well and good but
> the session timeout on the network settings times out no matter what
> even if there is activity over the destination. This means that
> someone will be kicked out even if they have been using the
> destination. Is this a **BUG** ?? 
> > 
> > The flex documentation says --
> > 
> > session-timeout (Optional) - The session-timeout element specifies
> the idle time ! in minutes before a subscriber is unsubscribed. When
> you set the value to 0 (zero), subscribers are not forced to
> unsubscribe automatically. The default value is 20.
> > 
> > Note the word idle is used in the documentation this leads me to
> believe this is a bug!!.
> > 
> > Any help would be greatly appreciated.
> >
>



Reply via email to