BlackBerry Forums Support Community               

Closed Thread
LinkBack Thread Tools
Old 09-12-2008, 10:20 PM   #1 (permalink)
Thumbs Must Hurt
Join Date: Apr 2008
Model: 8130
Carrier: US Cellular
Posts: 82
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default RecordStore persistence

Please Login to Remove!

I'm using RecordStore to persist data between instances of my app. It seems my records are lost when I reinstall the program. Is that the correct behavior?

Old 09-12-2008, 10:32 PM   #2 (permalink)
BlackBerry Extraordinaire
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts

"Correct" is a slippery term. We've noticed that BB OS on the device will often remove the persistent storage for a program if the COD files are removed. However, I haven't seen this occur when the CODE file(s) are only replaced.
Old 09-14-2008, 02:53 PM   #3 (permalink)
Thumbs Must Hurt
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts


I'm not familiar with the behavior of J2ME RecordStore on the BlackBerry OS, I try to use the BlackBerry PersistentStore to retain information between application stop/start, it lets me leverage the use of a BES to backup/restore the persistently-stored information.

However, my team has determined the following: while using PersistentStore, information will be retained across deleting an application and re-installing it if the contents of the app's persistent storage are all objects of class types that are available in the OS (things like java.lang.String, java.util.Vector, any of the net.rim.* types, etc.). If the contents are objects of class types that are specific to your application, the device OS will remove the persistent store if your application is deleted. The device will not maintain objects in the persistent store (and probably also the J2ME RecordStore) if it cannot find class definitions that represent those objects. If your data is not high-security, you probably should find a way to serialize it in the storage mechanism. That way the data will be there even if the application is removed.


Karl G. Kowalski
Owns a RAZR
Develops for BlackBerry
So next phone will iPhone 3G!
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Copyright 2004-2014
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.