You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rave.apache.org by Marlon Pierce <mp...@cs.indiana.edu> on 2011/11/08 18:28:18 UTC

Small proposed default db setting change

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I propose that we change both the shindig and rave-portal DB
connections to jdbc:h2:~/portal_data;AUTO_SERVER=TRUE instead of using
the in-memory database.

This will allow both rave-shindig and rave-portal to use the same DB
instance
(http://www.h2database.com/html/features.html#auto_mixed_mode).  Seems
to work fine in my tests.


Marlon

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOuWayAAoJEOEgD2XReDo5GxIIAJQ6X/CEcOSg45nDx5W9gYnS
JlI/NO5DvN+G0yKTYKmxwNm1IgE4TG2Qz/6xWEpcW7Np0pZf3ezZy72p+rpwsncc
+Fxr7y8oHsvcPmryYEP4uZ86n78hw/8DATR+iPB/AVU39ImzAtSsk5p7zRKFK44e
Mx7wUp/1LSwNYyJ5VT826E+8hCsPvKeIWJoCWgkW9JPYpLYe6so69hVVYsQ/Oyvm
wJTUpCrKMDSS1vyhSbhOh7xBwXq6gL68WAzLg844mcmNP1jj+4pKJyiqJmYfhNKK
orFHZWYDhRkx2Cjviw6lnvNqZz+AFyaCLAfpncDAd7dgSI04xsXQuJNNRqCYE5U=
=fmnf
-----END PGP SIGNATURE-----

Re: Small proposed default db setting change

Posted by Marlon Pierce <mp...@cs.indiana.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

This would be for "out of the box" demos only, so a real installation
would need MySQL, etc.


Marlon


On 11/8/11 2:47 PM, Cooper, Sean D. wrote:
> H2 databases become very slow when using the filesystem instead of
> in-memory.  It might work in small tests but it does not scale well
> at all.
> 
> -Sean ________________________________________ From: Marlon Pierce
> [mpierce@cs.indiana.edu] Sent: Tuesday, November 08, 2011 12:28 PM 
> To: rave-dev@incubator.apache.org Subject: Small proposed default
> db setting change
> 
> I propose that we change both the shindig and rave-portal DB 
> connections to jdbc:h2:~/portal_data;AUTO_SERVER=TRUE instead of
> using the in-memory database.
> 
> This will allow both rave-shindig and rave-portal to use the same
> DB instance 
> (http://www.h2database.com/html/features.html#auto_mixed_mode).
> Seems to work fine in my tests.
> 
> 
> Marlon
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOuYkIAAoJEOEgD2XReDo5OxoIAIfdOfM84vdaARdwqsnq9i6a
3b2zs9BxlQdcclLxEL1mHSAj1Q0BM6Zw0Kh0J6EI41DzLrN2K58R1xuexSTPMn4f
gsCBNyfh7YLofoKTVT7+uaZeKbKINgFiby+kD6gEuJ11zv1JNBoXbYXufv7mVs/J
qj8JFNtfIyu6fK3L9WCVHdBnP7nqifWIZ7c9rDi8XDMlTP2WGCPs9wQKhW9POj6u
IPyk8WUx+rH0VwQGKp6vJonTu04xcLTxJv/AemVuiWQEe9kF/sz4mpAvJgHB7eKA
zKRhCGjp/xeGRGW4XO6glX5r09zH4PpqdmhVKqHexxfLzbMsCIsRIOSaxXX9WsQ=
=a15J
-----END PGP SIGNATURE-----

RE: Small proposed default db setting change

Posted by "Cooper, Sean D." <se...@mitre.org>.
H2 databases become very slow when using the filesystem instead of in-memory.  It might work in small tests but it does not scale well at all.

-Sean
________________________________________
From: Marlon Pierce [mpierce@cs.indiana.edu]
Sent: Tuesday, November 08, 2011 12:28 PM
To: rave-dev@incubator.apache.org
Subject: Small proposed default db setting change

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I propose that we change both the shindig and rave-portal DB
connections to jdbc:h2:~/portal_data;AUTO_SERVER=TRUE instead of using
the in-memory database.

This will allow both rave-shindig and rave-portal to use the same DB
instance
(http://www.h2database.com/html/features.html#auto_mixed_mode).  Seems
to work fine in my tests.


Marlon

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOuWayAAoJEOEgD2XReDo5GxIIAJQ6X/CEcOSg45nDx5W9gYnS
JlI/NO5DvN+G0yKTYKmxwNm1IgE4TG2Qz/6xWEpcW7Np0pZf3ezZy72p+rpwsncc
+Fxr7y8oHsvcPmryYEP4uZ86n78hw/8DATR+iPB/AVU39ImzAtSsk5p7zRKFK44e
Mx7wUp/1LSwNYyJ5VT826E+8hCsPvKeIWJoCWgkW9JPYpLYe6so69hVVYsQ/Oyvm
wJTUpCrKMDSS1vyhSbhOh7xBwXq6gL68WAzLg844mcmNP1jj+4pKJyiqJmYfhNKK
orFHZWYDhRkx2Cjviw6lnvNqZz+AFyaCLAfpncDAd7dgSI04xsXQuJNNRqCYE5U=
=fmnf
-----END PGP SIGNATURE-----

Re: Small proposed default db setting change

Posted by Jasha Joachimsthal <j....@onehippo.com>.
Never mind, I forgot to scroll down till the edit button. Sorry :(

On 11 November 2011 01:46, Marlon Pierce <mp...@cs.indiana.edu> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hmm, shouldn't be.  I'll take a look.
>
>
> Marlon
>
>
> On 11/10/11 9:51 AM, Jasha Joachimsthal wrote:
> > I just noticed there's no edit mode in the web interface anymore.
> > Is that also because of the file system storage?
> >
> > Jasha
> >
> > On 9 November 2011 00:38, Marlon Pierce <mp...@cs.indiana.edu>
> > wrote:
> >
> > An svn diff is below.  I'll create a jira ticket and commit.
> >
> >
> > Marlon
> >
> > 156-56-194-211:rave mpierce$ svn diff Index:
> > rave-shindig/src/main/resources/rave.shindig.properties
> > ===================================================================
> >
> >
> - --- rave-shindig/src/main/resources/rave.shindig.properties
> > (revision 1199526) +++
> > rave-shindig/src/main/resources/rave.shindig.properties (working
> > copy) @@ -28,7 +28,7 @@
> > shindig.spring.base-package=org.apache.rave
> >
> > # Default Rave Shindig database settings with in memory H2
> > database
> > -rave-shindig.dataSource.url=jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1
> >
> >
> +rave-shindig.dataSource.url=jdbc:h2:${portal.datasource.url};AUTO_SERVER=TRUE
> >
> >  Index: rave-shindig/pom.xml
> > ===================================================================
> >
> >
> - --- rave-shindig/pom.xml        (revision 1199526)
> > +++ rave-shindig/pom.xml        (working copy) @@ -149,6 +149,13
> > @@ <build> <defaultGoal>install</defaultGoal>
> >
> > +                 <resources> +                        <resource> +
> > <directory>src/main/resources</directory> +
> > <filtering>true</filtering> +                        </resource> +
> > </resources> + <plugins> <plugin>
> > <groupId>org.codehaus.mojo</groupId> Index:
> > rave-portal-resources/src/main/resources/portal.properties
> > ===================================================================
> >
> >
> - --- rave-portal-resources/src/main/resources/portal.properties
> > (revision 1199526) +++
> > rave-portal-resources/src/main/resources/portal.properties (working
> > copy) @@ -34,7 +34,7 @@ portal.page.default_name=Main
> >
> > #Default Rave Portal database settings with in memory H2 database
> > -portal.dataSource.url=jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1
> > +portal.dataSource.url=jdbc:h2:${portal.datasource.url};AUTO_SERVER=TRUE
> >
> >  Index: rave-portal-resources/pom.xml
> > ===================================================================
> >
> >
> - --- rave-portal-resources/pom.xml       (revision 1199526)
> > +++ rave-portal-resources/pom.xml       (working copy) @@ -61,8
> > +61,14 @@ </dependency> </dependencies>
> >
> > -    <build> -        <plugins> +        <build> +
> > <resources> +                 <resource> +
> > <directory>src/main/resources</directory> +
> > <filtering>true</filtering> +                 </resource> +
> > </resources> +               <plugins> <plugin>
> > <groupId>com.googlecode.mavenfilesync</groupId>
> > <artifactId>maven-filesync-plugin</artifactId> Index: pom.xml
> > ===================================================================
> >
> >
> - --- pom.xml     (revision 1199526)
> > +++ pom.xml     (working copy) @@ -69,6 +69,9 @@
> > <cobertura.version>2.5.1</cobertura.version>
> > <org.hamcrest.version>1.1</org.hamcrest.version>
> >
> > +                 <!-- The location of Rave's H2 file DB. No
> > trailing / --> +
> > <portal.datasource.url>/tmp/rave_portal_data</portal.datasource.url>
> >
> >
> +
> > <!-- Force maven-filesync-plugin rewrite the Eclipse FileSync
> > plugin configuration with $mvn filesync:generate
> > -Dmaven.filesync.override=true -->
> > <maven.filesync.override>false</maven.filesync.override>
> >
> > On 11/8/11 2:47 PM, Jasha Joachimsthal wrote:
> >>>> On 8 November 2011 20:34, Ate Douma <at...@douma.nu> wrote:
> >>>>
> >>>>> On 11/08/2011 11:09 AM, Marlon Pierce wrote:
> >>>>>
> >>>> Maybe jdbc:h2:/tmp/portal_data;AUTO_**SERVER=TRUE would be
> >>>> better. Wil have to test with Windows OS, but I assume the
> >>>> "/" notation is fine.
> >>>>
> >>>>>>
> >>>>>> An alternative and more flexible solution might be using
> >>>>>> an Java runtime setting (-Drave.h2.location=) and try to
> >>>>>> dynamically evaluate that from the configuration.
> >>>>>>
> >>>>>> Then we can easily provide this location in through the
> >>>>>> maven-cargo-plugin configuration, like
> >>>>>> ${project.build.directory}/**database
> >>>>>>
> >>>>>> This would keep the database outside the cargo tomcat
> >>>>>> deployment environment (which gets cleared every run).
> >>>>>> Running mvn clean though would clear the database out. Or
> >>>>>> if you don't want it, as a developer, you could redefine
> >>>>>> this setting yourself, either from the command line or
> >>>>>> else through environment settings.
> >>>>>>
> >>>>>> WDYT?
> >>>>
> >>>>
> >>>>> +1
> >>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>
> >>>> Marlon
> >>>>
> >>>>
> >>>> On 11/8/11 12:47 PM, Jasha Joachimsthal wrote:
> >>>>
> >>>>>>>> +1 for the combined database in the demo setup, so we
> >>>>>>>> can also drop the duplicate H2 console
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On 8 November 2011 18:28, Marlon
> >>>>>>>> Pierce<mp...@cs.indiana.edu> wrote:
> >>>>>>>>
> >>>>>>>> I propose that we change both the shindig and
> >>>>>>>> rave-portal DB connections to
> >>>>>>>> jdbc:h2:~/portal_data;AUTO_**SERVER=TRUE instead of
> >>>>>>>> using the in-memory database.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> This seems to create the DB in the user's home
> >>>>>>>> directory. If so:
> >>>>>>>>> 1) Does that work on a Windows machine as well? 2)
> >>>>>>>>> I would prefer a temp directory over the user's
> >>>>>>>>> home directory so Rave will not leave files after
> >>>>>>>>> you remove it from your machine (of course nobody
> >>>>>>>>> should want to remove Rave from their machine).
> >>>>>>>>>
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> This will allow both rave-shindig and rave-portal to
> >>>>>>>> use the same DB instance
> >>>>>>>> (http://www.h2database.com/**html/features.html#auto_mixed_**mode
> <
> >
> >>>>>>>>
> http://www.h2database.com/html/features.html#auto_mixed_mode>
> >>>>>>>>
> >>>>>>>>
> > ).
> >>>>>>>> Seems to work fine in my tests.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Marlon
> >>>>>>>>
> >>>>>>>>
> >>>>>>>>>
> >>>>>>>>
> >
> >>>>>>
> >>>>>
> >>>>>
> >>>>
> >>
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJOvHBXAAoJEOEgD2XReDo55vgIALq6RTiQHlGWeNPu4gzeLvxE
> heGqhEfoIg1ZEw6/i/UQksQD4ss8iNPzTqFjGRaBbDKcOKm/VBLQmw9po5Eht5Np
> K5NJJqESC+aM/DXE+8TI15QDQBZv2fjFGXCqzR2+T9LdSb9+i+6XiWnjRDjqepI6
> SZJQbhLWdaNgd6T7L6k+WGfx2EqhIuaCqTfv3i6Ngs+WslK+aFTBUoRbgIo1tjrH
> LFQMKR8URBIzuzzw0RPbc3WpDC4FXC0GxWm+2+IuSg6y1R/wonW7rXIy79lj3wTV
> wH6H8A8k2UhL4RpsbXIV+5g2a6bO6ZsccNm9/ppKDqiuue18cmO1R04/4Mft8fo=
> =u2wx
> -----END PGP SIGNATURE-----
>

Re: Small proposed default db setting change

Posted by Marlon Pierce <mp...@cs.indiana.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hmm, shouldn't be.  I'll take a look.


Marlon


On 11/10/11 9:51 AM, Jasha Joachimsthal wrote:
> I just noticed there's no edit mode in the web interface anymore.
> Is that also because of the file system storage?
> 
> Jasha
> 
> On 9 November 2011 00:38, Marlon Pierce <mp...@cs.indiana.edu>
> wrote:
> 
> An svn diff is below.  I'll create a jira ticket and commit.
> 
> 
> Marlon
> 
> 156-56-194-211:rave mpierce$ svn diff Index:
> rave-shindig/src/main/resources/rave.shindig.properties 
> ===================================================================
>
> 
- --- rave-shindig/src/main/resources/rave.shindig.properties
> (revision 1199526) +++
> rave-shindig/src/main/resources/rave.shindig.properties (working
> copy) @@ -28,7 +28,7 @@ 
> shindig.spring.base-package=org.apache.rave
> 
> # Default Rave Shindig database settings with in memory H2
> database 
> -rave-shindig.dataSource.url=jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1
> 
> +rave-shindig.dataSource.url=jdbc:h2:${portal.datasource.url};AUTO_SERVER=TRUE
>
>  Index: rave-shindig/pom.xml 
> ===================================================================
>
> 
- --- rave-shindig/pom.xml        (revision 1199526)
> +++ rave-shindig/pom.xml        (working copy) @@ -149,6 +149,13
> @@ <build> <defaultGoal>install</defaultGoal>
> 
> +                 <resources> +                        <resource> +
> <directory>src/main/resources</directory> +
> <filtering>true</filtering> +                        </resource> +
> </resources> + <plugins> <plugin> 
> <groupId>org.codehaus.mojo</groupId> Index:
> rave-portal-resources/src/main/resources/portal.properties 
> ===================================================================
>
> 
- --- rave-portal-resources/src/main/resources/portal.properties
> (revision 1199526) +++
> rave-portal-resources/src/main/resources/portal.properties (working
> copy) @@ -34,7 +34,7 @@ portal.page.default_name=Main
> 
> #Default Rave Portal database settings with in memory H2 database 
> -portal.dataSource.url=jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1 
> +portal.dataSource.url=jdbc:h2:${portal.datasource.url};AUTO_SERVER=TRUE
>
>  Index: rave-portal-resources/pom.xml 
> ===================================================================
>
> 
- --- rave-portal-resources/pom.xml       (revision 1199526)
> +++ rave-portal-resources/pom.xml       (working copy) @@ -61,8
> +61,14 @@ </dependency> </dependencies>
> 
> -    <build> -        <plugins> +        <build> +
> <resources> +                 <resource> +
> <directory>src/main/resources</directory> +
> <filtering>true</filtering> +                 </resource> +
> </resources> +               <plugins> <plugin> 
> <groupId>com.googlecode.mavenfilesync</groupId> 
> <artifactId>maven-filesync-plugin</artifactId> Index: pom.xml 
> ===================================================================
>
> 
- --- pom.xml     (revision 1199526)
> +++ pom.xml     (working copy) @@ -69,6 +69,9 @@ 
> <cobertura.version>2.5.1</cobertura.version> 
> <org.hamcrest.version>1.1</org.hamcrest.version>
> 
> +                 <!-- The location of Rave's H2 file DB. No
> trailing / --> + 
> <portal.datasource.url>/tmp/rave_portal_data</portal.datasource.url>
>
> 
+
> <!-- Force maven-filesync-plugin rewrite the Eclipse FileSync 
> plugin configuration with $mvn filesync:generate
> -Dmaven.filesync.override=true --> 
> <maven.filesync.override>false</maven.filesync.override>
> 
> On 11/8/11 2:47 PM, Jasha Joachimsthal wrote:
>>>> On 8 November 2011 20:34, Ate Douma <at...@douma.nu> wrote:
>>>> 
>>>>> On 11/08/2011 11:09 AM, Marlon Pierce wrote:
>>>>> 
>>>> Maybe jdbc:h2:/tmp/portal_data;AUTO_**SERVER=TRUE would be
>>>> better. Wil have to test with Windows OS, but I assume the
>>>> "/" notation is fine.
>>>> 
>>>>>> 
>>>>>> An alternative and more flexible solution might be using
>>>>>> an Java runtime setting (-Drave.h2.location=) and try to 
>>>>>> dynamically evaluate that from the configuration.
>>>>>> 
>>>>>> Then we can easily provide this location in through the 
>>>>>> maven-cargo-plugin configuration, like 
>>>>>> ${project.build.directory}/**database
>>>>>> 
>>>>>> This would keep the database outside the cargo tomcat 
>>>>>> deployment environment (which gets cleared every run).
>>>>>> Running mvn clean though would clear the database out. Or
>>>>>> if you don't want it, as a developer, you could redefine
>>>>>> this setting yourself, either from the command line or
>>>>>> else through environment settings.
>>>>>> 
>>>>>> WDYT?
>>>> 
>>>> 
>>>>> +1
>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>> 
>>>> Marlon
>>>> 
>>>> 
>>>> On 11/8/11 12:47 PM, Jasha Joachimsthal wrote:
>>>> 
>>>>>>>> +1 for the combined database in the demo setup, so we
>>>>>>>> can also drop the duplicate H2 console
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On 8 November 2011 18:28, Marlon 
>>>>>>>> Pierce<mp...@cs.indiana.edu> wrote:
>>>>>>>> 
>>>>>>>> I propose that we change both the shindig and
>>>>>>>> rave-portal DB connections to
>>>>>>>> jdbc:h2:~/portal_data;AUTO_**SERVER=TRUE instead of
>>>>>>>> using the in-memory database.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> This seems to create the DB in the user's home
>>>>>>>> directory. If so:
>>>>>>>>> 1) Does that work on a Windows machine as well? 2)
>>>>>>>>> I would prefer a temp directory over the user's
>>>>>>>>> home directory so Rave will not leave files after
>>>>>>>>> you remove it from your machine (of course nobody
>>>>>>>>> should want to remove Rave from their machine).
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> This will allow both rave-shindig and rave-portal to
>>>>>>>> use the same DB instance 
>>>>>>>> (http://www.h2database.com/**html/features.html#auto_mixed_**mode<
>
>>>>>>>> 
http://www.h2database.com/html/features.html#auto_mixed_mode>
>>>>>>>> 
>>>>>>>> 
> ).
>>>>>>>> Seems to work fine in my tests.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Marlon
>>>>>>>> 
>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
> 
>>>>>> 
>>>>> 
>>>>> 
>>>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOvHBXAAoJEOEgD2XReDo55vgIALq6RTiQHlGWeNPu4gzeLvxE
heGqhEfoIg1ZEw6/i/UQksQD4ss8iNPzTqFjGRaBbDKcOKm/VBLQmw9po5Eht5Np
K5NJJqESC+aM/DXE+8TI15QDQBZv2fjFGXCqzR2+T9LdSb9+i+6XiWnjRDjqepI6
SZJQbhLWdaNgd6T7L6k+WGfx2EqhIuaCqTfv3i6Ngs+WslK+aFTBUoRbgIo1tjrH
LFQMKR8URBIzuzzw0RPbc3WpDC4FXC0GxWm+2+IuSg6y1R/wonW7rXIy79lj3wTV
wH6H8A8k2UhL4RpsbXIV+5g2a6bO6ZsccNm9/ppKDqiuue18cmO1R04/4Mft8fo=
=u2wx
-----END PGP SIGNATURE-----

Re: Small proposed default db setting change

Posted by Jasha Joachimsthal <j....@onehippo.com>.
I just noticed there's no edit mode in the web interface anymore. Is that
also because of the file system storage?

Jasha

On 9 November 2011 00:38, Marlon Pierce <mp...@cs.indiana.edu> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> An svn diff is below.  I'll create a jira ticket and commit.
>
>
> Marlon
>
> 156-56-194-211:rave mpierce$ svn diff
> Index: rave-shindig/src/main/resources/rave.shindig.properties
> ===================================================================
> - --- rave-shindig/src/main/resources/rave.shindig.properties
> (revision 1199526)
> +++ rave-shindig/src/main/resources/rave.shindig.properties
> (working copy)
> @@ -28,7 +28,7 @@
>  shindig.spring.base-package=org.apache.rave
>
>  # Default Rave Shindig database settings with in memory H2 database
> - -rave-shindig.dataSource.url=jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1
>
> +rave-shindig.dataSource.url=jdbc:h2:${portal.datasource.url};AUTO_SERVER=TRUE
>
> Index: rave-shindig/pom.xml
> ===================================================================
> - --- rave-shindig/pom.xml        (revision 1199526)
> +++ rave-shindig/pom.xml        (working copy)
> @@ -149,6 +149,13 @@
>     <build>
>         <defaultGoal>install</defaultGoal>
>
> +                 <resources>
> +                        <resource>
> +                               <directory>src/main/resources</directory>
> +                               <filtering>true</filtering>
> +                        </resource>
> +                 </resources>
> +
>         <plugins>
>             <plugin>
>                 <groupId>org.codehaus.mojo</groupId>
> Index: rave-portal-resources/src/main/resources/portal.properties
> ===================================================================
> - --- rave-portal-resources/src/main/resources/portal.properties
> (revision 1199526)
> +++ rave-portal-resources/src/main/resources/portal.properties
> (working copy)
> @@ -34,7 +34,7 @@
>  portal.page.default_name=Main
>
>  #Default Rave Portal database settings with in memory H2 database
> - -portal.dataSource.url=jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1
> +portal.dataSource.url=jdbc:h2:${portal.datasource.url};AUTO_SERVER=TRUE
>
> Index: rave-portal-resources/pom.xml
> ===================================================================
> - --- rave-portal-resources/pom.xml       (revision 1199526)
> +++ rave-portal-resources/pom.xml       (working copy)
> @@ -61,8 +61,14 @@
>         </dependency>
>     </dependencies>
>
> - -    <build>
> - -        <plugins>
> +        <build>
> +               <resources>
> +                 <resource>
> +                        <directory>src/main/resources</directory>
> +                        <filtering>true</filtering>
> +                 </resource>
> +               </resources>
> +               <plugins>
>             <plugin>
>                 <groupId>com.googlecode.mavenfilesync</groupId>
>                 <artifactId>maven-filesync-plugin</artifactId>
> Index: pom.xml
> ===================================================================
> - --- pom.xml     (revision 1199526)
> +++ pom.xml     (working copy)
> @@ -69,6 +69,9 @@
>         <cobertura.version>2.5.1</cobertura.version>
>         <org.hamcrest.version>1.1</org.hamcrest.version>
>
> +                 <!-- The location of Rave's H2 file DB. No trailing
> / -->
> +
> <portal.datasource.url>/tmp/rave_portal_data</portal.datasource.url>
> +
>         <!-- Force maven-filesync-plugin rewrite the Eclipse FileSync
> plugin configuration with
>             $mvn filesync:generate -Dmaven.filesync.override=true -->
>         <maven.filesync.override>false</maven.filesync.override>
>
> On 11/8/11 2:47 PM, Jasha Joachimsthal wrote:
> > On 8 November 2011 20:34, Ate Douma <at...@douma.nu> wrote:
> >
> >> On 11/08/2011 11:09 AM, Marlon Pierce wrote:
> >>
> > Maybe jdbc:h2:/tmp/portal_data;AUTO_**SERVER=TRUE would be better.
> > Wil have to test with Windows OS, but I assume the "/" notation is
> > fine.
> >
> >>>
> >>> An alternative and more flexible solution might be using an
> >>> Java runtime setting (-Drave.h2.location=) and try to
> >>> dynamically evaluate that from the configuration.
> >>>
> >>> Then we can easily provide this location in through the
> >>> maven-cargo-plugin configuration, like
> >>> ${project.build.directory}/**database
> >>>
> >>> This would keep the database outside the cargo tomcat
> >>> deployment environment (which gets cleared every run). Running
> >>> mvn clean though would clear the database out. Or if you don't
> >>> want it, as a developer, you could redefine this setting
> >>> yourself, either from the command line or else through
> >>> environment settings.
> >>>
> >>> WDYT?
> >
> >
> >> +1
> >
> >>>
> >>>
> >>>
> >
> > Marlon
> >
> >
> > On 11/8/11 12:47 PM, Jasha Joachimsthal wrote:
> >
> >>>>> +1 for the combined database in the demo setup, so we can
> >>>>> also drop the duplicate H2 console
> >>>>>
> >>>>>
> >>>>> On 8 November 2011 18:28, Marlon
> >>>>> Pierce<mp...@cs.indiana.edu> wrote:
> >>>>>
> >>>>> I propose that we change both the shindig and rave-portal
> >>>>> DB connections to jdbc:h2:~/portal_data;AUTO_**SERVER=TRUE
> >>>>> instead of using the in-memory database.
> >>>>>
> >>>>>
> >>>>> This seems to create the DB in the user's home directory.
> >>>>> If so:
> >>>>>> 1) Does that work on a Windows machine as well? 2) I
> >>>>>> would prefer a temp directory over the user's home
> >>>>>> directory so Rave will not leave files after you remove
> >>>>>> it from your machine (of course nobody should want to
> >>>>>> remove Rave from their machine).
> >>>>>>
> >>>>>
> >>>>>
> >>>>> This will allow both rave-shindig and rave-portal to use
> >>>>> the same DB instance
> >>>>> (http://www.h2database.com/**html/features.html#auto_mixed_**mode<
> http://www.h2database.com/html/features.html#auto_mixed_mode>
> >>>>>
> >>>>>
> ).
> >>>>> Seems to work fine in my tests.
> >>>>>
> >>>>>
> >>>>> Marlon
> >>>>>
> >>>>>
> >>>>>>
> >>>>>
>
> >>>
> >>
> >>
> >
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJOub1uAAoJEOEgD2XReDo50qYH/0UCUHwjnbrfjICg+nDD/00V
> +bzVMBJBMqKTJAAp3/0Lana5nXsv1EISZTtT3gMcoGp3ZwslaSfrloJKtIDboKES
> z/r8rX8kP0SnFPPMxP7048nnPvOONhE/L1AFVIoCjsnhuzfqbVGUHrvamKTopQJ7
> k+NnSJteSFS6ZblNaiGtS9MIy9VsMQY9zRvBUuquSw9FgGakwxnFwLPdYdtLR2/I
> MTsNtGskmHJ+D03g4Glq924eguAgcq7C/cbgPQwZmXlKE+PlibC1CfC4wGLZKqFT
> quatK00pmYx7N/JnO2G0ssMMQX9wmAKJWeDWyPHB7Bacbk8v1vEEODDr0LX0oPU=
> =FHV3
> -----END PGP SIGNATURE-----
>

Re: Small proposed default db setting change

Posted by Marlon Pierce <mp...@cs.indiana.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

An svn diff is below.  I'll create a jira ticket and commit.


Marlon

156-56-194-211:rave mpierce$ svn diff
Index: rave-shindig/src/main/resources/rave.shindig.properties
===================================================================
- --- rave-shindig/src/main/resources/rave.shindig.properties
(revision 1199526)
+++ rave-shindig/src/main/resources/rave.shindig.properties
(working copy)
@@ -28,7 +28,7 @@
 shindig.spring.base-package=org.apache.rave

 # Default Rave Shindig database settings with in memory H2 database
- -rave-shindig.dataSource.url=jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1
+rave-shindig.dataSource.url=jdbc:h2:${portal.datasource.url};AUTO_SERVER=TRUE

Index: rave-shindig/pom.xml
===================================================================
- --- rave-shindig/pom.xml        (revision 1199526)
+++ rave-shindig/pom.xml        (working copy)
@@ -149,6 +149,13 @@
     <build>
         <defaultGoal>install</defaultGoal>

+                 <resources>
+                        <resource>
+                               <directory>src/main/resources</directory>
+                               <filtering>true</filtering>
+                        </resource>
+                 </resources>
+
         <plugins>
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
Index: rave-portal-resources/src/main/resources/portal.properties
===================================================================
- --- rave-portal-resources/src/main/resources/portal.properties
(revision 1199526)
+++ rave-portal-resources/src/main/resources/portal.properties
(working copy)
@@ -34,7 +34,7 @@
 portal.page.default_name=Main

 #Default Rave Portal database settings with in memory H2 database
- -portal.dataSource.url=jdbc:h2:mem:portal;DB_CLOSE_DELAY=-1
+portal.dataSource.url=jdbc:h2:${portal.datasource.url};AUTO_SERVER=TRUE

Index: rave-portal-resources/pom.xml
===================================================================
- --- rave-portal-resources/pom.xml       (revision 1199526)
+++ rave-portal-resources/pom.xml       (working copy)
@@ -61,8 +61,14 @@
         </dependency>
     </dependencies>

- -    <build>
- -        <plugins>
+        <build>
+               <resources>
+                 <resource>
+                        <directory>src/main/resources</directory>
+                        <filtering>true</filtering>
+                 </resource>
+               </resources>
+               <plugins>
             <plugin>
                 <groupId>com.googlecode.mavenfilesync</groupId>
                 <artifactId>maven-filesync-plugin</artifactId>
Index: pom.xml
===================================================================
- --- pom.xml     (revision 1199526)
+++ pom.xml     (working copy)
@@ -69,6 +69,9 @@
         <cobertura.version>2.5.1</cobertura.version>
         <org.hamcrest.version>1.1</org.hamcrest.version>

+                 <!-- The location of Rave's H2 file DB. No trailing
/ -->
+
<portal.datasource.url>/tmp/rave_portal_data</portal.datasource.url>
+
         <!-- Force maven-filesync-plugin rewrite the Eclipse FileSync
plugin configuration with
             $mvn filesync:generate -Dmaven.filesync.override=true -->
         <maven.filesync.override>false</maven.filesync.override>

On 11/8/11 2:47 PM, Jasha Joachimsthal wrote:
> On 8 November 2011 20:34, Ate Douma <at...@douma.nu> wrote:
> 
>> On 11/08/2011 11:09 AM, Marlon Pierce wrote:
>> 
> Maybe jdbc:h2:/tmp/portal_data;AUTO_**SERVER=TRUE would be better.
> Wil have to test with Windows OS, but I assume the "/" notation is
> fine.
> 
>>> 
>>> An alternative and more flexible solution might be using an
>>> Java runtime setting (-Drave.h2.location=) and try to
>>> dynamically evaluate that from the configuration.
>>> 
>>> Then we can easily provide this location in through the
>>> maven-cargo-plugin configuration, like
>>> ${project.build.directory}/**database
>>> 
>>> This would keep the database outside the cargo tomcat
>>> deployment environment (which gets cleared every run). Running
>>> mvn clean though would clear the database out. Or if you don't
>>> want it, as a developer, you could redefine this setting
>>> yourself, either from the command line or else through
>>> environment settings.
>>> 
>>> WDYT?
> 
> 
>> +1
> 
>>> 
>>> 
>>> 
> 
> Marlon
> 
> 
> On 11/8/11 12:47 PM, Jasha Joachimsthal wrote:
> 
>>>>> +1 for the combined database in the demo setup, so we can
>>>>> also drop the duplicate H2 console
>>>>> 
>>>>> 
>>>>> On 8 November 2011 18:28, Marlon
>>>>> Pierce<mp...@cs.indiana.edu> wrote:
>>>>> 
>>>>> I propose that we change both the shindig and rave-portal
>>>>> DB connections to jdbc:h2:~/portal_data;AUTO_**SERVER=TRUE
>>>>> instead of using the in-memory database.
>>>>> 
>>>>> 
>>>>> This seems to create the DB in the user's home directory.
>>>>> If so:
>>>>>> 1) Does that work on a Windows machine as well? 2) I
>>>>>> would prefer a temp directory over the user's home
>>>>>> directory so Rave will not leave files after you remove
>>>>>> it from your machine (of course nobody should want to
>>>>>> remove Rave from their machine).
>>>>>> 
>>>>> 
>>>>> 
>>>>> This will allow both rave-shindig and rave-portal to use
>>>>> the same DB instance 
>>>>> (http://www.h2database.com/**html/features.html#auto_mixed_**mode<http://www.h2database.com/html/features.html#auto_mixed_mode>
>>>>>
>>>>> 
).
>>>>> Seems to work fine in my tests.
>>>>> 
>>>>> 
>>>>> Marlon
>>>>> 
>>>>> 
>>>>>> 
>>>>> 

>>> 
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOub1uAAoJEOEgD2XReDo50qYH/0UCUHwjnbrfjICg+nDD/00V
+bzVMBJBMqKTJAAp3/0Lana5nXsv1EISZTtT3gMcoGp3ZwslaSfrloJKtIDboKES
z/r8rX8kP0SnFPPMxP7048nnPvOONhE/L1AFVIoCjsnhuzfqbVGUHrvamKTopQJ7
k+NnSJteSFS6ZblNaiGtS9MIy9VsMQY9zRvBUuquSw9FgGakwxnFwLPdYdtLR2/I
MTsNtGskmHJ+D03g4Glq924eguAgcq7C/cbgPQwZmXlKE+PlibC1CfC4wGLZKqFT
quatK00pmYx7N/JnO2G0ssMMQX9wmAKJWeDWyPHB7Bacbk8v1vEEODDr0LX0oPU=
=FHV3
-----END PGP SIGNATURE-----

Re: Small proposed default db setting change

Posted by Jasha Joachimsthal <j....@onehippo.com>.
On 8 November 2011 20:34, Ate Douma <at...@douma.nu> wrote:

> On 11/08/2011 11:09 AM, Marlon Pierce wrote:
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Maybe jdbc:h2:/tmp/portal_data;AUTO_**SERVER=TRUE would be better.  Wil
>> have to test with Windows OS, but I assume the "/" notation is fine.
>>
>
> An alternative and more flexible solution might be using an Java runtime
> setting (-Drave.h2.location=) and try to dynamically evaluate that from the
> configuration.
>
> Then we can easily provide this location in through the maven-cargo-plugin
> configuration, like ${project.build.directory}/**database
>
> This would keep the database outside the cargo tomcat deployment
> environment (which gets cleared every run). Running mvn clean though would
> clear the database out. Or if you don't want it, as a developer, you could
> redefine this setting yourself, either from the command line or else
> through environment settings.
>
> WDYT?


+1

>
>
>
>>
>> Marlon
>>
>>
>> On 11/8/11 12:47 PM, Jasha Joachimsthal wrote:
>>
>>> +1 for the combined database in the demo setup, so we can also drop
>>> the duplicate H2 console
>>>
>>>
>>> On 8 November 2011 18:28, Marlon Pierce<mp...@cs.indiana.edu>
>>> wrote:
>>>
>>> I propose that we change both the shindig and rave-portal DB
>>> connections to jdbc:h2:~/portal_data;AUTO_**SERVER=TRUE instead of
>>> using the in-memory database.
>>>
>>>
>>>  This seems to create the DB in the user's home directory. If so:
>>>> 1) Does that work on a Windows machine as well? 2) I would prefer
>>>> a temp directory over the user's home directory so Rave will not
>>>> leave files after you remove it from your machine (of course
>>>> nobody should want to remove Rave from their machine).
>>>>
>>>
>>>
>>> This will allow both rave-shindig and rave-portal to use the same
>>> DB instance
>>> (http://www.h2database.com/**html/features.html#auto_mixed_**mode<http://www.h2database.com/html/features.html#auto_mixed_mode>
>>> ).
>>> Seems to work fine in my tests.
>>>
>>>
>>> Marlon
>>>
>>>
>>>>
>>>  -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iQEcBAEBAgAGBQJOuX5mAAoJEOEgD2**XReDo54qMH/**RbR6oCDZ0J06L5LwyNPfM1Y
>> tsCu222oKWCy6NAZhvFM9ta4ram/**3XiDgk2/**9jpfqeHhm6uUK9ISa5T474TCOshx
>> 07HcZQeJrOEi9Y6tN6lYqQsvrs3/**VUwgGychnenmS+**dtnC9rCDFSK6BPwGvRXw93
>> Gav2mWeImETs9RTAryYK1N3muoIWIT**By8O+W8oRlcf+3O/0qB6ucStsWn8+**Nr5Li
>> y5g+Z/I9PfnUZYEUf16GbEarZQ+Si/**wB/**UPzy7OsUG64bJG33zLpmNq4Vkn92oq**6
>> DMfcdVIFn/ZS3uJifwHtRNiz8N6Su+**FApizycNWS5HpF+**R4GovdE43H6uKXtcjA=
>> =bSHt
>> -----END PGP SIGNATURE-----
>>
>
>

Re: Small proposed default db setting change

Posted by Ate Douma <at...@douma.nu>.
On 11/08/2011 11:09 AM, Marlon Pierce wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Maybe jdbc:h2:/tmp/portal_data;AUTO_SERVER=TRUE would be better.  Wil
> have to test with Windows OS, but I assume the "/" notation is fine.

An alternative and more flexible solution might be using an Java runtime setting 
(-Drave.h2.location=) and try to dynamically evaluate that from the configuration.

Then we can easily provide this location in through the maven-cargo-plugin 
configuration, like ${project.build.directory}/database

This would keep the database outside the cargo tomcat deployment environment 
(which gets cleared every run). Running mvn clean though would clear the 
database out. Or if you don't want it, as a developer, you could redefine this 
setting yourself, either from the command line or else through environment settings.

WDYT?

>
>
> Marlon
>
>
> On 11/8/11 12:47 PM, Jasha Joachimsthal wrote:
>> +1 for the combined database in the demo setup, so we can also drop
>> the duplicate H2 console
>>
>>
>> On 8 November 2011 18:28, Marlon Pierce<mp...@cs.indiana.edu>
>> wrote:
>>
>> I propose that we change both the shindig and rave-portal DB
>> connections to jdbc:h2:~/portal_data;AUTO_SERVER=TRUE instead of
>> using the in-memory database.
>>
>>
>>> This seems to create the DB in the user's home directory. If so:
>>> 1) Does that work on a Windows machine as well? 2) I would prefer
>>> a temp directory over the user's home directory so Rave will not
>>> leave files after you remove it from your machine (of course
>>> nobody should want to remove Rave from their machine).
>>
>>
>> This will allow both rave-shindig and rave-portal to use the same
>> DB instance
>> (http://www.h2database.com/html/features.html#auto_mixed_mode).
>> Seems to work fine in my tests.
>>
>>
>> Marlon
>>
>>>
>>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJOuX5mAAoJEOEgD2XReDo54qMH/RbR6oCDZ0J06L5LwyNPfM1Y
> tsCu222oKWCy6NAZhvFM9ta4ram/3XiDgk2/9jpfqeHhm6uUK9ISa5T474TCOshx
> 07HcZQeJrOEi9Y6tN6lYqQsvrs3/VUwgGychnenmS+dtnC9rCDFSK6BPwGvRXw93
> Gav2mWeImETs9RTAryYK1N3muoIWITBy8O+W8oRlcf+3O/0qB6ucStsWn8+Nr5Li
> y5g+Z/I9PfnUZYEUf16GbEarZQ+Si/wB/UPzy7OsUG64bJG33zLpmNq4Vkn92oq6
> DMfcdVIFn/ZS3uJifwHtRNiz8N6Su+FApizycNWS5HpF+R4GovdE43H6uKXtcjA=
> =bSHt
> -----END PGP SIGNATURE-----


Re: Small proposed default db setting change

Posted by Marlon Pierce <mp...@cs.indiana.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Maybe jdbc:h2:/tmp/portal_data;AUTO_SERVER=TRUE would be better.  Wil
have to test with Windows OS, but I assume the "/" notation is fine.


Marlon


On 11/8/11 12:47 PM, Jasha Joachimsthal wrote:
> +1 for the combined database in the demo setup, so we can also drop
> the duplicate H2 console
> 
> 
> On 8 November 2011 18:28, Marlon Pierce <mp...@cs.indiana.edu>
> wrote:
> 
> I propose that we change both the shindig and rave-portal DB 
> connections to jdbc:h2:~/portal_data;AUTO_SERVER=TRUE instead of
> using the in-memory database.
> 
> 
>> This seems to create the DB in the user's home directory. If so: 
>> 1) Does that work on a Windows machine as well? 2) I would prefer
>> a temp directory over the user's home directory so Rave will not
>> leave files after you remove it from your machine (of course 
>> nobody should want to remove Rave from their machine).
> 
> 
> This will allow both rave-shindig and rave-portal to use the same
> DB instance 
> (http://www.h2database.com/html/features.html#auto_mixed_mode).
> Seems to work fine in my tests.
> 
> 
> Marlon
> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOuX5mAAoJEOEgD2XReDo54qMH/RbR6oCDZ0J06L5LwyNPfM1Y
tsCu222oKWCy6NAZhvFM9ta4ram/3XiDgk2/9jpfqeHhm6uUK9ISa5T474TCOshx
07HcZQeJrOEi9Y6tN6lYqQsvrs3/VUwgGychnenmS+dtnC9rCDFSK6BPwGvRXw93
Gav2mWeImETs9RTAryYK1N3muoIWITBy8O+W8oRlcf+3O/0qB6ucStsWn8+Nr5Li
y5g+Z/I9PfnUZYEUf16GbEarZQ+Si/wB/UPzy7OsUG64bJG33zLpmNq4Vkn92oq6
DMfcdVIFn/ZS3uJifwHtRNiz8N6Su+FApizycNWS5HpF+R4GovdE43H6uKXtcjA=
=bSHt
-----END PGP SIGNATURE-----

Re: Small proposed default db setting change

Posted by Jasha Joachimsthal <j....@onehippo.com>.
+1 for the combined database in the demo setup, so we can also drop the
duplicate H2 console


On 8 November 2011 18:28, Marlon Pierce <mp...@cs.indiana.edu> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I propose that we change both the shindig and rave-portal DB
> connections to jdbc:h2:~/portal_data;AUTO_SERVER=TRUE instead of using
> the in-memory database.
>

This seems to create the DB in the user's home directory. If so:
1) Does that work on a Windows machine as well?
2) I would prefer a temp directory over the user's home directory so Rave
will not leave files after you remove it from your machine (of course
nobody should want to remove Rave from their machine).


> This will allow both rave-shindig and rave-portal to use the same DB
> instance
> (http://www.h2database.com/html/features.html#auto_mixed_mode).  Seems
> to work fine in my tests.
>
>
> Marlon
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iQEcBAEBAgAGBQJOuWayAAoJEOEgD2XReDo5GxIIAJQ6X/CEcOSg45nDx5W9gYnS
> JlI/NO5DvN+G0yKTYKmxwNm1IgE4TG2Qz/6xWEpcW7Np0pZf3ezZy72p+rpwsncc
> +Fxr7y8oHsvcPmryYEP4uZ86n78hw/8DATR+iPB/AVU39ImzAtSsk5p7zRKFK44e
> Mx7wUp/1LSwNYyJ5VT826E+8hCsPvKeIWJoCWgkW9JPYpLYe6so69hVVYsQ/Oyvm
> wJTUpCrKMDSS1vyhSbhOh7xBwXq6gL68WAzLg844mcmNP1jj+4pKJyiqJmYfhNKK
> orFHZWYDhRkx2Cjviw6lnvNqZz+AFyaCLAfpncDAd7dgSI04xsXQuJNNRqCYE5U=
> =fmnf
> -----END PGP SIGNATURE-----
>