Win a copy of Get Programming with Java (MEAP only) this week in the Beginning Java forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

[Urgent] need help on Lock and Condition  RSS feed

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

We are using EJB3 in our application and we've created an interceptor to check whether the user has already sent a request or not.
if we noticed that the user has already sent a request then in this interceptor we need to suspend that thread and wait till the former request being completed otherwise the thread will proceed.

in order to find whether or not a user has sent a request, each time a request comes, we store its user id in a Map structure.

here is the body of the our interceptor



now, I am skeptical on the way this works. I just created this interceptor based on information gathering through the internet and not sure that works fine. Unfortunately, I can't create a situation in which we can test the system.

I appreciate if you can help me on this

thank you very much
 
"I know this defies the law of gravity... but I never studied law." -B. Bunny Defiant tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!