persistence@glassfish.java.net

RE: How to display Toplink's generated query?

From: Gordon Yorke <gordon.yorke_at_oracle.com>
Date: Fri, 7 Mar 2008 11:47:02 -0500

TopLink can work without a persistence.xml file but if a persistence.xml file exists then the application is probably attempting to use it. Does your application successfully get a EMF for PU "ipost" ? Is there a datasource "blabla"?
The persistence.xml file should actually be in a META-INF directory at the root of the deployment packaging. It will not be found from a directory called "desc".

Are you sure the application is successfully deploying? Is it using JPA or native TopLink APIs. Is there a sessions.xml file or a TopLink project class that is being used?
--Gordon

-----Original Message-----
From: gcsaba2 [mailto:gcsaba2_at_freemail.hu]
Sent: Friday, March 07, 2008 11:26 AM
To: persistence_at_glassfish.dev.java.net
Subject: RE: How to display Toplink's generated query?



This is the contents of my persistence.xml file:

<persistence>
  <persistence-unit name="ipost">
    <jta-data-source>blabla</jta-data-source>
    <properties>
        <property name="toplink.logging.level" value="FINEST"/>
        <property name="toplink.logging.exceptions" value="true"/>
    </properties>
  </persistence-unit>
</persistence>


So obviously the logging level should allow writing out generated queries.

Of course, it could be that this file is not deployed at all. I'm not really
familiar with the deploy mechanism of the application, but this seems to be
the only persistence.xml file within the application, and it's located in a
directory called "desc", which tells me it's the place where deployment
descriptors should be.

Can Toplink work without a persistence.xml file? Is there a way to find out
if this file is being used at all?
--
View this message in context: http://www.nabble.com/How-to-display-Toplink%27s-generated-query--tp15892878p15899310.html
Sent from the java.net - glassfish persistence mailing list archive at Nabble.com.