You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by Albert Lee <al...@gmail.com> on 2010/04/08 22:33:27 UTC

Re: [jira] Updated: (OPENJPA-1604) Setting PessimisticLockManager fails to append "for update clause" to the select statement

Please localized the trace message.

Thanks
Albert Lee.

On Thu, Apr 8, 2010 at 2:07 PM, Rick Curtis (JIRA) <ji...@apache.org> wrote:

>
>     [
> https://issues.apache.org/jira/browse/OPENJPA-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Rick Curtis updated OPENJPA-1604:
> ---------------------------------
>
>     Attachment: OPENJPA-1604-2.0.x.patch
>                OPENJPA-1604-trunk.patch
>
> > Setting PessimisticLockManager fails to append "for update clause" to the
> select statement
> >
> ------------------------------------------------------------------------------------------
> >
> >                 Key: OPENJPA-1604
> >                 URL: https://issues.apache.org/jira/browse/OPENJPA-1604
> >             Project: OpenJPA
> >          Issue Type: Bug
> >    Affects Versions: 2.0.0, 2.1.0
> >            Reporter: Fay Wang
> >            Assignee: Pinaki Poddar
> >             Fix For: 2.0.0, 2.1.0
> >
> >         Attachments: OPENJPA-1604-2.0.x.patch, OPENJPA-1604-trunk.patch
> >
> >
> >  I ran a testcase against openjpa 1.2, and found that the "for update"
> clause is appended to the SQL when
> >               <property name="openjpa.LockManager" value="pessimistic"/>
> >       is added to the persistence.xml without calling:
> >                q.setLockMode(LockModeType.PESSIMISTIC_WRITE);
> > However, this behavior changes when running against trunk level code
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>


-- 
Albert Lee.

Re: [jira] Updated: (OPENJPA-1604) Setting PessimisticLockManager fails to append "for update clause" to the select statement

Posted by Kevin Sutter <kw...@gmail.com>.
Rick,
I agree.  I don't like localizing trace messages either.  Trace is supposed
to be meant for us developers to help debug a problem.  If it gets localized
to say French, it's no good to me.  But, this should be a whole separate
thread on the dev forum...  :-)

Thanks,
Kevin

On Thu, Apr 8, 2010 at 3:44 PM, Rick Curtis <cu...@gmail.com> wrote:

> Albert -
>
> When I committed the code I changed the trace string to localized warning
> messages, but this brings up a very good point.
>
> I know there is precedence for localizing trace messages, but does that
> mean
> it is the right thing to do? Personally, I like putting trace in my code so
> I can actually figure out what is going on if I have to debug a problem
> after the fact. Requiring a developer to localize all trace messages is a
> burden and in turn reduces the likely hood that someone trace will end up
> in
> our code. As it is today, it is nearly impossible to fix most OpenJPA
> problems on trace alone. Thoughts? ... I've been meaning to throw this one
> out to the group for discussion.
>
> --
> Thanks,
> Rick
>
> On Thu, Apr 8, 2010 at 3:33 PM, Albert Lee <al...@gmail.com> wrote:
>
> > Please localized the trace message.
> >
> > Thanks
> > Albert Lee.
> >
> > On Thu, Apr 8, 2010 at 2:07 PM, Rick Curtis (JIRA) <ji...@apache.org>
> > wrote:
> >
> > >
> > >     [
> > >
> >
> https://issues.apache.org/jira/browse/OPENJPA-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> > ]
> > >
> > > Rick Curtis updated OPENJPA-1604:
> > > ---------------------------------
> > >
> > >     Attachment: OPENJPA-1604-2.0.x.patch
> > >                OPENJPA-1604-trunk.patch
> > >
> > > > Setting PessimisticLockManager fails to append "for update clause" to
> > the
> > > select statement
> > > >
> > >
> >
> ------------------------------------------------------------------------------------------
> > > >
> > > >                 Key: OPENJPA-1604
> > > >                 URL:
> > https://issues.apache.org/jira/browse/OPENJPA-1604
> > > >             Project: OpenJPA
> > > >          Issue Type: Bug
> > > >    Affects Versions: 2.0.0, 2.1.0
> > > >            Reporter: Fay Wang
> > > >            Assignee: Pinaki Poddar
> > > >             Fix For: 2.0.0, 2.1.0
> > > >
> > > >         Attachments: OPENJPA-1604-2.0.x.patch,
> OPENJPA-1604-trunk.patch
> > > >
> > > >
> > > >  I ran a testcase against openjpa 1.2, and found that the "for
> update"
> > > clause is appended to the SQL when
> > > >               <property name="openjpa.LockManager"
> > value="pessimistic"/>
> > > >       is added to the persistence.xml without calling:
> > > >                q.setLockMode(LockModeType.PESSIMISTIC_WRITE);
> > > > However, this behavior changes when running against trunk level code
> > >
> > > --
> > > This message is automatically generated by JIRA.
> > > -
> > > You can reply to this email to add a comment to the issue online.
> > >
> > >
> >
> >
> > --
> > Albert Lee.
> >
>

Re: [jira] Updated: (OPENJPA-1604) Setting PessimisticLockManager fails to append "for update clause" to the select statement

Posted by Rick Curtis <cu...@gmail.com>.
Albert -

When I committed the code I changed the trace string to localized warning
messages, but this brings up a very good point.

I know there is precedence for localizing trace messages, but does that mean
it is the right thing to do? Personally, I like putting trace in my code so
I can actually figure out what is going on if I have to debug a problem
after the fact. Requiring a developer to localize all trace messages is a
burden and in turn reduces the likely hood that someone trace will end up in
our code. As it is today, it is nearly impossible to fix most OpenJPA
problems on trace alone. Thoughts? ... I've been meaning to throw this one
out to the group for discussion.

-- 
Thanks,
Rick

On Thu, Apr 8, 2010 at 3:33 PM, Albert Lee <al...@gmail.com> wrote:

> Please localized the trace message.
>
> Thanks
> Albert Lee.
>
> On Thu, Apr 8, 2010 at 2:07 PM, Rick Curtis (JIRA) <ji...@apache.org>
> wrote:
>
> >
> >     [
> >
> https://issues.apache.org/jira/browse/OPENJPA-1604?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
> ]
> >
> > Rick Curtis updated OPENJPA-1604:
> > ---------------------------------
> >
> >     Attachment: OPENJPA-1604-2.0.x.patch
> >                OPENJPA-1604-trunk.patch
> >
> > > Setting PessimisticLockManager fails to append "for update clause" to
> the
> > select statement
> > >
> >
> ------------------------------------------------------------------------------------------
> > >
> > >                 Key: OPENJPA-1604
> > >                 URL:
> https://issues.apache.org/jira/browse/OPENJPA-1604
> > >             Project: OpenJPA
> > >          Issue Type: Bug
> > >    Affects Versions: 2.0.0, 2.1.0
> > >            Reporter: Fay Wang
> > >            Assignee: Pinaki Poddar
> > >             Fix For: 2.0.0, 2.1.0
> > >
> > >         Attachments: OPENJPA-1604-2.0.x.patch, OPENJPA-1604-trunk.patch
> > >
> > >
> > >  I ran a testcase against openjpa 1.2, and found that the "for update"
> > clause is appended to the SQL when
> > >               <property name="openjpa.LockManager"
> value="pessimistic"/>
> > >       is added to the persistence.xml without calling:
> > >                q.setLockMode(LockModeType.PESSIMISTIC_WRITE);
> > > However, this behavior changes when running against trunk level code
> >
> > --
> > This message is automatically generated by JIRA.
> > -
> > You can reply to this email to add a comment to the issue online.
> >
> >
>
>
> --
> Albert Lee.
>