Issue Details (XML | Word | Printable)

Key: NUCCACHE-26
Type: Bug Bug
Status: Closed Closed
Resolution: Won't Fix
Priority: No Testcase No Testcase
Assignee: Unassigned
Reporter: subes
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Cache

ehcache working, but queries are still executed

Created: 02/Oct/11 07:25 PM   Updated: 07/Dec/11 11:14 PM   Resolved: 03/Oct/11 07:20 AM
Component/s: EHCache
Affects Version/s: 3.0.1
Fix Version/s: None

File Attachments: 1. Zip Archive ehcache_bug.zip (38 kB)


Datastore: H2
Severity: Development


 Description  « Hide
I've not successfully integrated ehcache with datanucleus. Via debugging I verified that the cache is used properly and works fine. Though as it seems even when L2Cache and QueryCache is enabled for JPA, datanucleus still executes the queries even if the caches produced a hit.

See attachment for the involved configuration and java classes. The effect is visible when comparing the test sql log for CachedTestDaoTest.java#testL2Cache().

Hibernate produces:
2011-10-02 19:19:09,808 [1|main ] INFO de.invesdwin.TRANSACTIONS.getTransaction - begin #1: [1025601370]
2011-10-02 19:19:09,885 [1|main ] DEBUG com.jolbox.bonecp.PreparedStatementHandle.executeQuery - select sequence_next_hi_value from hibernate_sequences where sequence_name = 'CachedTestEntity' for update
2011-10-02 19:19:09,904 [1|main ] DEBUG com.jolbox.bonecp.PreparedStatementHandle.execute - insert into hibernate_sequences(sequence_name, sequence_next_hi_value) values('CachedTestEntity', 0)
2011-10-02 19:19:09,906 [1|main ] DEBUG com.jolbox.bonecp.PreparedStatementHandle.executeUpdate - update hibernate_sequences set sequence_next_hi_value = 1 where sequence_next_hi_value = 0 and sequence_name = 'CachedTestEntity'
2011-10-02 19:19:10,069 [1|main ] DEBUG com.jolbox.bonecp.StatementHandle.executeBatch - insert into CachedTestEntity (aktualisiert, angelegt, version, name, id) values ('[SQL NULL of type 93]', 2011-10-02 19:19:09.832, 0, 'testL2Cache', 1)
2011-10-02 19:19:10,074 [ |main ] INFO de.invesdwin.TRANSACTIONS.commit - commit #1: [1025601370]

while Datanucleus produces:
2011-10-02 19:18:03,287 [1|main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT "NEXT_VAL" FROM "SEQUENCE_TABLE" WHERE "SEQUENCE_NAME"=<'de.invesdwin.gemeinsam.persistenz.api.AEntity'> FOR UPDATE
2011-10-02 19:18:03,288 [1|main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT MAX("id") FROM "CachedTestEntity"
2011-10-02 19:18:03,289 [1|main ] DEBUG DataNucleus.Datastore.Native.debug - INSERT INTO "SEQUENCE_TABLE" ("SEQUENCE_NAME","NEXT_VAL") VALUES (<'de.invesdwin.gemeinsam.persistenz.api.AEntity'>,<11>)
2011-10-02 19:18:03,393 [1|main ] DEBUG DataNucleus.Datastore.Native.debug - BATCH [INSERT INTO "CachedTestEntity" ("version","aktualisiert","angelegt","name","id") VALUES (<1>,<null>,<2011-10-02 19:18:03.295>,<'testL2Cache'>,<1>)]
2011-10-02 19:18:03,418 [ |main ] INFO de.invesdwin.TRANSACTIONS.commit - commit #1: [956404341]
2011-10-02 19:18:03,467 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,474 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,479 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,485 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,493 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,500 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,505 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,513 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,517 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,521 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,532 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,545 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,553 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,567 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,580 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,588 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,595 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,600 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,605 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,609 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,614 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,618 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,622 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,627 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,632 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,637 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,674 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,678 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,688 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,705 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,708 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,712 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,722 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,730 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,738 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,747 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,758 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,762 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,771 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,782 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,793 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,796 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,804 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,808 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,821 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,827 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,831 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,835 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,838 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,841 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,844 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,847 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,852 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,855 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,859 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,862 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,866 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,869 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,872 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,876 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,879 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,882 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,884 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,887 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,890 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,893 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,895 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,898 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,901 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,904 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,906 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,910 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,913 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,916 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,919 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,923 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,925 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,928 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,931 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,934 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,937 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,939 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,942 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,945 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,949 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,952 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,955 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,958 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,961 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,964 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,967 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,970 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,973 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,975 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,978 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,981 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,984 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,987 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,990 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>
2011-10-02 19:18:03,993 [ |main ] DEBUG DataNucleus.Datastore.Native.debug - SELECT 1 FROM "CachedTestEntity" "A0" WHERE "A0"."id" = <1>

Sort Order: Ascending order - Click to sort in descending order
subes added a comment - 02/Oct/11 07:26 PM
the said classes and configuration files

Andy Jefferson added a comment - 02/Oct/11 08:04 PM
Perhaps revisit the DN problem reporting guide.
http://www.datanucleus.org/project/problem_jpa_testcase.html
Obviously setting "datanucleus.findObject.validateWhenCached" would make sense if you are in a situation where you want to believe any object in the L2 cache exists - which is not always correct when running other systems on the same datastore.

subes added a comment - 02/Oct/11 09:05 PM - edited
That helped, thanks. Didn't know about that property. For me it is ok to not check that even in a distributed environment. It will just throw an exception when trying to do some dml on the specific entity. Also I mostly only use @Cacheable on entities I mostly only read.

About the reporting guide, for these two issues it would have been wasted effort for me to create a runnable test case for this as it obviously was easy for you to spot the problem. If people always have to follow some specific guideline to create bug reports, they might not even bother reporting anything. Also there is a saying with software development processes: Any guideline that is not enforced, won't be followed. That's why there are things like checkstyle, findbugs or code reviews that enforce some types of conventions,

Anyway, thanks for the help!

Chris Colman added a comment - 07/Dec/11 11:14 PM
Is pm.getObjectById(...); also called whenever navigating along a relationship causes an on demand load of an object?

If an object is updated does DN automatically evict it from the L2 cache?

For the scenario of a single application instance accessing the database I am trying to find if there's any case where setting

datanucleus.findObject.validateWhenCached=false

might not work or if it's completely safe and would save us a lot of redundant DB queries.