• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Spring webflow 2 concurrency issue

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Can someone please explain to me why flowScope.cart is null in the following code in Spring Webflow when 2 threads are hitting the flow at exactly the same time


here is the isContracthandset method that is called in the 'decideOnActivityType' action state:

and here is the output from the log:

I have a implemented an HttpSessionAttributeListener so I can confim that there are two shopping carts in separate sessions, but either externalContext.sessionMap.cart is returning null or the value being returned is not being assigned to flowScope.cart. I am usnig webflow 2 spring 2.5.6 and ognl2.6.9. In a single threaded environment i never get any problems.

Thanks John
 
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Have you proved that the second call use session id 30C4695F2D1737D06B02F5E5B992258E?
 
John Utting
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes i can confirm that once inside the method the method the second call matches has the session id you wouild expect
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have no idea. You should debug to see why the session is null.
 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How's the flow being hit? is this JSF External context? can you show snippets of external code hitting web flow?


Trilochan
 
reply
    Bookmark Topic Watch Topic
  • New Topic