datanucleus

Persist java.util.Properties as serialized object using JDO/DataNucleus

The Google AppEngine docs say that I can persist serializable objects using JDO like so import javax.jdo.annotations.Persistent; import DownloadableFile; // ... @Persistent(serialized = "true") private DownloadableFile file; but if I use it with Properties @Persistent(serialized="true") private Properties initProps; I get Data...

DataNucleus: How do I automatically perform actions when commiting a transaction?

Consider having an application using DataNucleus with the following persistence structure: You have a class that has two attributes like created (Date) and lastUpdate (Date): How do you automatically fill those attributes with the appropriate values when an object of this class is going to be committed? Appropriate values would be sett...

Transitioning from Castor to JPA

I am trying to make my java application more standards compliant and one of the biggest issues i am facing is transitioning our ORM framework from Castor JDO to a JPA implementation (thinking either Hibernate or DataNucleus). We have our own persistent data abstraction layer so the basic refactoring can easily be done by adding a JPA imp...

Problem using datanucleus enhancer in a maven google app engine project

I'm having a problem setting up datanucleus enhancer to use with a google app engine project. If I use the datanucleus eclipse pluggin everything goes well, but in my maven project I get a strange conflicting version error. My POM has these datanucleus references: <dependency> <groupId>org.datanucleus</groupId> <artifactId>data...

How to turn off DataNucleus Enhancer while working with Google App Engine

I am working in Eclipse on a Google AppEngine Java code. Every time I save a java file, the DataNucleus Enchancer starts off "Enhancement of Classes". Its quite irritating since it takes away focus when you are in full screen mode. Anybody knows how I can turn it off? If I turn it off, will it affect my ability to deploy my application ...

MySQL + Windows VISTA / 7 = Crashes with Eclipse RCP + Datanucleus app.

Hi there. I'm having a big problem with MySQL + Datanucleus + Windows Vista / 7. THE Problem is so SEVERE, the MySql Server Shuts Down! PROBLEM OCCURS: with DN 1.0.0.m3 + MySQL 5.1.x (LOCAL) + Vista. when performing deletePersistent of an object that has a LIST in the structure (a deletePersistentAll of the LIST is issued BEFORE del...

DataNucleus Enhancer flakey?

I'm creating a GWT app in Google App Engine, and using Google data store. Does anybody else have the problem of the DataNucleus being flakey as all get out? I can save a class, and DataNucleus will do it's thing just fine. If I change ANYTHING in the class (even adding whitespace) and then save, I get the following error: DataNucle...

Google DataStore not storing child objects

I have an entity Course that has a key to another entity (Document) inside. @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true") public class Course{ @PrimaryKey @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY) private Key key; @Persistent private Key document; public Document getDocume...

Many-to-Many relationship in DataNucleus (JDO) doesn't persist

Hi, I don't manage to persist a many-to-many link with DataNucleus using JDO. I have two classes Book and Shop. This is the orm mapping file: <?xml version="1.0"?> <!DOCTYPE orm PUBLIC "-//Sun Microsystems, Inc.//DTD Java Data Objects Metadata 2.0//EN" "http://java.sun.com/dtd/orm_2_0.dtd"&gt; <orm> <package name="com.my...

Delete an entity by key without fetching it first in app engine (using JDO)

Is there a way to delete an entity without having to fetch it from the datastore first? I am assuming I already have the key or id for the entity. I'm thinking of something like deleteObjectById that would be an analogue to getObjectById on PersistenceManager. The closest I can think of is using Query.deletePersistentAll() (as seen her...

Swap two elements in a list using JDO on Google Appengine

I have a TestEntity that has an ArrayList of ChildEntities. They are joined in a owned relationship. I want to get the Entity from the datastore, update an int field in the child entity, and then swap the position of the two child entities. However, as soon as I swap the entities, it appears as though the updates to the int field are e...

Troubleshooting DataNucleus JDO

I am using the Eclipse plugin for Google App Engine 1.2.6 and Web Toolkit 1.7.1 DataNucleus/JDO is driving me mad! I suspect either my creates are silently erroring out before being written AND/OR the reads are inconsistently populating the objects. I could use some tips on figuring out what is really happening. Using a minimally unm...

Do gae datanucleus annotations modify our java code?

I placed this question in Google groups for gae java (http://groups.google.com/group/google-appengine-java/browse%5Fthread/thread/85dc9f10d7e12a3), but sometimes it takes a week for someone to bother answering a question and I feel I need to know the answer much quicker. We are advised to have our persistent fields accessible only thro ...

JDO not fetching collection member field.

Hi Have a class: class Node implements Serializable { private String name; public String getName { return name; } public void setName(String val){ name = val; } public Node(){} } @PersistenceCapable(identityType = IdentityType.APPLICATION, detachable="true") class NodeBag implements Serializable { @PrimaryKey ...

example using memcache with jpa entitymanager on JGAE?

any example on using memcache/general cache with jpa entitymanager on JGAE? or the only way to do it is manually put/set memcache on service layer? ...

GAE,can persist but cannot load(createQuery) entity

1.i able to persist entity, and in _admin , i able to see key, id/name. total 6 results. but why it not show all the property inside my entity class? 2. when i try use createQuery , i cannot load the object. there is no error in the console. the code just stuck afer hitting query.getResultList(); 14:41:31,047 DEBUG [DataNucleus.Persi...

Datanucleus/JDO Level 2 Cache on Google App Engine

Is it possible (and does it make sense) to use the JDO Level 2 Cache for the Google App Engine Datastore? First of all, why is there no documentation about this on Google's pages? Are there some problems with it? Do we need to set up limits to protect our memcache quota? According to DataNucleus on Stackoverflow, you can set the follow...

getObjectsById on App Engine

According to JDO, you can use PersistenceManager.getObjectsById to load multiple entity instances by their object id. What kind of Collection does one need to use here? A Google Data Store Key does not work as object id. ...

Appengine jdoconfig.xml for local database

Has anyone successfully configured JDO datanucleus default to google app engine to work on a local database? Why am I always getting an error in jdoconfig.xml when I have specified the property "datanucleus.storeManagerType" with value "rdbms." at the end part. I tried googling but seems no luck. Caused by: org.datanucleus.exceptions....

Eclipse + DN + C3P0

I'm trying to put C3P0 up & running. http://www.datanucleus.org/products/accessplatform/rdbms/c3p0.html I have These as Plugins (app runs fine): datanucleus-connectionpool-1.0.2.jar datanucleus-core-1.1.0.m3.jar datanucleus-enhancer-1.1.0.m1.jar datanucleus-rdbms-1.1.0.m3.jar I added (to the classpath): c3p0-0.9.1.2.jar And the par...