Questions tagged [persistence]

Persistence in computer programming refers to the capability of saving data outside the application memory.

Persistence is the capability of saving data outside of application memory, and of retrieving it later for further processing.

Typically data can be stored into the file system, in flat files or in a database. But persistence can also involve sending data to external applications.

Often persistence is related to .

References.

5099 questions
17
votes
2 answers

Saving and restoring geometries in OpenLayers

Context: I'm a just-hours-old newbie at OpenLayers, please be gentle. Fundamentally, I have a map with some drawn objects on it. If I understand things correctly, I have a number of OpenLayer.Feature.Vector (layers?) with a number of…
Walt Stoneburner
  • 2,562
  • 4
  • 24
  • 37
17
votes
2 answers

Safari localStorage not persisted between sessions

We have a web app that runs in Facebook (i.e. a running in an iFrame at a different domain). If a Safari user has Cookies and Website Data set to the default, "Allow from websites I visit", the data we store via localStorage.setItem is acting like…
leontx
  • 1,165
  • 1
  • 14
  • 24
17
votes
6 answers

How to best create a test DB when doing TDD?

what's the best practice for creating test persistence layers when doing an ASP.NET site (eg. ASP.NET MVC site)? Many examples I've seen use Moq (or another mocking framework) in the unit test project, but I want to, like .. moq out my persistence…
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647
17
votes
3 answers

Is Redis faster than MySQL?

I just read that Redis is "persistent". Does that mean that it is stored in the hard disk? If yes, how can it be faster than MySQL, which is also hard disk based? Obviously, I am just a beginner, so don't be too harsh. Connected to: Cheapest way to…
user3289157
  • 645
  • 2
  • 13
  • 24
17
votes
1 answer

merge vs find to update entities JPA

From the book Pro EJB3 JPA: The most common strategy to handle this (-update entities-) in Java EE application that uses JPA is to place the results of the changes into detached entity instances and merge the pending changes into a persistence…
Sergio
  • 3,317
  • 5
  • 32
  • 51
17
votes
4 answers

How to write a WCF service with in-memory persistent storage?

I wrote a WCF service, but the data stored in the Service implementation doesn't persists between calls, not even if stored in a static variable. What can I do? The service implementation is as follows: public class Storage : IStorage { …
Jader Dias
  • 88,211
  • 155
  • 421
  • 625
17
votes
1 answer

Difference b/w Hibernate's Sessionfactory.getCurrentSession() and SessionFactory.openSession()

I'm a little confused between the two. As per I know both returns hibernate session, SessionFactory.getCurrentSession() returns a contextual session based on the property which is set in…
tintin
  • 5,676
  • 15
  • 68
  • 97
16
votes
5 answers

How to store persistent data client side

I need to programmatically store data on the client side without having to transfer the data from the server on every page load. I considered generating a dynamic JavaScript file with the needed data for the current session of the user and make sure…
Itay Moav -Malimovka
  • 52,579
  • 61
  • 190
  • 278
16
votes
11 answers

Easy Java ORM for small projects

I'm currently searching for a really easy way to get simple Java Objects persistent in Databases and/or XML and/or other types of data stores. For big projects in the company i would use hibernate, ibatis, datanucleus or something like that. But…
Chris
  • 7,675
  • 8
  • 51
  • 101
16
votes
3 answers

How to rename persistence volume claim?

Is is possible to rename a PVC? I can't seem to find an evidence it is possible. I'm trying mitigate an "No space left of device" issue I just stumbled upon. Essentially my plan requires me to resize the volume, on which my service persists its…
oldhomemovie
  • 14,621
  • 13
  • 64
  • 99
16
votes
1 answer

React Router V4 protected private route with Redux-persist and React-snapshot

I'm implementing private route like so using React Router Route Component: function PrivateRoute({component: Component, authed, emailVerified, ...rest}) { return ( authed === true …
jasan
  • 11,475
  • 22
  • 57
  • 97
16
votes
5 answers

How to use java.sql.Timestamp as real java.util.Date with JPA

I have a problem about the management of dates with milliseconds. I understand the need to use the TIMESTAMP to store milliseconds: @Temporal(TIMESTAMP) @Column(name="DATE_COLUMN", nullable = false) @Override public java.util.Date getDate() { return…
chepseskaf
  • 664
  • 2
  • 12
  • 41
16
votes
3 answers

How to access *.mv.db file of H2 database?

I have created database with my own program and it appeared as mydatabase.mv.db file. But when I tried to access the same database with DbVisualizer, with apparently same parameters, it created two files mydatabase.lock.db and celebrity.h2.db and…
Suzan Cioc
  • 29,281
  • 63
  • 213
  • 385
16
votes
2 answers

iphone bookmarklet cookie persistence

I have an iphone (jqtouch based) web app that uses cookies for authentication. The use flow is as follows : user goes to the mobile landing page and is instructed to save the page as a bookmarklet on their home page. they launch the bookmarklet to…
16
votes
2 answers

Elisp: How to save data in a file?

I want to save data to a file in my elisp program. I have a multi-dimensional list that I want to save to a file, so I can restore it the next time my program runs. What's the easiest / best way to do this? I realise, of course, that I can simply…
Enfors
  • 960
  • 2
  • 14
  • 25