-----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 <[email protected]> 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<[email protected]> 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-----

Reply via email to