Store persistent behave annoyinly - Bug or what?

Hey take a look below

Vector v1 = (Vector) MyPersistent.getContents ();

If (v1. Size() > 0)

{

FileConnection fc;
                        
v1.removeAllElements ();
                        
try {}
FC = (FileConnection)Connector.open("file:///store/home/user/Folder/" ");
                        
If (CF. Exists())
{
Enumeration e = fc.list ();
While (e.hasMoreElements ())
{
Dim ss = (String) e.nextElement ();
System.out.println ("files are:" + ss);
If (SS. StartsWith ("E"))
{
                                   
}
on the other
{
                                v1. AddElement (SS);
}
}
}
                        
} catch (IOException e1)
{e1.printStackTrace ();    }

}

After doin it doesn't matter what value saves in my vector "v1" ( v1.addElement (ss); ) it automatically save it to store persistent (MyPersistent) without comiting constantly! 

How is it possible!

Thnx for your answers

@Eugen: no m calling not only to commit anywhere after that.

@jkroots: here am come to retrieve the values of persistent store.


After doin it doesn't matter what value saves in my vector "v1" ( v1.addElement (ss) ;) it automatically save it to store persistent (MyPersistent) without comiting constantly!)         

I'm not doin validation operation. But when am still get value the same Persistent Store... values changed!

********************************************************************

To deal with this, I took another vector "v2" copy all the content of the "v1", then performed operations on v2.

and den in the store values persisting remains unchanged...

 

Tags: BlackBerry Developers

Similar Questions

  • After the update of the app, can not read the store persistent on some devices

    Hello

    I have a problem in an application I was able to reproduce in a simple test application.

    The test application writes some info in the persistent store, then can read back and it seems to work fine.

    If I change the version number of the application, then download the new version (by downloading a jad file in the browser), he invites me to replace the old version w / the new version, which I confirmed. After you download the new version of the app, he invites me to reboot the device, what I'm doing.

    On most of the devices I tested this, after the reboot, when I run the app update, it works as expected - it can read the value written in the store persistent by the earlier version of the application.

    However, on some devices, it is unable to do.

    Debugging a bit, the error occurs when you try to get the object persistent via:

    PersistentObject po1 = PersistentStore.getPersistentObject(MY_KEY);
    

    This survey line an exception - exception message is simply 'null '. I don't know what is precisely the type of exception since it is a static method should not throw any exception that as far as I know, so I'm just catching a generic java.lang.Exception.

    The same - in the version update of the application, if the software tries to write to the store persistent by using the ID of the object, the result is the same - the call to getPersistentObject throws an exception "null".

    Note that I'm not changing anything this either on the object that is saved in the persistent store, and I'm not changing the identifier of object between the versions of the application.

    A device on which I can reproduce this issue systematically is a Blackberry 9800 (Torch) running 6.0 Bundle 2647.

    Any advice or suggestions how to debug this appreciated.

    I tried to reproduce this on a Blackberry 9800 (Torch) running 6.0 Bundle 2647, identical to what noted you above but find the code example you posted worked well.  Were there other changes between the versions other than increment the version number?

    Is - what happens on multiple devices or just one?  If it is just a device you can try to reload the software of the device in case anything is damaged.

  • Store persistent access to another application running

    Hi BB experts.

    I have developed two separate requests, a UI (extends UIApplication) and another is BG (extends the Application). BG stores data in the persistent store and it works all the time. Now, what I want to do, it's access to certain information of thius store persistent in the user interface. But hv no idea how... ? Help please..?

    A long key allows you to create the rite of Persitance object... Use the same value of the key for a long time to get the object of persitance of another application.

  • Store persistent with auto-start system module

    I would like to persist a vector of strings through the cycles of power of the device for my application access. I have two questions that relate to this, the first is: what method should I use to commit this vector in the persistent store? (ie. in a GUI application, I could put this code in the method close or exit but where does it go in a module of the system) The NDDN is how retrieve and store persistent data? (it seems that I might be able to achieve this with a BigVector class, but it was only a constructor and not an instance get method so I don't know how she gets the persistent store or how he commits it?) Please help, confused.

    Store is a PersistentObject

    private static PersistentObject store;
    

    Press the button Bravo thank the user who has helped you.

    If your problem has been resolved then please mark the thread as "accepted Solution".

  • I want to download Adobe after effects CC, however, a message appears on the screen: at the moment, he had problems. Please try again later. If the problem persists, contact customer support. What should I do?

    I want to download Adobe after effects CC, however, a message appears on the screen: at the moment, he had problems. Please try again later. If the problem persists, contact customer support. What should I do?

    You MUST have a 64-bit computer and operating system... What is your computer?

    -Programs are supposed TO not view or download if they are not installed on your computer

    MINIMUM for After Effects and Premiere Pro http://helpx.adobe.com/premiere-pro/system-requirements.html

  • Store persistent information with project

    Hi guys,.

    My Panel needs to store persistent information with projects (e-mail id of the user who is logged in the Panel). Is there a way to do this?

    In Ps, I used the document to store this property. Cannot know which can be used with premium projects.

    Thank you

    CEP panels support cookies; See this sample Panel:

    https://github.com/Adobe-CEP/samples/tree/master/CEP_HTML_Test_Extension

  • A singleton stores persistent?

    I have need of a meter of update in my application as the user will know how many notifications they have. The number of notifications appear on the homepage next to the icon. The way I am followed by the variable of the icon "iconCount" between different ports of entry is through a singleton. I need to have this indictment to be present even after the user turns off their device power on and off. If there are 7 updates available for them 7 will be displayed until they check the application (it will not be reset to 0 when the unit is off).

    As a test to see what would happen if I put the number 7 and turns the unit off via the Simulator; I pressed the power button until it says "turn the power off, press any key to quit" and then the screen went black. I waited a few seconds and press the hang up and the Simulator turned on to show the new 7 notifications.

    It is a bit strange for me, I have even if you need a persistent store to achieve? I was setting off the device correctly, or a singleton actually holds the variable even after that the power is off.

    There is a difference between an app off (key grip) or off button and a hard turn off (battery pull). a soft off suspends the requests, and they wake up again when the power turn once again.

    If you remove the battery (or close the Simulator) all non-persistent values are lost.

  • Store persistent differences betweem and SQlite

    Hi friends,

    u can tell me the difference between the persistent store and sqlite...

    http://docs.BlackBerry.com/en/developers/subcategories/?usertype=21&category=development+guides

    the guide to data warehousing, this is what you are looking for, but I posted the full link that other documents of course will come handy for you, too!

  • How to store and retrieve long values in the store persistent

    Hello

    In my application I want to store and retrieve long values in the persistent store that I used with Longvector and all is well, but LongVector is supported for operating system > = 4.6

    I need to work my request in 4.5 also, can any one infrom me what are the other alternatives, I have to get my pls any abstract requirement...

    Vector v = new Vector();
    fill vector
    Long premierElement = (Long) v.firstElement ();
    myLong long = firstElement.longValue ();

  • HOWTO: query inflight JTA transactions in the store persistent programmatically

    Hello
    We are trying to work on a way, in a non-clustered, work, environment if there are transactions waiting/inflight JTA in the persistent store when the server is not running. (With a running server, it would be easy, just ask the MBeans JTA).

    The reason for which we need is: at least some automated directed data JTA power managed server upgrade scripts and custom. If the operator stopped the server, perhaps with Force Shutdown or simply by killing the process. And now wants to restart:
    for an Instance of WLS with inflight JTA transactions, the server will attempt to recover the in-flight transactions, which could take a long time and be understood by the operator as a blocking of the server.
    At which point, the operator is likely to do exactly the wrong thing: recreating the domain of the server, including the persistent store and therefore lose all flight operations.

    So ideally, we would have either a java, wlst or based on a shell-script how to query the persistent store to find out if there are flight operations. We can then warn the operator, or manually move the file somewhere else.

    We thought of two ways to do:

    (a) use weblogic.store.Admin to dump the store as xml. The problem is, we don't know what parts there are empty, and what strings to search by program to find flight operations.

    (b) enable DebugJTARecovery on the server and restart it as a test, and then search your messages for recovery. Tedious and complicated.

    (c) there must be a method of MBean undocumented than the administration Console used to allow migration to a persistent store. Any tips?

    Some information resources that we consulted that have not delivered the answers

    http://download.Oracle.com/docs/CD/E12840_01/WLS/docs103/JTA/trxman.html#wp1043084

    Transactions For recovery has Failed Non-Clustered Server basically said to copy the file, recreate the server and hope

    http://download.Oracle.com/docs/CD/E13222_01/WLS/docs92/config_wls/store.html#wp1149755

    Description of the weblogic.store.Admin utility command-line options.

    There was formerly a utility in the WLS 8.1 days, which would dump an ascii representation of the tlog file. It does not seem to have been replaced.

    Thank you, Richard

    WLS administration console uses the runtime mbeans to find pending JTA transactions, so that won't be useful to you if you want this info in offline mode. When the console migrates, it does by using the MigratableServiceCoordinatorRuntimeMBean, which encapsulates the details of the migration of jta.

  • My wife 6 iPhone would not take a charge.  The Apple store in Raleigh NC replaced with what they said, it was a NEW pohone.  I suspect that it was not new, but handed to nine. Can I know the serial number if it is new or refurbished?

    Tooke, he calls to the Apple store in Raliegh NC.  They were replaced with what they said, it was a NEW phone for $299.  I suspect that the phone is not NEW but handed to nine.  I can top by the serial number if the new or refurbished?  Number of Sedrial is FD * 5MD

    < personal information under the direction of the host >

    In general the replacements are not new.  They can be given to nine units, which are like new, maybe better.

    Apple has no obligation to provide a new iPhone in replacement under warranty or out of warranty replacement.

  • 18 Firefox do not store persistent cookies.

    This happens also in FF 18 - cookies that are supposed to be kept are not.

    I tried the SQLite Database Browser tool, but found no questionable registration described above.

    I tried to delete the preferences of site - no change. Tried to delete permission.sqlite. Still no change.

    What it appears in is my online banking. It asks you to register to the computer and supposedly puts a 'secure cookie' in the browser. It does more - whenever I have to go through the application process for a new code by e-mail. It works fine under IE and used in Firefox. What's weird is that if I ask him to show cookies, it shows with expiration of January 2100. But it is not accessble to FF, while he was. Any other ideas?

    It is possible that the cookies.sqlite file that stores the cookies is corrupted.

    Rename (or delete) cookies.sqlite (cookies.sqlite.old) and delete other files to present as cookie cookies.sqlite - journal in the profile folder of Firefox in the case where the cookies.sqlite file has been corrupted.

    Start Firefox in Safe Mode to check if one of the extensions (Firefox/tools > Modules > Extensions) or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox/tools > Modules > appearance).

    • Do NOT click on the reset button on the start safe mode window or make changes.
  • How to clear the store persistent on the handheld for my application

    Hey. Final tests and I want to erase the persistent store info my app wrote a previous installation. When I download, install a new version of my application, it does not erase the persistent store. How do this manually on BB, TKS.

    J

    If all you're concerned about is when you upgrade, use the same key and just use destroyPersistentObject on your first departure to the top?

  • App store is not available, no matter what I do.

    I tried all the things suggested here in the post, but the store is still not available for me. What can I do else?  The last thing I tried was refreshing windows 8.

    Ellison

    I am also having the same problem and have tried every step you have listed above without success. I'm just a little short of restarting my computer at the store. I just bought the 28. This thing of windows 8 is not worth. Microsoft needs to do better.

  • Bug? What is the problem with that?

    can someone please look at this file vi... Why is the 'if' in the formula node run incorrectly block?

    Thank you...

    dan_u wrote:

    What does not work as expected? It seems that you are assuming that the variables in a Dungeon of formula node value from a previous run. This is not the case. If you need to keep the variables from a previous run that you will need to use a shift register and supply the node of the formula of the previous value.

    Something like that:

Maybe you are looking for

  • White screen of jealousy dv6 after a bios update

    Hello I recently bought a desire dv6t-7200.  As it comes with windows 8, I put a win 7 on a 2nd drive and he set up a dual boot correctly. within a Win 7, I installed all the patches and most of the utilities of HP. One of the last checked for a vers

  • How to install an iPhone application when my old email is no longer active?

    My iPhone application called "Shining Force" moved there not because of my old e-mail is no longer active and the app is not available in the app store. How can I fix it? Thank you.

  • Reinstall the HP ENVY laptop operating system

    I picked up a nasty virus (WebSteroids) - spent three days with 3 different professionals and we were unable to clean on the browsers.  Came to the conclusion that the only way to recover is to re - install the operating system and software. Unfortna

  • Site / pine addresses for DAC on digital electronic circuit of NOR

    My advanced students try to build a circuit that is able to communicate with the DAC on the digital electronic circuit of NOR. We have things to the point where we have a solid stream, synchronized with our series clock and timed correctly compared t

  • After an update of Windows (XP), my internet connection hangs up

    Earlier this summer after letting one of my netbook computers have a "update" for Windows my connection switched to internet hangs up.  I don't have to troubleshoot it at the time because I got another XP netbook that had not been updated and it cont