Win a copy of Succeeding with AI this week in the Artificial Intelligence and Machine Learning 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
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Junilu Lacar
Sheriffs:
  • Tim Cooke
  • Jeanne Boyarsky
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • salvin francis
  • fred rosenberger
  • Frits Walraven

threading in ejb

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is EJB Component is multithreaded or singlethreaded
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This really depends on type of EJB.

Session beans method can be excuted by one thread at given time.

Only one Statefull session bean can be executed at given time.

Several methods of stateless session bean can be executed at given time.
 
Ranch Hand
Posts: 171
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends how you interpret the question..

An EJB container such as an app server is a multithreaded Java application. It uses multiple threads to serve multiple requests at a time.

However -

It is usually a bad idea to work with threads from your own J2EE code. So any EJB code you write should not look like multithreaded code.

Application servers manage resources internally, and if you start creating threads in your own code, you will mess up that resource management.

Hope this answers your question,
Geoffrey
 
Always! Wait. Never. Shut up. Look at this tiny ad.
Two software engineers solve most of the world's problems in one K&R sized book
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic