• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I make RMS store persistent during development?

 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm working in my first project using JME using Eclipse + JME plugin using WTK2.5.2 . In my project I have a login midlet wich authenticates the user and than using other midlets I have to recover the active user using the device to perform other operations. For example I have an FoodMidlet wich requires the autenticate user to be persisted in device. The boring problem I'm facing is that during development I have 2 midlets, 1 for Login Use Case and other to register food for that user. In my code, in the Food Midlet I try to recover the active user in device and than save the food like:


the problem is that during development the RMS storage is volatile and after I have authenticated and user if I stop the LoginMidlet this RMS is erased and than when I run FoodMidlet and try to get active user I get a NullPointerException as expected... I'd like to make the LoginRMS storage persistend during development even after I close my LoginMidlet. How can I have that behavior? How do I configure this?

tx in advance,
[]s
Marcos Maia.

 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finally I have found the solution for this problem. Using WTK2.5.2.

The steps are:

1) Launch the WTK and go to Edit > Preferences
2) Choose storage and than complete the field: Storage root directory (this will be a realative path)
3) Save and close WTK.

Now what changes is that this directory will be used as a persistent storage and WTK will not use the temporary anymore.

[]s
 
Marcos Maia
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Had a problem caused by a bad code fragment that I had write to remove data from local store! My mistake....

Configuring the persistent db dir also helped me to find this bug in my code. (I'm a Java ME newbie after all! )

[]s


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic