Dhiraj Kumar Gupta

Greenhorn
+ Follow
since May 01, 2016
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Dhiraj Kumar Gupta

Hello,

Can someone please help in answering these Questions. I have tried to search but I didn't get answers to these anywhere.

Thanks & Reards,
Dhiraj
Hello All,

I had few Questions as below. Assume that the CMT has default transaction type defined as 'REQUIRED' and that all the invocations are with the same session context as of the calling method Bean.

1. If the transaction is defined to be managed by Bean and we don't actually put any begin and commit/rollback in the method of that bean, how would the system handle this situation? If there are 10 different updates being made in the method and there is no transaction initiated in the method, when would the changes for each update actually reflect in database. When would they be committed? Would it be kind of auto-commit mode?

2. If a call is made from a method in CMT Bean to another method in BMT Bean, the container handled transaction would be suspended. So, now the Question is that if the 2nd called method tries to acquire an Exclusive lock on a row of a table that is already locked by the suspended transaction, would the system not allow it to take the lock or would it allow? The 2 transactions are under same session context.

3. If a method is invoked in a CMT Bean (the Bean extends another CMT Bean). And the super class is invoked from this method. So, when the control goes to the method in the super class, does it keep the same transaction that was initiated in the original method by the Container or does it initiate another transaction?

Thanks in Advance!