Defining deployment directories for JonasAdmin

1.1. The depmonitor service configuration
1.2. The JOnAS repositories configuration

The JonasAdmin console allows the deployment of application modules installed in deployment directories.

By default, there is one deployment directory, which is JONAS_BASE/deploy.

There are two ways to define additional deployment directories.

1.1. The depmonitor service configuration

It is possible to define deployment directories by setting the directories property in the service configuration.

######### JOnAS Deployment Monitor #############
    
    jonas.service.depmonitor.directories dir1,dir2
    
[Note] Note

Application modules installed in these directories (deploy, dir1 and dir2) will be deployed at the server start-up.

If the depmonitor is configued in development mode, undeploying a module implies the removal of its file from the deployment directory. Otherwise, the module can be un-deployed and re-deployed with JonasAdmin as many times as necessary.

1.2. The JOnAS repositories configuration

It is possible to specify deployment directories by defining them as URL repositories. This can be achieved in two ways:

  • Add directories as URL repositories in the JONAS_BASE/conf/initial-repositories.xml file.

  • Create a repositories list in a XML file (Deployment plans repositories ). This file has to be deployed at server start-up (put it in the JONAS_BASE/deploy directory).

Example 1.1. Example of a repository file defining directories for JAR and RAR modules

  <?xml version="1.0" encoding="UTF-8"?>
      <repositories 
      xmlns="http://jonas.ow2.org/ns/deployment-plan/repositories/1.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="repositories-1.0.xsd">

     <repository id="jars-directory">
        <type>url</type>
        <url>file:///JONAS_BASE/ejbjars/</url>
     </repository>

     <repository id="rars-directory">
        <type>url</type>
        <url>file:///JONAS_BASE/rars/</url>
     </repository>

     </repositories>


[Note] Note

Application modules installed in these directories will not be deployed at the server start-up. They can be un-deployed and re-deployed with JonasAdmin as many times as necessary.