• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

threading in ejb

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
is EJB Component is multithreaded or singlethreaded
 
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
reply
    Bookmark Topic Watch Topic
  • New Topic