Skip to content

Commit

Permalink
Add maven launcher for HSQL
Browse files Browse the repository at this point in the history
  • Loading branch information
dsyer committed Oct 19, 2011
1 parent 49d784b commit f9b9b14
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
3 changes: 2 additions & 1 deletion README.md
Expand Up @@ -40,7 +40,8 @@ and then you will be able to use all the features provided by this project.

See the unit test and the source code of the handler for more detail. The test is very minimal (it uses hard-coded in memory data, not distributed cache data), but it should scale well and Gemfire should take care of data locality if an item reader that reads from the cache is used. The test is set up to run in-memory (not distributed) by default, so you can check that everything is working by simply running it out of teh box. To run in a small cluster you can use the `RegionLauncher` provided in the same package to launch another gem node:

1. Start an HSQL database server with connection url `jdbc:hsqldb:hsql://localhost:9005/samples`. From Eclipse if you imported
1. Start an HSQL database server with connection url `jdbc:hsqldb:hsql://localhost:9005/samples`. There is a Maven profile for this,
so you can run `$ mvn -P rundb exec:java` from the command line. From Eclipse if you imported
this project as a Maven project, you should be able to use the launcher in the top level directory - right click and run as...
2. Run the `RegionLauncher` (it will fail if the database is not running)
3. Change the test case so the context location is `launch-context.xml`
Expand Down
1 change: 0 additions & 1 deletion hsql-server-for-gemfire-tests.launch
Expand Up @@ -11,5 +11,4 @@
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.hsqldb.Server"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="spring-batch-gemfire"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.maven.ide.eclipse.launchconfig.sourcepathProvider"/>
<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dbatch.jdbc.url=jdbc:hsqldb:hsql://localhost:9005/samples"/>
</launchConfiguration>
16 changes: 16 additions & 0 deletions pom.xml
Expand Up @@ -27,6 +27,22 @@
</repository>
</repositories>
</profile>
<profile>
<id>rundb</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1</version>
<configuration>
<mainClass>org.hsqldb.Server</mainClass>
<classpathScope>runtime</classpathScope>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<properties>
<maven.test.failure.ignore>true</maven.test.failure.ignore>
Expand Down
5 changes: 5 additions & 0 deletions server.properties
@@ -0,0 +1,5 @@
server.port=9005
server.trace=true

server.database.0=file:target/hsqldb-data/samples
server.dbname.0=samples

0 comments on commit f9b9b14

Please sign in to comment.