DataNucleus JIRA is now in read-only mode. Raise any new issues in GitHub against the plugin that it applies to. DataNucleus JIRA will remain for the foreseeable future but will eventually be discontinued
Issue Details (XML | Word | Printable)

Key: NUCCORE-539
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Trivial Trivial
Assignee: Erik Bengtson
Reporter: Erik Bengtson
Votes: 0
Watchers: 1
Operations

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

Make IdentityReference class Serializable, so it can be used in level2 cache

Created: 02/Jun/10 09:43 PM   Updated: 11/Jun/10 01:38 PM   Resolved: 02/Jun/10 09:45 PM
Component/s: Cache
Affects Version/s: None
Fix Version/s: 2.1.0.release


 Description  « Hide

A situation where IdentityReference needs to be serializable

Caused by: java.lang.IllegalArgumentException: can't accept class org.datanucleus.identity.IdentityReference as a memcache entity
at com.google.appengine.api.memcache.MemcacheSerialization.serialize(MemcacheSerialization.java:262)
    at com.google.appengine.api.memcache.MemcacheSerialization.makePbKey(MemcacheSerialization.java:199)
    at com.google.appengine.api.memcache.MemcacheServiceImpl.get(MemcacheServiceImpl.java:234)
    at com.google.appengine.api.memcache.stdimpl.GCache.remove(GCache.java:174)
    at org.datanucleus.cache.javaxcache.JavaxCacheLevel2Cache.evict(JavaxCacheLevel2Cache.java:192)
    at org.datanucleus.ObjectManagerImpl.performLevel2CacheUpdateAtCommit(ObjectManagerImpl.java:2982)
    at org.datanucleus.ObjectManagerImpl.preCommit(ObjectManagerImpl.java:2925)
    at org.datanucleus.TransactionImpl.internalPreCommit(TransactionImpl.java:369)
    at org.datanucleus.TransactionImpl.commit(TransactionImpl.java:256)
    at org.datanucleus.jpa.EntityTransactionImpl.commit(EntityTransactionImpl.java:104)


Erik Bengtson made changes - 02/Jun/10 09:45 PM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Andy Jefferson added a comment - 03/Jun/10 07:28 AM - edited
Isn't IdentityReference a temporary identity, while waiting for the real identity to be assigned ? So why is that object being put in the L2 cache with it? The id should be real at that point. Perhaps it was really just
http://www.datanucleus.org/servlet/jira/browse/NUCCORE-540
and that class doesn't need to be Serializable at all

Andy Jefferson made changes - 11/Jun/10 01:38 PM
Status Resolved [ 5 ] Closed [ 6 ]