Announcement Announcement Module
No announcement yet.
Configuring the session timeout on a destination Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Configuring the session timeout on a destination


    I'm currently exposing beans as remoting destinations using the @RemotingDestination annotation. I also configured the message broker though the flex:message-broker tag.

    I would like to set the session timeout to 0. I might be wrong, but in the set-up that I used there doesn't seem to be any place where I could specify it. Normally I would have used the properties->network->session-timeout setting available for each destination (e.g. in the remoting-config.xml file)

    Is there any way for me to specify the session-timeout on a destination / on all destinations using the configuration approach that I've taken ?


  • #2
    It is my understanding that in the current version of BlazeDS, the network settings such as "session-timeout" (which I believe is replaced with "subscription-timeout-minutes" in the current version) don't get used by RemotingDestinations, so we have not exposed them in the xml namespace (note that the current BlazeDS docs don't mention the availability of any such settings for RemotingDestinations). Since the FlexSession essentially piggybacks on the HttpSession, setting a timeout of 0 on the HttpSession would probably achieve a similar effect.

    If I am misunderstanding, and you for some reason still have need to apply the session timeout setting, I can direct you to a way to do this using our extension hooks.


    • #3
      Hi Jeremy,

      First of all thanks for your reply.

      Second I failed to mention the fact that I am using Livecycle Data Services 2.6 and not BlazeDS. Sorry for that, I know that I should have mentioned it from the start. In LCDS the session timeout settings are used by the remoting destinations so I would like to set them.

      Could you please give me more details on how I could do this using the extension hooks ?

      Thanks for your help,


      • #4
        Originally posted by ionut.margelatu View Post
        In LCDS the session timeout settings are used by the remoting destinations so I would like to set them.
        Can you point me to some documentation for that? It would be really helpful in determining whether we need to support this explicitly going forward. I was looking here and didn't see anything along those lines:

        For now, what you'll need to do is create and configure a MessageBrokerConfigProcessor that processes the RemotingDestinations and adds the additional configuration programmatically.

        So your MessageBrokerConfigProcessor impl might look something like this:
        import java.util.Iterator;
        import org.springframework.flex.config.MessageBrokerConfigProcessor;
        import flex.messaging.MessageBroker;
        public class ApplyRemotingSettingsConfigProcessor implements MessageBrokerConfigProcessor {
            public MessageBroker processAfterStartup(MessageBroker broker) {
                RemotingService remotingService = (RemotingService) broker.getServiceByType(RemotingService.class.getName());
                Iterator i = remotingService.getDestinations().values().iterator();
                while (i.hasNext()) {
                    RemotingDestination remotingDestination = (RemotingDestination);            
                return broker;
            public MessageBroker processBeforeStartup(MessageBroker broker) {
                return broker;
        You would set up that class as a Spring bean, and then wire it in via the config-processor tag:
            <flex:config-processor ref="myConfigProcessor"/>
        <bean id="myConfigProcessor" class=""/>


        • #5
          Thanks for your answer Jeremy. While I cannot point you to any documentation on the timeout settings for remoting destinations, I have seen them in place in several sample applications and they seemed to work.

          I did as you suggested and written an implementation of MessageBrokerConfigProcessor which sets the subscription timeout to 0. Just to be sure, I also set to 0 the timeout of the HTTP sessions.