Using client initiated User Transaction object to access entity beans.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anup_Surendran
Posted On:   Monday, November 3, 2003 11:54 AM

I have generated CMP entity beans using WSAD 5.0. I am accessing these beans directly from my client code. In my client code I am accessing 1 or more tables of the database via one/more entity beans. Now i want the access to all these beans to be in a single transaction. I have use JTA's UserTransaction object. Got the object through a JNDI call and used userTrans.begin() and userTrans.commmit() to demarcate transaction boundary.But the probelm i am facing is that the all Database tables that I am accessing during the transaction are locked. It is a table level exclusive lock(and not a row level lock), as a result of which other transactions cannot access the table at the same time. Is there any way i can avoid this??IS there any settings that i nee   More>>

I have generated CMP entity beans using WSAD 5.0. I am accessing these beans directly from my client code. In my client code I am accessing 1 or more tables of the database via one/more entity beans. Now i want the access to all these beans to be in a single transaction.
I have use JTA's UserTransaction object. Got the object through a JNDI call and used userTrans.begin() and
userTrans.commmit() to demarcate transaction boundary.But the probelm i am facing is that the all Database tables that I am accessing during the transaction are locked. It is a table level exclusive lock(and not a row level lock), as a result of which other transactions cannot access the table at the same time. Is there any way i can avoid this??IS there any settings that i need to make in the EJB-jar.Any settings specific to websphere??.Or is there no way out??:(
Please help!!!

   <<Less

Re: Using client initiated User Transaction object to access entity beans.

Posted By:   Nick_Maiorano  
Posted On:   Tuesday, November 4, 2003 05:42 PM

Anup,



Unless you are using some obscure database server that only supports table-level locking, and that would really surprise me, I'm sure that you can specify the concurrency strategy inside the deployment descriptors. Consult your documentation!

About | Sitemap | Contact