• Post Reply Bookmark Topic Watch Topic
  • New Topic

Question on Transaction

 
Daoyue Ming
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I have big trouble with transactions.
The senario is as:
Bean A has transaction attr of "Required", Bean B need to use methods from Bean A, however if I declare B's transaction attr as "Required", then it will time out sometimes, provided I can't change the transaction time out parameter, how to solve this problem? B needs to do some database updating.
 
Edward Kenworthy
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Daoyue Ming:
Now I have big trouble with transactions.
The senario is as:
Bean A has transaction attr of "Required", Bean B need to use methods from Bean A, however if I declare B's transaction attr as "Required", then it will time out sometimes, provided I can't change the transaction time out parameter, how to solve this problem? B needs to do some database updating.


Make it asynchronous for example by putting the work on a queue and doing it later. If that's no good then a) make your code work quicker, b) find another solution c) change your timeout parameter (I don't believe in fixed constraints).
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!