MoSeS Code Generation & Deployment

This panel is a user-interface to the MoSeS sub-project. MoSeS stands for Moby Services Support and its documenttaion is available at http://biomoby.open-bio.org/CVS_CONTENT/moby-live/Java/docs/Moses.html - which is also a good place to start in order to understand features of this panel.

The panel has two different parts - one generates code for the selected services, and one deploys such services in the local or remote servlet container (e.g. Tomcat). Usually, these two parts are used in different time - the first one, generating the code, before you implement your services, and the second part, deploying the code, after you finished your service implementation.

For both parts, you need to start by selecting a service, or services, or authority in the services tree. Multiple selection is possible -use SHIFT or CONTROL. If you select an authority, all services from this authority are considered selected. The right panel - the one for deployment - knows about selected services only if its check box Add service here... is selected.

All activities are done using Ant - you can follow it in the left bottom console.

Code generators

There are two generators, one for Biomoby datatypes (you need them all), and one for Biomoby services, or skeletons, (you need only those you are going to implement - that's why you have selected first one or more services in the tree). Each of them can be done fully, or just partly - select an appropriate number of check-boxes, and press the button below them. For generating services, you need to have generated also datatypes - so if you have not selected them, and if they do not exist yet, they are generated anyway.

Possible caveats:

Both generators generate well-commented Java source code which can have also included some graphics. Making the graphics requires to have installed program dot from the Graphviz package. If this program is not on your software path but it is somewhere on your computer, you can specify its non-standard location. Note that generating graphics slows down a bit the generating process - so if you are playing with it, consider to uncheck the box Add graphics....

The trash buttons can remove what was generated.

The middle part - generator's flavours - are here for future. Stay tuned...

The best is the last button - it does everything needed...

Service deployment

At the beginning, a warning: Service deployment is evil. Everything works fine when tested outside of a servlet container, but it stops to work when deployed. One almost always forgets a jar file or a configuration file, or whatever. Therefore, keep in mind that this panel helps you but cannot solve all problems.

There are two deployments (both described in the MoSeS documentation). The local one requires a servlet container (Tomcat) running - and if it is not, the panel will complain. The remote one just creates a tarred file with (hopefully) everything in it, and the rest must be done on a remote machine, from the command-line (no Dashboard support, but the documentation explains it in details).

Usually, only Tomcat home directory needs to be changed (unless you have installed Axis in Tomcat in a non-standard place).

Be aware, however, that the deployment also uses properties defined in your build.properties file, and the value of the environment variable CATALINA_HOME (if defined). These properties take precedence over the values specified in the Dasboard's fields!

The WSDD template file is an advanced feature - see the deployment documentation.

Very important is the Directory with user's jar files. Here you specify where are all classes, icon files, configuration files, shortly everything that constitutes your service implementation. All these files must be in jar files (done outside of Dashboard), and in one directory - the one you specify here.

A hint: if you put your jar files into build/lib you do not need to specify any user's directory - because the contents of build/lib is taken always.

Only services that are listed in the table (right bottom) will be deployed. They can get there by selecting them in a service tree (and having Add services... checked). You must enter/edit there the names of your classes that implement each service. The Pattern... can help with it - if you enter there something before you start adding services to the table. The value of the Pattern... field will be copied to the Implemented by class column, after the ${SERVICE} token is replaced by a real service name, and ${Service} token by a real service name with the first letter changed to upper-case.

You can remove services from the table by clicking in the trash column.

When done press Deploy... (un-deploy is not yet fully functioning).