Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SFSB question

 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
Is this method sequence correct for SFSB

1 bean is activated
2 afterBegin is called
3 business method is called
4 beforeCompletion is called
5 transaction is committed
6 afterCompletion is called


Sawan
 
Palak Shah
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I Think So! Other experts please confirm.
 
Ana Nava
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would alter it a tiny bit for clarity sake .

1 bean in "ready state"
2 transaction begins
3 afterBegin is called
4 business method is called
5 beforeCompletion is called
6 transaction is committed or rolledback
7 afterCompletion is called
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the replies. But still I am not very clear.

1 bean in "ready state"
2 transaction begins
3 afterBegin is called [I had this understanding that afterBegin is called after the business method call. Please confirm that afterBign call will be before business method.]
4 business method is called
5 beforeCompletion is called [This will be called only if the transaction will commit. Am I right?]
6 transaction is committed or rolledback
7 afterCompletion is called


sawan
 
Prashant Neginahal
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, beforeCompletion() is called irrespective of transaction is committed or rolledback. This gives last chance to rollback the transaction.

--Prashant
 
sawan parihar
Ranch Hand
Posts: 250
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If transaction is rolled back beforeCompletion() won;t be called.

sawan
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic