You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2011/06/05 11:12:53 UTC

[jira] [Updated] (OFBIZ-2353) SequenceUtil may generate duplicate IDs in Load Balancing mode

     [ https://issues.apache.org/jira/browse/OFBIZ-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux updated OFBIZ-2353:
-----------------------------------

    Attachment: OFBIZ-2353 SELECT FOR UPDATE solution.patch

The OFBIZ-2353 SELECT FOR UPDATE solution.patch provides a simple mean to quicly resolve this issue.

It's a very rough patch. I did not remove the bank loop (useless since there is a DB contention). And I created a cluster general property where I think we could rather rely on cluster usage or not in ofbiz-container.xml.

So it's not intended to inclusion at this stage, just a WIP working solution ...

> SequenceUtil  may generate duplicate IDs in Load Balancing mode
> ---------------------------------------------------------------
>
>                 Key: OFBIZ-2353
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-2353
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Release Branch 4.0, Release Branch 09.04, SVN trunk
>            Reporter: Philippe Mouawad
>            Assignee: Adam Heath
>            Priority: Critical
>         Attachments: OFBIZ-2353 SELECT FOR UPDATE solution.patch
>
>
> If Ofbiz is deploy on 2 servers in Load Balancing Mode
> SequenceUtil will generate duplicate IDs because synchronization is done at JVM level instead of doing it in DB.
> A good replacement implementation would be:
> org.hibernate.id.enhanced.TableGenerator
> But it would involve a dependency on Hibernate
> Philippe
> www.ubik-ingenierie.com

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