[appengine-java] Memory based application, static field, data lost

2010-10-26 Thread yoyo
Hello everyone. I've a issue when using my apps. All my logics application data are in memory. For exemple, I've a servlet like this : public class MyServlet { /** Logic application object, create when the class is loaded by the sandbox. */ private static Logics myLogic = new Logics(); /*

[appengine-java] Re: Memory based application, static field, data lost

2010-10-26 Thread yoyo
Thanks for your answear. So, GOE discard instances in cases of low usage. I didn't know. My app is an image board, like 4chan.org. The blowstore api in only available for billing account. I can't use the blowstore because my app isn't commercial. I write it only for fun and i don't want to pa

Re: [appengine-java] Re: Memory based application, static field, data lost

2010-10-27 Thread yoyo
idea to do this. Thanks again for your answear, and have a nice day. 2010/10/27 Simon > Yoyo, you are aware that you only have to enable your account as > billable and that it doesn't actually cost anything as long as you > stay within the free quota? See the Quota page

[appengine-java] JDO - I can't update an object with One-to-One Relationships

2011-01-02 Thread yoyo
uz.tracer.server.impl.pojo.POJOUser; /** * Implementation of a Data Access Layer using Google AppEngine framework. * * @author yoyo */ public class DataAccessLayerForGoogleAppEngine implements DataAccessLayer { // TODO user and admin name MUST be unique (primary key). /**

[appengine-java] Re: JDO - I can't update an object with One-to-One Relationships

2011-01-03 Thread yoyo
I answer to myself. Before to do the setXXX(), I must delete the previous object. Like this : POJOUser user = pm.getObjectById(POJOUser.class, username); pm.deletePersistent(user.getLastLocation()); user.setLastLocation(new POJOLocation(newLocation)); And now, it works. Moreover, old reference

Re: [appengine-java] Re: JDO - I can't update an object with One-to-One Relationships

2011-01-04 Thread yoyo
Thanks Stevko, but I still have the issue. I've add the annotation, without success. I've change the primary key of POJOUser from String to Key, without success. I've add a transaction for make the update, without success. I will make a bidirectionnal relationship this night, for testing. I hope

Re: [appengine-java] Re: JDO - I can't update an object with One-to-One Relationships

2011-01-04 Thread yoyo
The update still don't works. I give up. I use the "@Persistent(dependent = "true")" and add the delete instruction when I update the user location, in a transaction. Now it works, but I think it's not very clean/efficient. Have a nice day. public void updateUserLocation(String username, Locati

Re: [appengine-java] Re: JDO - I can't update an object with One-to-One Relationships

2011-01-04 Thread yoyo
lly delete the first reference, the parent now refer his new children. Weird. 2011/1/4 Stephen Johnson > Why do you have to delete the location entity? Why not just update the > current location entity with the new coordinates? That would be much > more efficient. > > > On Tue

Re: [appengine-java] Re: JDO - I can't update an object with One-to-One Relationships

2011-01-04 Thread yoyo
pper between Java and the Datastore > and it works very well for me. > > > On Tue, Jan 4, 2011 at 10:56 AM, yoyo wrote: > >> I don't really have to do like that. Your solution is more clean and I >> will use it. Thanks. >> But for learning purpose, I've used