• Post Reply Bookmark Topic Watch Topic
  • New Topic

MDB Transaction attributes

 
Lave Kulshreshtha
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Message driven bean takes only two transaction attributes.
1). Required
2). NotSupported.

I am little confused should it not use RequiresNew in place of Required?

-Lave
 
sunnymet Metkar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MDB don't have a client view. RequiresNew means that a new transaction should be started even if client calls a method within a transaction context.Since there is no client, RequiresNew doesn't make sense.
 
Jim Doyle
Ranch Hand
Posts: 36
IBM DB2 Netbeans IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
REQUIRES_NEW means the Client txn is suspended, and a new Txn is started.
Since there is never a Client Txn in the case of an MDB, it makes no sense.
MANDATORY,NEVER and the others also assume the existence of a well-defined client transaction scope.

-- Jim
 
Lave Kulshreshtha
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for response.

-Lave
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!