2

Some customers are reporting a issue of multiple http sessions created in Internet Explorer 6 and 8. But this is not observed when using firefox/chrome. This issue occurs randomly also.

Also we do not see the same in our systems using version IE 6/8.

Following has been defined in web.xml

<!-- Listen to events of HTTP session creation and deletion -->
<!-- Introduced as part of the correction for FR: DW1694 -->
<listener>
    <listener-class>helper.SessionListener</listener-class>
</listener>

HTTPSessionListener:

// sessions getting created
public void sessionCreated(HttpSessionEvent event)
{
    //adding the session to map
    SessionMap.addSession(event.getSession());
    logger.debug("HTTP Session created: ", event.getSession().getId());
}

We see the following in logs

instance1 2015-03-03 10:50:28,215 DEBUG (SessionListener.java:sessionCreated:24) [TP-Processor19] | HTTP Session created: A60B2EB1B46B1CE5271BE5B15B16D593
instance1 2015-03-03 10:50:28,283 DEBUG (SessionListener.java:sessionCreated:24) [TP-Processor19] | HTTP Session created: EFEE74A6D2C07543862FB121CF80B53A
instance1 2015-03-03 10:50:28,287 DEBUG (SessionListener.java:sessionCreated:24) [TP-Processor21] | HTTP Session created: 942FBB9B8449D5AC2B601469B70FAFB9
instance1 2015-03-03 10:50:28,307 DEBUG (SessionListener.java:sessionCreated:24) [TP-Processor19] | HTTP Session created: 51752544F3249834D84F6266E0E5A613
instance1 2015-03-03 10:50:28,315 DEBUG (SessionListener.java:sessionCreated:24) [TP-Processor19] | HTTP Session created: 7811007F8C6367862DC03F10E301F3CA
instance1 2015-03-03 10:50:28,355 DEBUG (SessionListener.java:sessionCreated:24) [TP-Processor19] | HTTP Session created: F702D5F5FD59DC9390CBE3405FCD03B0
instance1 2015-03-03 10:50:28,363 DEBUG (SessionListener.java:sessionCreated:24) [TP-Processor19] | HTTP Session created: 616894DF984EA171BD7DFC304460AF25
instance1 2015-03-03 10:50:30,347 DEBUG (SessionListener.java:sessionDestroyed:33) [TP-Processor19] | HTTP Session destroyed: 616894DF984EA171BD7DFC304460AF25

Note that the sessions are created continuously. We are not able to reproduce the system, but it seems to be occuring in some of the customer systems.

The traffic is over https and hence I am unable to capture the wireshark trace also.

Any ideas ? What might cause the multiple creations ?

Robin
  • 9,415
  • 3
  • 34
  • 45
Karthik K N
  • 71
  • 3
  • 7
  • Welcome to Stack Overflow! I edited the formatting of your question so that it has a bigger chance of being answered. Also, no-one is following the [tag:httpsession] tag: adding relevant tags increase the number of relevant people that will see your question. Good luck ! – Robin Mar 06 '15 at 08:27

1 Answers1

0

I had experienced a similar case wherein there were multiple submits to the server via Javascript and hence the logic was getting executed twice.

The culprit was not adding return false; after a form.submit() in the javascript method.

The server code seems to be clean, there should be multiple hits to the server from client is what i suspect.

  • Also see [this question/answer](http://stackoverflow.com/questions/29816168/returning-false-not-stopping-the-submission-of-form) – MikeJRamsey56 Oct 21 '16 at 02:35