09-11-2008 07:58 AM
Hi,
I am using JDE 1.5 MDS simulator, and iam storing one vector object in persistent store, immediately i can able get this stored object at this time so it is working fine. But Once If i close the simulator and start it again, then i am unable to get that stored object. Iam using below code
public static PersistentObject _store = PersistentStore.getPersistentObject(0x2f4b60db4f02
308bL); Vecor vectorObject = new Vector(); ComponentVO info = new ComponentVO(); //This is vo vectorObject.addElement(info); synchronized (_store){ _store.setContents(vectorObject); _store.commit(); } //for get the stored object public Vector readVoFromPersistentStore() { synchronized (_store){ return (Vector)_store.getContents(); } }
Please provide your solution for this. Advanced Thanks.
Regards
Sunil.G
09-11-2008 08:52 AM
09-12-2008 02:49 AM
Yes, I have mentioned 'PersistentStore.getPersistentObject()' this you can find in my first post having first line in code. That is
public static PersistentObject _store = PersistentStore.getPersistentObject(0x2f4b60db4f02
308bL);
iam getting values also from store, but I am unable to get the same when i trying to get the values after simulator restart. Againg i have to store the object in persistentObject then only i can retrieve.
09-12-2008 05:40 AM
Are you starting the Simulator separately, or under control of the JDE? What level JDE are you using? You say 1.5, but I suspect you mean 4.5?
I've not looked seriously at this, but I think I have found that if I start the Sim from the JDE, typically after making a few changes in my application, then it will restart the simulator and delete Objects associated with my app. I guess it does this on the grounds that what I have really done, is delete my app, change it, then reinstall and restart the device. I think this is probably reasonable, though a little annoying if all I've done is change a Screen.....