• Post Reply Bookmark Topic Watch Topic
  • New Topic

typical threading issues in a j2ee application  RSS feed

 
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,

What were the typical threading issues taht you faced when developing a typical j2ee application using session/entity beans?

For eg: We were using jakarta poi library in our application and we ran into a poi threading issue when testing our appl by simulating concurrent users/threads.
 
Ranch Hand
Posts: 1934
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Irrespective of the help of a app server, if your application touches transactions that will take long time; the threads available will all be used in no time.

So, in the J2EE context, good coding practises also help in realising good thread usage aswell.
 
Ranch Hand
Posts: 995
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Currently in a J2EE solution you would not bother to do threading management - and let the container provide this for you. In case you need asynchronous execution you should use MDB (JMS).

./pope
 
Karthik Guru
Ranch Hand
Posts: 1209
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Ali Pope:
Currently in a J2EE solution you would not bother to do threading management - and let the container provide this for you.
./pope



Thats exactly i was referring to. The fact that we are discouraged by specs to use threads eliminates many threading related issues faced. The app server takes on the resposiblity of creating a thread pool for requests. We dont explicitly start threads in our code.

But I do agree that we need to make sure that we dont write code that is unsafe.

For eg Struts Action i guess is not thread safe, meaning there is only one action instance / action class. So we cannot rely on action class instance variables etc.

So i just want to know the threading related issues that you guys faced when coding a typical j2ee application.
I guess not many would have had to rely on wait() , notifyAll() , and other threading apis?.

thanks.
 
Can you shoot lasers out of your eyes? Don't look at this tiny ad:
Rocket Oven Kickstarter - from the trailboss
https://coderanch.com/t/695773/Rocket-Oven-Kickstarter-trailboss
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!