File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes MultiThreaded Bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "MultiThreaded Bean" Watch "MultiThreaded Bean" New topic

MultiThreaded Bean

sitaram irrinki
Ranch Hand

Joined: Feb 16, 2005
Posts: 158
Which bean can be called as Multi-Threaded bean ?
(a) Entity beans
(b) Stateless Session beans
(c) Stateful Session beans
(d) Pooled Stateless Session beans
Valentin Tanase
Ranch Hand

Joined: Feb 17, 2005
Posts: 704
Admitting that entity and SLSBs are multithreaded components, while a bean instance is single threaded, I would go with a) and b). Am I right?
However some containers like weblogic have special flags that could enable a SFSB to be multithreaded as well. Hence if this question comes from a bea exam, then one could consider c) as a possible answer. Confusing enough? Gosh I hate these questions :-)

I think, therefore I exist -- Rene Descartes
Ven Muk

Joined: Aug 13, 2005
Posts: 1
I learning ejb, im not sure about my answer

I would think sesisonbean are single threaded and entity beans are multithreaded.

For SessionBeans, there will be several session bean instances in the pool and each will fullfill the request for each client business method call.
After fullfilling the request of the client, the bean goes back to the pool.
Since each bean is for each client, it is single threaded.

But for Entity bean, each bean can handle multiple request from the client, so it is multithreaded.

Is it correct?
I agree. Here's the link:
subject: MultiThreaded Bean
It's not a secret anymore!