This is version . It is not the current version, and thus it cannot be edited.
[Back to current version]   [Restore this version]


Orchard is what we call the network-aware service-oriented software used to run Orc programs online. This page describes how to package, install, and test the Orchard servlet.


  • Ant
  • Eclipse
  • A checkout of the Orchard, OrcSites, ~Website and OrcJava projects from SVN

Install Orc JAR Dependencies#

The WAR file needs to include the JARs for OrcJava and OrcSites. Build these and copy them to the Orchard/lib directory:

(cd OrcJava && ant jar && cp orc-?.?.?.jar ../Orchard/lib)
(cd OrcSites && ant jar && cp orc-sites-?.?.?.jar ../Orchard/lib)

Create .properties files#

Browse to src/orc/orchard and copy to Modify it to suit your configuration (i.e. set the mail servers). If you don't plan to run a database or use the various webservice demos you can leave those sections as-is. If you are a member of the Orc team, see AdrianQuark for preconfigured properties and keystore files.

Build the Orchard WAR#

Do a "Clean" build of Orchard from within Eclipse. Then use the External Tool "Build WAR" (which just runs "ant war" using build.xml) to create orchard.war in the top-level directory.

If you have installed a servlet container, you can deploy this WAR to your servlet container. For example, to deploy to an installed version of Jetty, do this:

sudo cp orchard.war /var/lib/jetty6/webapps/
sudo /etc/init.d/jetty6 restart

If you have not installed a servlet container where you want to run Orchard, continue to the next steps to build a standalone JAR which you can run without a servlet container.

Build the Demo Pages#

In the Website project, run ant demo-war. This will create the file ../Orchard/root-demo.war.

Build the Demo JAR#

In the Orchard project, run ant demo-jar. This will create the file orchard-demo.jar.

Test the Services#

Run java -jar orchard-demo.jar.

A few seconds later your browser window should open to http://localhost:8080/demo.shtml where you will see the Orchard demo page. If this doesn't happen you should see error messages on the console indicating the problem.

Choose a demo, click "Run", and watch for publications in the bottom window. If you are not seeing any publications, check for Javascript errors. I recommend installing the "Firebug" Firefox extension to assist in debugging communication problems with the servlet.

Database (OPTIONAL)#

There is an experimental feature to allow users to log in to use restricted features. I don't recommend that you try and set this up on your own server, but if you really want to try it, follow these instructions:

  1. Install postgreSQL
  2. Log in to postgreSQL as an administrator
  3. Run the script src/orc/orchard/create.sql
  4. Run the script src/orc/orchard/schema.sql
  5. To create accounts, use the JMX Console (see below).

JMX Monitoring (optional)#

To use the JMX console (this has known issues on Java 6, please downgrade to Java 5 if you want to use this feature):

  1. Start jconsole: gksudo jconsole
  2. Select the local agent corresponding to the servlet container and click Connect
  3. Some useful things to do in the JMX console:
    • Under "MBeans", if there are any jobs running they will appear under "orc.orchard"; you can see status, statistics, and stop jobs if necessary.
    • Under "MBeans", you can find the DbAccounts object and create/update restricted accounts. (This assumes you configured a user accounts database.)
    • Under "Threads", you can see which threads are blocked and where.

Add new attachment

Only authorized users are allowed to upload new attachments.
« This particular version was published on 13-Apr-2009 09:57 by AdrianQuark.