Download and install

To start with the Extend first download binary package from here .

Next step is to unzip downloaded package.

Extend Directory Structure

When unzipped you should see following directory structure:

    bootstrap.jar - bootstrap jar file
    shutdown-client.jar - shutdown client jar file
    start.sh - startup shell script
    stop.sh - shutdown shell script
    libraries needed for the server to work
        server.xml - the server's application context
        libraries needed for services - they are going to be visible from all modules

Deploy directory is place where service archives(.sar), danube web archives (.dar) or j2ee web applicaion archives (.war) can be placed. For web archives and danube web archives context will be assumed from the directory name - up to the "." (dot). (That can be changed, see below).


Starting and stopping the server

Now you should start the application server. You can do it by following command:

sh bin/start.sh


java -jar bin/bootstrap.jar


java -cp bin org.abstracthorizon.spring.server.Bootstrap

To check internals of the server point your browser to: http://localhost:8080/bean-console/.

To stop the server use following command:

sh bin/stop.sh


java -jar bin/shutdown-client.jar


java -cp bin org.abstracthorizon.spring.server.support.Shutdown

Bean Console

Now the server is started you can check it by checking its internal structure by using Bean Console . Bean Console is running under Danube web server and is available on http://localhost:8080/bean-console.

Check server/default/deploy/bean-console.dar/web-application.xml how to make access to Bean Console more secure (using SSL + keystore provided for authentication).

When in Bean Console you can check DeploymentManager for all deployed modules. Here are some interesing stuff that can be done with Bean Console:

  • support module has ServerControl bean with shutdownServer() method. Url: http://localhost:8080/bean-console/invoke/[DeploymentManager]/deployedModules/[support]/[ServerControl]/
  • DeploymentManager has method loadAndDeploy(URL). As a parameter you can supply URL of .war archive which will be in turn downloaded and deployed with Tomcat. Similar goes for .dar for Danube or .sar for simple SAS service archive. URL: http://localhost:8080/bean-console/[DeploymentManager]


Now when server is running you can add your own services to it. All you need to do is to create directory with ".sar" extension, place service.xml spring beans definition xml file in it and define beans. A bean that is to be a service should have following tag(s) added to the definition (immediately after <bean ...> tag). Here is an example how tomcat is defined as a service:

<bean name="tomcat" class="org.apache.catalina.startup.Embedded">

  <property name="name"><value>Tomcat</value></property>
  <property name="catalinaHome"><value>deploy/tomcat.sar</value></property>

Specifying empty <create-method/>, <start-method/>, <stop-method/> or <destroy-method/> tag means there is no such method to be called and it will be skipped.

If only <service/> is added then it is assumed that create, start, stop and destory methods are called exactly like that. If any of them is missing then it will be omitted. If name of any of these methods is different then they can be specified as in above example. Now container will call these methods in that order when directory with ".sar" extension is placed under deploy directory (or at the startup).

Root of service archive directory is added to the class path as well as all ".jar" archives inside of it.


Service archives (called as Modules - entities that can be managed, that can be created, started, stopped, destroyed) can form a hierarchy of depedencies. If archive (module) "A" has some code (or ".jar"/libraries) that archive (module) "B" requires it is done by specifying <depends-on> tag at the beginning of the service.xml file. Here is an example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">


Note: this is a FreeMarker Danube integration module...