I have read weblogic documentation and found that "Entity EJBs can be accessed by multiple clients, but only in a serial fashion.(an instance having the same primary key), the second client blocks until the EJB is available."
Is there any way I can avoid this and give access to two clients simultaneous access to that entity( I dont mind creating 2 remote interfaces ie. calling find by primarykey twice for same entity).
Puru
-
Restrictions for accessing EJB instances (2 messages)
- Posted by: Puru Kk
- Posted on: June 05 2003 18:57 EDT
Threaded Messages (2)
- Restrictions for accessing EJB instances by Chetans on June 06 2003 02:42 EDT
- You can have multiple instances by Andrew Fu on June 06 2003 17:10 EDT
-
Restrictions for accessing EJB instances[ Go to top ]
- Posted by: Chetans
- Posted on: June 06 2003 02:42 EDT
- in response to Puru Kk
Puru:
Every entity bean holds a single record of the attached table. That is why when one entity bean is in transaction and is holding a record through Primary Key, users are not allowed to have another instance of bean with same PK. This is very true from DB point of view too, as the updates and deletion of the row will take the row in mutation and will not allow other connections to change the data till it is out of transaction.
If you want to fire multiple row update query then try to use simple sql with preparedStatement syntax.
Hope thhis helps
Regards
Chetan -
You can have multiple instances[ Go to top ]
- Posted by: Andrew Fu
- Posted on: June 06 2003 17:10 EDT
- in response to Puru Kk
For an Entity Bean, you can configure it to have only one instance (exclusive) or multiple instances. Clients accessing the same instance need to wait. But nothing prevents the container to give another client another instance if it is not configured to be exclusive.
With clustering, you could have multiple instances in a cluster.