[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: AW: [eclipselink-dev] WG: @QueryHint(name = QueryHints.QUERY_RESULTS_CACHE, value = HintValues.TRUE)
|
Hi Adrian,
Thanks for the additional information.
I have entered the following bug:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=301063
-Tom
Goerler, Adrian wrote:
Hi Tom,
it turned out that the issue is caused by the properties
test.agent=-Dignore
test.weaving=-DTEST_NO_WEAVING=true.
If I remove these properties, I get a clean test run.
Kind of strange that the query cache requires weaving.
Also, it worked before. There must be some regression.
-Adrian
Adrian Görler
SAP AG
Pflichtangaben/Mandatory Disclosure Statements: http://www.sap.com/company/legal/impressum.epx
-----Ursprüngliche Nachricht-----
Von: eclipselink-dev-bounces@xxxxxxxxxxx [mailto:eclipselink-dev-bounces@xxxxxxxxxxx] Im Auftrag von Goerler, Adrian
Gesendet: Mittwoch, 27. Januar 2010 09:42
An: Ware,Tom
Cc: Dev mailing list for Eclipse Persistence Services
Betreff: AW: [eclipselink-dev] WG: @QueryHint(name = QueryHints.QUERY_RESULTS_CACHE, value = HintValues.TRUE)
Hi Tom,
I am running on trunk. Freshly synched and built.
These are my test.properties:
---snip---
jdbc.driver.jar=W:/SVNS/extension.lib.external/mysql-connector-java-5.1.8-bin.jar
db.driver=com.mysql.jdbc.Driver
db.url=jdbc:mysql://localhost/EL
db.user=me
db.pwd=abcd1234
db.platform=org.eclipse.persistence.platform.database.MySQLPlatform
test.agent=-Dignore
test.weaving=-DTEST_NO_WEAVING=true
server.weaving=false
server.name=netweaver
---snap---
Any idea what's wrong?
-Adrian
Adrian Görler
SAP AG
Pflichtangaben/Mandatory Disclosure Statements: http://www.sap.com/company/legal/impressum.epx
-----Ursprüngliche Nachricht-----
Von: eclipselink-dev-bounces@xxxxxxxxxxx [mailto:eclipselink-dev-bounces@xxxxxxxxxxx] Im Auftrag von Tom Ware
Gesendet: Dienstag, 26. Januar 2010 20:09
An: Dev mailing list for Eclipse Persistence Services
Betreff: Re: [eclipselink-dev] WG: @QueryHint(name = QueryHints.QUERY_RESULTS_CACHE, value = HintValues.TRUE)
Hi Adrian,
Exactly what version are you running on? Have you done anything special to
the configuration? The nightly tests, and my local run both pass that test.
-Tom
Goerler, Adrian wrote:
Hi,
I synched and ran the JPA tests and the test
org.eclipse.persistence.testing.tests.jpa.jpql. AdvancedQueryTestSuite
.testQueryCache fails:
testQueryCacheFailureList result size is not correct.
junit.framework.AssertionFailedError: List result size is not correct.
at
org.eclipse.persistence.testing.tests.jpa.jpql.AdvancedQueryTestSuite.testQueryCache(AdvancedQueryTestSuite.java:775)
at
org.eclipse.persistence.testing.framework.junit.JUnitTestCase.runBare(JUnitTestCase.java:457)
0.015
Seems that the very feature I was investigating just stopped working in
the very same moment .
-Adrian
_____________________________________________
*Von:* Goerler, Adrian
*Gesendet:* Montag, 25. Januar 2010 18:27
*An:* Dev mailing list for Eclipse Persistence Services
*Betreff:* @QueryHint(name = QueryHints.QUERY_RESULTS_CACHE, value =
HintValues.TRUE)
Hi,
I am experiencing trouble with this query hint
@NamedQuery(name = "getAllDepartmentsCached", query = "select d from
Department d", hints = { @QueryHint(name =
QueryHints.QUERY_RESULTS_CACHE, value = HintValues.TRUE) })
@Cacheable(true)
@Entity
public class Entity Department {
.
The first time, I am executing the named query, I get the expected
result. But if I execute it again, the result is empty:
*public* *void* testCachedQueryWithoutParameters() *throws*
SQLException {
init();
EntityManager em = getEnvironment().getEntityManager();
*try* {
Query query = em.createNamedQuery("getAllDepartmentsCached");
List<Department> result = query.getResultList();
/assertEquals/(result.size(), 2);
result = query.getResultList();
/assertEquals/(result.size(), 2); <<<<< size is 0 now!
} *finally* {
closeEntityManager(em);
}
}
Are there any preconditions I'd have to fulfill in order to uses the
QUERY_RESULTS_CACHE hint?
I have switched the default caching off:
<property name="eclipselink.cache.shared.default" value="false"/>
Any ideas?
-Adrian
*Adrian Görler
**SAP AG
*Pflichtangaben/Mandatory Disclosure Statements:
_http://www.sap.com/company/legal/impressum.epx_
------------------------------------------------------------------------
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev