| Author |
thread safty in EJB
|
Samanthi perera
Ranch Hand
Joined: Jan 08, 2010
Posts: 510
|
|
I read that sessionbean and MDBs are thread safe in EJB.
so look example sessionbean below
1)so that means all methods in this session bean are thread safe?
2)why isn't Entity beans thread safe?
|
 |
Jaikiran Pai
Saloon Keeper
Joined: Jul 20, 2005
Posts: 6561
|
|
Samanthi perera wrote:
1)so that means all methods in this session bean are thread safe?
Yes
Samanthi perera wrote:
2)why isn't Entity beans thread safe?
The example you posted is for EJB3. And EJB3 does not have any entity beans.
|
[My Blog] [JavaRanch Journal]
|
 |
Samanthi perera
Ranch Hand
Joined: Jan 08, 2010
Posts: 510
|
|
then how we get persistance in EJB 3 ?
are you kidding?
|
 |
Jaikiran Pai
Saloon Keeper
Joined: Jul 20, 2005
Posts: 6561
|
|
Samanthi perera wrote:then how we get persistance in EJB 3 ?
You use plain JPA (or vendor specific) entities. JPA based entities are not enterprise beans. They are just plain java objects.
Samanthi perera wrote:
are you kidding?
No, I am not.
|
 |
 |
|
|
subject: thread safty in EJB
|
|
|