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

Rick Curtis closed OPENJPA-2322.
--------------------------------

    Resolution: Not A Problem
      Assignee: Rick Curtis

Please move this question to the users mailing list[1]. We typically use JIRAs 
for fixing bugs, not for open ended discussions. When you repost to the users 
list, please try to reword your question.... I don't quite follow what problem 
you're having.

Thanks,
Rick

[1] http://openjpa.apache.org/mailing-lists.html
                
> Duplicate Update upto 2000 times update DB for the same record 
> ---------------------------------------------------------------
>
>                 Key: OPENJPA-2322
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2322
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: build / infrastructure, writebehind
>    Affects Versions: 1.2.2
>         Environment: Websphere 7.0.0.19 running Windows 2008 Standard Server; 
> DB: Oracle 11i Running in AIX
>            Reporter: Raghu
>            Assignee: Rick Curtis
>
> After implementing the getEm().flush(); and getEM().clear(); the problem of 
> update duplicate times for 2000 of times is resolved but created a new 
> problems with Oracle and increase the Shared Pool memory. 
> Is that advise on this OPEN JPA Behaviour
> CODE WHICH GOT THE PROBLEM Duplicate Update (v0) with 2000 version increment:
> @Override
>       public VisitDiagnosisTx saveVisitDiagnosisTx(VisitDiagnosisTx 
> visitDiagTx) {
>               VisitDiagnosisTx updatedVisitDiagTx = null; 
>               if(Long.valueOf(visitDiagTx.getId())==null || 
> Long.valueOf(visitDiagTx.getId())==0L)
>                       
> updatedVisitDiagTx=(VisitDiagnosisTx)visitDiagnosisTxBean.create(visitDiagTx);
>               else
>                       
> updatedVisitDiagTx=(VisitDiagnosisTx)visitDiagnosisTxBean.update(visitDiagTx);
>                       
>               return updatedVisitDiagTx;
>       }
> NEW CODE WHICH RESOLVED DUPLICATE UPDATES (v1) with only 1 version increment:
>       @Override
>       public VisitDiagnosisTx saveVisitDiagnosisTx(VisitDiagnosisTx 
> visitDiagTx) {
>               VisitDiagnosisTx updatedVisitDiagTx = null; 
>               if(Long.valueOf(visitDiagTx.getId())==null || 
> Long.valueOf(visitDiagTx.getId())==0L)
>                       
> updatedVisitDiagTx=(VisitDiagnosisTx)visitDiagnosisTxBean.create(visitDiagTx);
>               else
>                       
> updatedVisitDiagTx=(VisitDiagnosisTx)visitDiagnosisTxBean.update(visitDiagTx);
>               visitDiagnosisTxBean.getEm().flush();
>               visitDiagnosisTxBean.getEm().clear();   
>               return updatedVisitDiagTx;
>       }
> Does this cause any Abnormal JPA Behaviour?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to