[
https://issues.apache.org/jira/browse/OFBIZ-2353?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jacques Le Roux updated OFBIZ-2353:
-----------------------------------
Comment: was deleted
(was: Something which is interesting to note: SequenceBank.refresh uses
SequenceBank.fillBank but leads only to (is used by) 19 references
While SequenceBank.fillBank with SequenceBank.getNextSeqId leads to
GenericDelegator.getNextSeqId which leads to 130 references where
SequenceBank.refresh is not used
{noformat}
SequenceBank.fillBank => 3 references
<- SequenceBank.refresh <- SequenceUtil.forceBankRefresh <-
GenericDelegator.createSetNextSeqId => 19 references
<- SequenceBank.SequenceBank <- SequenceUtil.getBank <-
SequenceUtil.getNextSeqId
<- SequenceBank.getNextSeqId <- SequenceUtil.getNextSeqId <-
GenericDelegator.getNextSeqIdLong => 3 references
<- SequencedIdToEnv.exec (minilang)
<- another GenericDelegator.getNextSeqIdLong <-
PartyWorker.createClubId (unused)
<- GenericDelegator.getNextSeqId <- another
GenericDelegator.getNextSeqId => 130 references
{noformat}
So I think we are not talking exactly of the same thing and I'm more interested
by the last GenericDelegator.getNextSeqId.)
> 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, Trunk
> Reporter: Philippe Mouawad
> Assignee: Jacopo Cappellato
> Priority: Critical
> Fix For: Release Branch 10.04, Release Branch 11.04, Trunk
>
> Attachments: OFBIZ-2353 SELECT FOR UPDATE solution.patch, 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 was sent by Atlassian JIRA
(v6.2#6252)