Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Call to BMT from CMT Questions  RSS feed

 
Dhiraj Kumar Gupta
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
Dhiraj Kumar Gupta
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!