[ 
https://issues.apache.org/jira/browse/OFBIZ-4282?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13035214#comment-13035214
 ] 

Karl Eilebrecht commented on OFBIZ-4282:
----------------------------------------

Hi Philippe,

I saw that you're trying to improve TransactionUtil. 
Did you review the following issue?
https://issues.apache.org/jira/browse/OFBIZ-1029
Some years ago I refactored the transaction handling completely for my company
because we had some requirements and could not live with some of the
(maybe still today) contained limitations and bugs. However the proposal was 
never 
reviewed, yet, and we then "developed away" a little from standard Ofbiz. 
But I can tell you, that we are using this code for years now without 
any problems, fast and reliable.

Here is a list what I did:
 * problem suspending transaction in status rollback
 * improved state stack for begin-suspend-resume ... commit/rollback cycle 
(original implementation loses information)
 * improved (less) synchronization
 * improved timestamp creation
 * introduced transaction id (for logging/debugging)
 * fixed bug in cleanSuspendedTransactions (cleanup should not abort after 
single rollback error)
 * added comments/API-doc

Maybe you could take a look at it and include some ideas into
your work. 
 
Regards and good luck!
Karl

> TransactionUtil performance optimisations
> -----------------------------------------
>
>                 Key: OFBIZ-4282
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-4282
>             Project: OFBiz
>          Issue Type: Improvement
>          Components: framework
>    Affects Versions: SVN trunk
>            Reporter: Philippe Mouawad
>              Labels: PERFORMANCE
>         Attachments: patch-OFBIZ-4282.patch
>
>
> Hello,
> Reviewing TransactionUtil code, I have seen 2 problems:
> - internalBegin is uselessly synchronized , since it is a static method it is 
> a very big useless Contention Point since not unthread safe instance variable 
> is used 
> - debugResources is true which creates a DebugXAResource (that creates an 
> Exception) , it should be false and made an option for debuging
> These 2 modifications have been in our production for a while and we noticed 
> CPU reduction and no more contention on TransactionUtil#begin
> Regards
> Philippe Mouawad
> http://www.ubik-ingenierie.com

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to