If you do not want to use a subversion client program then you can unpack rosterAppSource.zip into C:\temp\sdz-roster-app for example, and go straight to step 4.
-
Setup two directories, for example:
C:\temp\sdz-roster-app\src ($SRC) and
C:\temp\sdz-roster-app\etc ($ETC)
-
Do checkout of https://strandz.svn.sourceforge.net/svnroot/strandz/sdz-src/trunk at HEAD into $SRC.
-
Do checkout of https://strandz.svn.sourceforge.net/svnroot/strandz/sdz-zone/trunk at HEAD into $ETC.
-
Create a project in your IDE from existing sources. Call it RosterApp. The project file location should be $SRC. You will need to specify that $SRC/classes is where compilation output goes.
-
Put some of the jars you have already downloaded into the $ETC/lib directory:
- acegi-security-1.0.7.jar
- cayenne-server-3.0-SNAPSHOT.jar
- spring.jar
-
The application needs some configuration-style jars:
cd C:\temp\sdz-roster-app\etc\bin
ant config-demo-jars
Thus these jars will be produced, and will appear in $ETC/lib:
- app-images.jar
- wr-cayenne-driver.jar (expect this to be MANIFEST ONLY)
- wr-cayenne-meta.jar
- wr-demo-properties.jar
- wr-help.jar
- wr-sdz-dt-files.jar
- wr-spring-configs
-
The rest of the necessary client jars can be unpacked from rosterAppJars.zip:
- ashwood-2.0.jar
- commons-codec-1.3.jar
- commons-collections-3.1.jar
- commons-lang-2.1.jar
- commons-logging.jar
- foxtrot.jar
- hessian-3.0.13.jar
- jdo2-api-2.0.jar
- jh.jar
- junit.jar
- mail.jar
- MDateSelector-mine.jar
- TableLayout.jar
-
Inform your IDE project about all these $ETC/lib jar dependencies.
-
Run org.strandz.applic.wombatrescue.StartupMemoryDemo. This will test that an uncomplicated version of the application works (one using POJOs with no persistence).
The next thing we will try is running directly against a database. However before doing so we will need to create the tables and populate them with test data.
-
Presumably you have a test database of some sort lying around. Write a WombatrescueDemoDataNode.driver.xml file to communicate with it. It should go into the $ETC\property-files\wombatrescue directory. For instance here is an example configuration:
<?xml version="1.0" encoding="utf-8"?>
<driver project-version="3.0" class="com.mysql.jdbc.Driver">
<url value="jdbc:mysql://localhost:3306/test"/>
<connectionPool min="1" max="1"/>
<login/>
</driver>
Now we can put this file into the last configuration-style jar file:
cd C:\temp\sdz-roster-app\etc\property-files\wombatrescue
ant jar-demo-cayenne-driver
This will replace $ETC/lib/wr-cayenne-driver.jar, that previously came through as MANIFEST ONLY.
-
Bring up the Modeler to generate the DB tables - you will find the cayenne.xml file in the $ETC\property-files\wombatrescue directory. Inside the Modeler do Tools/Generate Database Schema - this menu option will be available when you have selected WombatrescueDataMap on the tree control.
-
For the last step the Modeler probably already knew about the JDBC driver for the database you usually use. Your IDE project will now need this dependency. In the Modeler go to Tools/Preferences/ClassPath to find the driver's jar file. Copy it into $ETC/lib and make your IDE project aware of it.
-
We will now run org.strandz.task.data.wombatrescue.PopulateForCayenne to populate the database we have just created.
-
Run org.strandz.applic.wombatrescue.StartupLocalDemo to communicate with the populated database.
Soon we will demonstrate a ROP version of this same application. But first of all we need to have our servlet in place.
-
cayenneRemoteServiceWebApp.zip contains a servlet webapp. Unzip it into your servlet engine's webapps directory ($WEB_SERVER/webapps).
-
You will then need to change the file $WEB_SERVER/webapps/cayenneRemoteService/WEB_INF/applicationContext-common-business.xml to reflect the database you will be using for authentication - which for our demo purposes can be the same as the one we have just populated.
-
Copy these jar files across from $ETC/lib to $WEB_SERVER/webapps/cayenneRemoteService/WEB_INF/lib:
- acegi-security-1.0.1.jar
- ashwood-2.0.jar
- cayenne-server-3.0-SNAPSHOT.jar
- commons-codec-1.3.jar
- commons-collections-3.1.jar
- commons-lang-2.1.jar
- commons-logging-1.1.jar
- foxtrot.jar
- hessian-3.1.6.jar
- jdo2-api-2.0.jar
- mysql-connector-java-3.0.15-ga-bin.jar
- spring.jar
- wr-cayenne-driver.jar
- wr-cayenne-meta.jar
-
These server only jar files also need to be added, all of which were previously downloaded:
- backport-util-concurrent.jar (Spring)
- ehcache-1.1.jar (Spring)
- oro-2.0.8.jar (ORO)
- velocity-1.3.jar (Spring)
-
The implementation of the services comes from the application jar (wombat.jar), which depends upon Strandz (strandz.jar). To create these jars, first of all create the file $ETC/property-files/global.properties to let ant know where $SRC is, for example:
src.root=C:/temp/sdz-roster-app/src
Now we can create the jar files using the previously generated classes in $SRC/classes:
cd C:\temp\sdz-roster-app\etc\bin
ant -f jarWombat.xml
ant -f jarStrandz.xml
-
After copying these two jars across from $ETC/lib-sdz to $WEB_SERVER/webapps/cayenneRemoteService/WEB_INF/lib; startup the servlet engine.
-
Test that the authentication works by entering this URL into your browser:
if you get an java.io.EOFException stack trace after being required to enter Mike/Mike, then everything is working.
-
Run org.strandz.task.data.wombatrescue.StartupDemoCayenne.