SourceForge.net Logo

build & deploy

This page describes how to build and deploy berserk, as well as how to integrate BERSERK to an existing application.

The most important thing users must have in mind is that BERSERK is a monitor and therefore users must do operations thougth it's interface. Thus, BERSERK is blind to all operations that not use it's interface.

introduction

BERSERK ships with the two example applications (see Tutorials section). In order to build them, BERSERK’s .jar must be in compilation’s classpath. Obviously the same applies to the runtime environment.

To build BERSERK, the libraries for the used technologies must be in the compilation classpath (see Used Technologies page).

JUnit and DBUnit libraries can be safely omitted from the compilation and execution classpath, since they are only used when running BERSERK’s unit tests.

If Jakarta Ant is used to compile BERSERK (recommended because a build.xml file is provided), the task libraries (JUnit and DBUnit) must be in Ant’s runtime classpath.

Using BERSERK with a client application is quite straightforward since it follows the usual design of monitors: it has a unique entry point. All that client applications must do is import the proper classes and use BERSERK’s Service Manager’s interface.

 

step by step

BERSERK When integrating BERSERK in an application, developers should go through the following steps:

1. Download the desired distribution from the download section;

2. Decide what transaction and storage objects to use (see FAQ);

3. Edit berserk. properties file to reflect the choice made in step 2;

4. Include berserk.properties in client application’s runtime classpath;

a) If using OJB, database relational schema must be built, according to the provided SQL file;

b) If using Digester, configuration files must be in application’s runtime classpath as well;

5. Build BERSERK (remember to copy the conf directory to the destination .jar);

6. Import necessary BERSERK’s classes (typically ServiceManager and a couple of exceptions);

Again, note that, because BERSERK is a monitor, all operations must be made through it’s interface; if not, non-monitored Java invocation will occur.

 

bulk or standalone

Questions about whether distributon should be used are usual. BERSERK allows to distribution types: bulk or standalone.

Because BERSERK relies on some libraries (see used technology), it needs some jars to be in the class path.

Bulk distribution contalins only BERSERK classes. This should be used only if you have the other needed jars in the client application's classpath.

Standalone distribution contains all the classes BERSERK needs to run. Thus, standalone .jar is much bigger than the bulk version.

Remember that if you choose bulk version, you don't need JUnit and DBUnit libraries to use BERSERK.

© 2003, Gonçalo Luiz