Vine Toolkit - standalone mode

  • user warning: Table 'variable' is marked as crashed and should be repaired query: UPDATE variable SET value = 's:1:\"1\";' WHERE name = 'image_gallery_nav_vocabulary' in /var/www/ on line 609.
  • user warning: Table 'variable' is marked as crashed and should be repaired query: UPDATE variable SET value = 'a:1:{i:0;s:13:\"primary-links\";}' WHERE name = 'menu_expanded' in /var/www/ on line 609.

Vine Toolkit may be used in different ways, one of it is standalone mode - it can be used as a library to access different grid resources for example.

Let's assume that '$VINESRC' is the location of the vine source installation package.

In '$VINESRC/projects' directory you can find an example project called: jobmanagertest - it contains simple standalone application.
(if it is not present set the default installer to 'testStandaloneJobManager' by 'ant choose-installer' command and run 'ant fetch' command to get all required projects)

In '$VINESRC/installers' directory you can find an example installer called 'testStandaloneJobManager' which could be used to test the standalone application. The application uses globus gt4, grms broker and unicore6 resources - but
of course it could be changed in the Domain.xml configuration file accordingly by the user requirements.

So first the installer's

# Installer title
software.installer.title=Job Manager Test

# Installer type

# Projects

# Application type

# Turn off blazeds support

- software.installer.title - installer title
- software.installer.type - 'dist' defines the installer is accessible as official installer ('dev' means it won't be visible in 'ant choose-installer' command)
- application.projects - defines all Vine projects which should be installed and used within the standalone application (indirectly by using Vine Tookit API)
- application.type - has to be set to 'main' value what means standalone mode
- application.web.blazeDsSupport - web blazeDs support should be switched off

In the installer's directory 'WEB-INF\vine\resources\' you can find configuration file 'Domain.xml' where target resources could be defined.

So our project is present in the directory: $VINESRC\projects\jobmanagertest

Below you can see the '' which could be found in directory $VINESRC\projects\jobmanagertest\ant
project.title=JobManager Test

Project extends let you use different classes defined in the projects which become a part of the accessible API (in case of web installation in tomcat are placed in jars in shared/lib directory,
in case of standalone in vine/config/lib)

In the test project there is only one example java class - the example of the standalone application:

Package: org.vinetoolkit.jobmanagertest.spi.impl, java class:

Inside it you can see how to use Vine API to use different grid resources defined in Domain.xml

After the 'testStandaloneJobManager' is set as the default (you can use 'ant choose-installer' for this in the $VINESRC directory)
you can install the Vine Toolkit with standalone apps: ant install (latest updates will be downloaded) or ant reinstall (current version from disk will be installed).

After installation is completed you can see new directory '$VINESRC/applications' - it contains Vine Toolkit in standalone mode.

Now we can go to the vine sub directory and use such command to run out test application:

ant -f ant\jobmanagertest.xml > somelog.txt

Logging information are directed to some file to be able to track the execution.
Our application requires a password argument - so you have to provide it after running or add it as the command line argument.
The password is used to create proxy credential as the suitable authentication module is set in the Domain.xml.
(user's certificate and private key have to be present in the '.globus' directory in the user's profile)

Ant script explanation - it is defined in our test project in directory: $VINESRC\projects\jobmanagertest\src\main\app\ant\jobmanagertest.xml
with properties file: $VINESRC\projects\jobmanagertest\src\main\app\ant\

The properties content is: Manager Test

So just the name, the class of the standalone application class with the main method and optional JVM arguments.

The ant script is always the same in all projects except the value for property '' which has to be set for every project accordingly:

<project default="execute" basedir=".">

    <property name="" value=""/>
    <dirname property="" file="./${}"/>
    <property name="" value="${}/${}"/>

    <!-- =================================================================== -->
    <!-- Executes vine                                                       -->
    <!-- =================================================================== -->
    <target name="execute" description="Executes Vine">

        <ant antfile="../build.xml"
            <property name="" value="${}"/>



In this way you can run the Vine Toolkit in standalone mode by using standard build routine and accessible scripts.

Of course it is also possible to run it without using ant and properties.

So for example if we put our standalone application directly in the '$VINESRC/applications' directory it is possible to run the application in such way on Windows for example (script is run directly in the $VINESRC/applications directory, our application main class is accessible out there):

@echo on

for %%i in (.\vine\config\lib\*.jar) do SET CLASSPATH=!CLASSPATH!;%%i
SET CLASSPATH=!CLASSPATH!;.\vine\config\classes

java$VINESRC\applications\vine -classpath !CLASSPATH! org.vinetoolkit.jobmanagertest.spi.impl.JobManagerTest 

It is important to set '' environment variable to declare Vine home directory. This way Vine Toolkit could be shipped with some standalone application a part of it. It is enough just to copy 'vine' directory form $VINESRC/applications.

IMPORTANT! Always remember about classloaders dependencies - Vine and its projects uses different technologies, different versions of jars - so please be careful with it, with the 'classpath' argument for the java and other jar libraries used by your standalone application.