Author Topic: Problem with router.updateInterval not occurring  (Read 20568 times)

aevett

  • Customer
  • Sr. Member
  • *
  • Posts: 482
    • View Profile
Problem with router.updateInterval not occurring
« on: March 04, 2009, 05:40:29 PM »
With the 2.4 version sessions are now timing out in our web portal application.  I think we were relying on router.updateInterval to keep sessions alive.  But now that disableAjax is being set to true as reflected in the following debug:


2009/03/04 15:59:16:213 : WebServerService - Thread-272 : [com.creamtec.ajaxswing.ServletHelper] Setting disableAjax=true because of query string parameters reportName=ManualFileTransfer&jSessionId=1ivcxpq47x7iq


router.updateInterval is no longer applicable.

But why isn't window.*.keepAlive=true keeping the session alive?  I've attached the server and client debug files.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #1 on: March 05, 2009, 10:48:02 AM »
We will investigate and get back to you on this shortly.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #2 on: March 09, 2009, 01:49:34 PM »
This was identified as a bug in AjaxSwing. It is fixed, we are re-testing session tracking. Do you need a patch right away?

There is a few small issues we are fixing in Beta so if you wait until the end of the week you'll get the RC. Otherwise we can issue a patch.

aevett

  • Customer
  • Sr. Member
  • *
  • Posts: 482
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #3 on: March 09, 2009, 01:50:43 PM »
We can wait till the end of the week.  Thanks.

aevett

  • Customer
  • Sr. Member
  • *
  • Posts: 482
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #4 on: March 12, 2009, 03:31:31 PM »
After further review, the result of disabling ajax has caused our portal web page to be less usable.  For example:
- frequent full screen refreshes
- must right-click unselected table row twice to select menu item
- transient "please wait" dialogs are now not being removed because no longer have an update interval

In short, we need ajax to remain enabled.


Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #5 on: March 12, 2009, 05:29:24 PM »
Just to clarify this, when a parameter is passed in the URL, AJAX is only disabled until the first submit, after which it becomes enabled automatically. Are you saying that this whole approach breaks the other functionality?

Or are you setting disableAjax to false in the application configuration file?

disableAjax mode is not fully supported, it's more for debug testing. Some features require AJAX, so at the configuration level it should always be on.

aevett

  • Customer
  • Sr. Member
  • *
  • Posts: 482
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #6 on: March 13, 2009, 12:09:48 PM »
We have disableAjax=false in our properties file.  With the symptoms we're seeing (including no updateInterval), it would appear that AJAX is not being re-enabled after the first submit.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #7 on: March 13, 2009, 03:47:18 PM »
disableAjax gets re-enabled in our testing. Please download RC release, try it again, and if disableAjax doesn't get re-enabled please submit the log file.

If it doesn't work, it might be good for you to check if the standard install of AjaxSwing works fine. Run WindowsThemeDemo with a URL parameter, e.g.

http://localhost:8040/ajaxswing/apps/WindowsThemeDemo?testParam=value

which should put the page into disabled ajax mode. Then click on table row and it should switch to URL without the parameter and AJAX should be enabled.

aevett

  • Customer
  • Sr. Member
  • *
  • Posts: 482
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #8 on: March 16, 2009, 04:01:16 PM »
Downloaded the RC release, and retested.  Web browser sessions are no longer timing out, so the original reported problem appears to be resolved.

But we're still seeing where AJAX appears to be disabled with each browser request, including the ping request.  I've attached the log files.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #9 on: March 16, 2009, 06:43:41 PM »
Is there actually a problem you experience, or are you just concerned because you are seeing log messages saying that ajax is disabled?

I don't see anything in the logs suggesting that there is a problem. ping() request doesn't use disableAjax parameter so it is not affected by it.

« Last Edit: March 16, 2009, 06:46:34 PM by CreamTec Support Team »

aevett

  • Customer
  • Sr. Member
  • *
  • Posts: 482
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #10 on: March 17, 2009, 08:52:50 AM »
Yes, we do see problems.  Our frames have tables with right-click menus.  When we right-click a table row that was not already selected, the menu appears, but then the full page is blanked and redrawn and the menu disappears.  We then have to right-click again to get the menu back.  And in general, performance seems sluggish.  This seems to indicate that Ajax is not being re-enabled.

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #11 on: March 17, 2009, 10:52:44 AM »
This is a "pick-your-poison" situation. When you pass a URL parameter (?param=value) it has to be removed to avoid being passed in the future. The only clean way to remove that parameter is through a full page submit. So we should assume that there has to be 1 full page submit before AJAX submits can continue.

You mention that AJAX is not being re-enabled. Can you start with a parameter in the URL, do a few actions that trigger a submit, and then send us the log files? You can verify that the AJAX mode is working by looking at the log file. At the end of the request processing there should be a message "Returning partial update" in AJAX mode, or "Returning full HTML page" in non-AJAX mode.

Right now our implementation says that "first submit is full page submit". If that first submit happens to be a right mouse click on the table that changes table selection, that selection change result in full page submit (and a long wait, unfortunately). After that however, all submits should be AJAX submits so there should be no performance degradation. Is that not what you are experiencing?

Another alternative is to trigger a full page submit as soon as the URL parameter is detected. This would mean that the URL will never show the query parameters, so if a page is submitted to http://localhost:8040/ajaxswing/apps/myapp?param=value then the browser will be redirected to http://localhost:8040/ajaxswing/apps/myapp via a full page submit during the same request. It means waiting a little longer during the parameterized request but not having to experience a full page submit later.

It sounds like the second option is what you prefer - is that true? Do you see any issues with it?

We already have an example on how to remove URL parameters through a redirect (the example only works for "test" URL parameter):

Code: [Select]
    if (agent.getRequestData().getParams().get("test") != null) {
         TraceMgr.trace("Remove query string by redirecting to " + agent.getInitData().getSubmitURL());
         responseData.setRedirectURL(agent.getInitData().getSubmitURL());
    }

But we can make this a default product behavior, although it would require some testing.
« Last Edit: March 17, 2009, 10:54:59 AM by CreamTec Support Team »

aevett

  • Customer
  • Sr. Member
  • *
  • Posts: 482
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #12 on: March 17, 2009, 03:51:45 PM »
We tried the test where we did the following:

1. Used an URL starting with a parameter http://localhost:3080/VLPortal?test=testing
2. Select ManualFileTransfer frame.
3. Right-click on one table item of this frame.
4. Right-click on another table item of this frame.
5. Switch to FileTransferHistory frame.

Debug files are attached and we only see "Returning full HTML page".  With this test or previous testing, we are seeing performance degradation with each page submit not just the first one.

As you expected, we do prefer the second alternative and don't foresee issues.  Is this a code change for you in addition to the redirection?  We can do the redirection if you like, we're just not sure where it goes (e.g. RouterRequestFilter.postProcessRequest?).

Support Team

  • Administrator
  • Hero Member
  • *****
  • Posts: 1074
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #13 on: March 25, 2009, 10:41:46 PM »
We've changed the product to automatically refresh the page if URL parameters are specified, without disabling AJAX. So in the final version of 2.4.0 this issue should be resolved.

aevett

  • Customer
  • Sr. Member
  • *
  • Posts: 482
    • View Profile
Re: Problem with router.updateInterval not occurring
« Reply #14 on: March 26, 2009, 09:31:53 AM »
Great!  Will this change be available in the RC2 build?