• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How do I make RMS store persistent during development?

 
Ranch Hand
Posts: 977
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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


 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic