Welcome to SASH Starter, a demonstration application for the SourceLabs SASH Stack 2.0! SASH Starter is intended to demonstrate how to integrate SourceLabs' distributions of Spring, Axis, Struts and Hibernate in a realistic business case while showing prospective developers how to accomplish everyday tasks using the framework.
To build SASH Starter, you will need:
SourceLabs has tested SASH Starter with Java 5 update 11 (1.5.0_11) and recommends it as your JVM for SASH Starter (and SASH itself). Java 6 is unsupported in this version, but there is no known reason for it not to work.
VMs earlier than Java 5 are not supported.
SASH Starter uses Apache Maven 2.0 for project management, including the build system. If you're not familiar with Maven, you can find tutorials, downloads, and lots more at the official Maven site.
Once you have Java 5 and Maven installed and working, you can move on to the environment setup.
To run SASH Starter, you will need:
SASH Starter does require a database to run against. While SASH Starter will operate against any database with a JDBC provider, you should select the one that you're most comfortable with. You can customize the JDBC properties for your database in the file:
src/main/resources/jdbc.properties
Sample files for popular databases are also provided in that directory. If you don't have access to an existing database instance, we recommend trying Hypersonic SQL (HSQL), a free 100% Java database implementation that's included in SASH Starter. While not suitable for high-demand production use, it is excellent for development and testing (in fact, SASH Starter uses it for its test cases). You can read about how to run and use HSQL in the HSQL user's guide.
Once you have configured the database of your choice and set up your jdbc.properties file, you'll need to create the database tables SASH Starter needs in order to run. Database-specific initialization scripts are provided in the directory:
src/main/etc/db/
In each directory named after a supported database type - hsql/, mysql/ and oracle/ - there is a SQL script file called create_db.sql. This file will create the tables that SASH Starter needs. Refer to the documentation of your database of choice for instructions on how to load .sql files.
Finally, you will need to make sure that SASH Starter is built with the appropriate JDBC driver for your database. By default, SASH Starter will use the HSQL JDBC driver. If you wish to use SASH Starter with MySQL or Oracle, you will need to uncomment the appropriate dependency in the pom.xml file located in SASH Starter's home directory. Look for the following lines:
<!-- uncomment for mysql databases
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.0.5</version>
</dependency>
-->
<!-- uncomment for oracle databases
<dependency>
<groupId>ojdbc</groupId>
<artifactId>ojdbc</artifactId>
<version>14</version>
</dependency>
-->And uncomment the dependency appropriate for your database type.
SourceLabs supports the following J2EE containers:
If you don't already have a container, we recommend Tomcat, which is distributed as part of SASH 2.0.
Getting a package
To get a .war file that you can install directly into your J2EE container, just run:
mvn clean package
This will compile everything, run all test cases, and produce the final package. The finished .war file will be deposited in the following location:
target/sashstarter-3.0.0-SNAPSHOT.war
You can then deploy this .war file in your J2EE container.