You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@openjpa.apache.org by Michael Dick <mi...@gmail.com> on 2009/08/14 03:12:55 UTC

Re: inconsistent SQL's RESOURCE_LOCAL Vrs JTA

In addition to Ravi's comments it sounds like there's a different in which
fields are eagerly / lazily fetched. Which version of OpenJPA are you using
for the RESOURCE_LOCAL tests (there is a change this behavior recently so
trunk might be different from say 1.2.1).

-mike

On Mon, Jul 27, 2009 at 5:13 PM, Ravi P Palacherla <
ravi.palacherla@oracle.com> wrote:

>
> Hi,
>
> My guess is that the SQL generation should not be different between JTA and
> RESOURCE_LOCAL.
>
> Can you please add default trace level logging to both the scenarios and
> attach the logs here.
>
> That way we can compare between both scenarios and find if there are any
> differences in the properties between JTA and RESOURCE_LOCAL.
>
> You may already know, adding "<property name="openjpa.Log"
> value="DefaultLevel=TRACE"/>" to persistence.xml will set the logging level
> to trace.
>
> Regards,
> Ravi.
>
>
> brobbsnet wrote:
> >
> > please my project runs ok and generate all Sql statements under
> > RESOURCE_LOCAL persistence.xml. when i change to run in the container
> > using JTA , it does not generate the same number on sql statements
> causing
> > the application to throw exceptions.
> >
> > for example when i run a test under RESOURCE_LOCAL, it prints out this
> two
> > sql statements as follows.
> >
> > 1.  TRACE  [main] openjpa.jdbc.SQL - <t 1981891711, conn 35138160>
> > executing prepstmnt 1171248050 SELECT t0.PRSN_ID,
> > t1.CUSTOMER_ID,.......................etc.........
> > TRACE  [main] openjpa.jdbc.SQL - <t 1981891711, conn 35138160> [16 ms]
> > spent
> >
> > 2.  ChampAppEJBPU  TRACE  [main] openjpa.jdbc.SQL - <t 1981891711, conn
> > 596825604> executing prepstmnt 1703379623 SELECT t0.INVOICE_ID,
> > t0.EST_WAIVER, ........................................etc....
> >
> > The same persistence.xml setup on the server using JTA and XA datasource
> > only prints out one statement.
> >
> > TRACE  [main] openjpa.jdbc.SQL - <t 1981891711, conn 35138160> executing
> > prepstmnt 1171248050 SELECT t0.PRSN_ID,
> > t1.CUSTOMER_ID,.......................etc.........
> >
> > This results in the data from the second sql missing to the application.
> >
> > clearly something is wrong. I am using WASCE (websphere community edition
> > Version 2.1.1.2) and Apache Derby database. Is there something in the JTA
> > configuration that i am missing ?
> >
> > Any thoughts will be appreciated.
> >
> >
> >
>
> --
> View this message in context:
> http://n2.nabble.com/inconsistent-SQL%27s-RESOURCE_LOCAL-Vrs-JTA-tp3331934p3336665.html
> Sent from the OpenJPA Users mailing list archive at Nabble.com.
>