On 19/04/2013 17:06, Nik wrote:
Thanks Francesco.

I guess I'm obliged to use this persistence method to keep my new data.

I have noticed a drop in performance when I do this change (expected but this is very noticeable). Is there anyway of getting back to the great perf of the in memory h2 or is this the price to pay for
persistence?

I have updated today the wiki page [2]: in order to improve performance you should use

jpa.url=jdbc:h2:syncopedb;DB_CLOSE_DELAY=-1

Also, one puzzle for me (perhaps it is available through hard coding data at compile time - a guess). When the syncope standalone1.1.0 is used out of the box there is persistence for the data it comes with, obviously, my second thought is it should be possible to somehow get new data out of volatile memory to some sort of cache file (so you don't lose data when you stop the tomcat because it is written to a cache). On restart of the tomcat the syncope can read this cache back into volatile memory and hence you keep the great
perf - I'm sure you have thought of this?

This shouldn't be necessary if you use the URL reported above.

Anyway, there is an export / import mechanism for internal storage component and a wiki page that's just waiting to be written... (see SYNCOPE-126 [3]).

Regards.

On 18/04/2013 10:40, Nik wrote:
Hi Guys,

Call me a twit, if I missed something, obvious ;-)

Hi Nik,
first of all, you are right, what you have found below is true: in-memory H2 lasts until Tomcat is running.

There has recently been a discussion around this [1], that should have resulted in updating [2], not yet done.

I am sorry for not making this clear from the documentation: I will try to update [2] with
 1. warning about the volatile persistence
2. instructions about how to turn the H2 configuration into something persistent

Basically, it is enough to replace

jpa.url=jdbc:h2:mem:syncopedb;DB_CLOSE_DELAY=-1

with

jpa.url=jdbc:h2:syncopedb

in $CATALINA_HOME/webapps/syncope/WEB-INF/classes/persistence.properties

I'll keep you posted.
Regards.

P.S. Please don't hijack other e-mail threads (e.g. reply to existing e-mails, change subject and body) otherwise our mailing list archives will go crazy :-)

[1] http://markmail.org/message/o326pp3bioxigl5f
[2] https://cwiki.apache.org/confluence/display/SYNCOPE/Run+Syncope+standalone+distribution
[3] https://issues.apache.org/jira/browse/SYNCOPE-126

--
Francesco Chicchiriccò

ASF Member, Apache Syncope PMC chair, Apache Cocoon PMC Member
http://people.apache.org/~ilgrosso/

Reply via email to