Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
mbasheerk
Posts: 326
Registered: ‎02-02-2009
My Device: Not Specified
Accepted Solution

How Synchronization on persistent store works

I have number of persistent store for storing data, etc

When I manipulating one store (adding, deleting or updating), should I need to block manipulation on other store?

Please use plain text.
Developer
simon_hain
Posts: 16,136
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How Synchronization on persistent store works

you don't have to

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
peter_strange
Posts: 19,604
Registered: ‎07-14-2008
My Device: Not Specified

Re: How Synchronization on persistent store works

[ Edited ]

You need to do this based on the needs of your application.  There are no restrictions that I am aware of in the use of PersistentStore.

 

Opps, had not seen Simon's post.

Please use plain text.
Developer
mbasheerk
Posts: 326
Registered: ‎02-02-2009
My Device: Not Specified

Re: How Synchronization on persistent store works

we have a multti thread application,so we have situations like diffrent threads can modify(create/update/remove) the same store,

in this case should we need to synchronize the modifying method like one thread can do modifications at a time?

or the RIM API will handle this situtaions by itself?

 

what about the fetch operation from same store from diffent threads?

Please use plain text.
Developer
simon_hain
Posts: 16,136
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: How Synchronization on persistent store works

as there is no notice about the class being threadsafe i would suggest that you synchronize the access yourself.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.