Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    May 2005

    J2me RecordStore persistence

    Hello ,

    I have a doubt regarding j2me Recordstore persistence.

    For instance I opened a recordstore and then I added some records using addRecord() and modified some records using setRecord() methods.

    If now my application exits without calling closeRecordStore() , will all the changes be persistently stored? Or can there be a case where recordstore can get corrupt if closeRecordStore() method is not called?

    Javadoc of addRecord() method says:
    "Adds a new record to the record store. The recordId for this new record is returned. This is a blocking atomic operation. The record is written to persistent storage before the method returns."

    I tested it on some of the MIDP2 phones, it seems to work and closeRecordStore() is not mandatory. But I vaguely remember that I had some problems on MIDP1 devices long time back. Can some expert comment on the behavior of j2me recordstore persistence ?


  2. #2
    Super Contributor
    Join Date
    Mar 2006

    Re: J2me RecordStore persistence

    hi goyal,

    As per docs
    "The record store is not actually closed until you call the closeRecordStore method as many times as you called the openRecordStore method to open it. "

    I am not sure what happens if the application is exited without calling the closerecordstore


  3. #3
    Super Contributor
    Join Date
    Feb 2006

    Re: J2me RecordStore persistence

    Once the record store is not closed calling open record store again once you launch the application for the second time,will cause problems.


  4. #4
    Registered User
    Join Date
    Sep 2005

    Re: J2me RecordStore persistence


    U have to close propely the streems in $ and out put streem, then it will store.
    Ur not cheching properly the exceptions
    Check streem closeings then it will

  5. #5
    Regular Contributor
    Join Date
    Aug 2006
    Rawalpindi, Pakistan

    Re: J2me RecordStore persistence

    well i have used record store without closing it after use and it has caused awful lot of trouble. but if u open and close i never had any problems and i am using it for quite a while.

Similar Threads

  1. Symbian C++ Equivalent of J2ME RecordStore
    By anmian in forum Symbian
    Replies: 6
    Last Post: 2007-05-15, 14:37
  2. How can the WAP browser communicate to J2ME application?
    By hbfornies in forum Mobile Java General
    Replies: 20
    Last Post: 2007-03-02, 16:32
  3. Persistence of j2me applis on emulator
    By romainbaudet in forum Mobile Java Tools & SDKs
    Replies: 0
    Last Post: 2005-02-11, 19:24
  4. J2ME Polish Version 1.0 RC6
    By enough in forum Mobile Java General
    Replies: 1
    Last Post: 2004-07-20, 11:25
  5. TinyLine SVG Minute Toolkit for J2ME: version 1.4 released
    By girow in forum Mobile Java General
    Replies: 0
    Last Post: 2003-05-05, 16:25

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts