• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Concurrent Request Processing in jBoss - Not working

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

I am facing a wired problem in jBoss AS. We deployed a RESTfull web service application developed using Java and Jersey and deployed the war in jBoss AS Version 6.0

I call this web service from different J2ME clients. But my jBoss serves one client at a time

for example if I call the same web service from 3 different mobiles then the jBoss serves one after another. We are writting the logs where we write the name of device and it shows that jBoss is not handling the requests concurrently instead it serves one after another.

I am very new to jBoss so I am sure that its my mistake and I am missing some configuration or something to achieve concurrency. Please help me to solve this.

My server.xml is as follows.


and datasource.xml is



Please guide me to solve this issue.

Thank you very much in advance.

With best regards,
Ishan
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have not limited the number of http connections, and 75 connections for the database is more than enough. So the problem has to be either in your code (locking, overuse of synchronized) or with Jersey.
 
ishan dave
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Johnson wrote:You have not limited the number of http connections, and 75 connections for the database is more than enough. So the problem has to be either in your code (locking, overuse of synchronized) or with Jersey.



Hey Peter Johnson,

Thank you very much for your valuable reply. I check with my code there is no synchronizing stuffs so will you please tell what should I check or look with Jersey ?

Thank you,

With best regards,
Ishan
 
Peter Johnson
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry, but I don't know Jersey, you are on your own there.

You might try taking a thread dump when there are two requests in process - you should see two threads processing the requests. Look at the code shown in the thread call stacks, that should give you a clue. (Depending on how quickly your code processes the requests you might have to take multiple thread dumps before you catch the culprit.)
 
ishan dave
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Peter Johnson wrote:Sorry, but I don't know Jersey, you are on your own there.

You might try taking a thread dump when there are two requests in process - you should see two threads processing the requests. Look at the code shown in the thread call stacks, that should give you a clue. (Depending on how quickly your code processes the requests you might have to take multiple thread dumps before you catch the culprit.)



Thank you Peter for your reply.

In fact yesterday I downloaded jMeter and after generating concurrent requests from it everything seems right. Than checked my client code and the problem is there. In one thread I forgot to raise the exception in stead I catch it and this is the place where my application hangs.

Finally solved the issue.

In fact your reply opens a door for me to think on the lines other than jBoss and able to solve the issue.

Thank you very much for your valuable inputs.

With best regards,
Ishan
 
This tiny ad is guaranteed to be gluten free.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic