Chapter 5. Managing Partitions

Chapter 5. Managing Partitions

5.1. About Partitions
5.2. Adding Partitions
5.3. Exporting and Importing Partitions
5.3.1. Exporting Partitions in Penrose Studio
5.3.2. Importing Partitions in Penrose Studio
5.3.3. Exporting and Importing Partitions in the Command Line
5.4. Starting and Stopping Partitions
5.5. Using Custom Java Classes

In Penrose Virtual Directory, a virtual directory is defined through the relationships of different server entities: servers (connections), applications (sources), individual entries (identities), and links between entities (mappings). All of these relationships are contained in the partition entry.

This chapter describes how to create and manage partition entries.

5.1. About Partitions

The complete virtual directory set up is defined in a container entry called a partition. The partition is a Java object which controls the operations and lives of all of the other components of the virtual directory configuration, including sources, connections, and mappings. The partition contains all of the Java classes and common files used by these virtual directory components. In this way, a partition is functionally similar to an application server like Tomcat.

A default partition is created with every Penrose Server instance, and this is usually sufficent to define the complete Penrose Virtual Directory deployment. It is also possible, depending on the deployment requirements, to have multiple partitions within a single Penrose Server instance.

It can also be necessary to have multiple Penrose Server instances with the same virtual directory configuration. Penrose Virtual Directory partitions can be easily exported from one Penrose Server instance and imported on another, making it easy to have a consistent virtual directory on different servers.

By default, every new server already has a partition named DEFAULT. Server entries can have an unlimited number of partitions. To create a new partition:

  1. In Penrose Server, open the server entry.

  2. In the top menu, click the Partitions menu item, and select the New Partition... option.

    Alternatively, right-click the Partitions folder, and select the New Partition... option.

  3. Fill in a name for the new partition, and click Finish.

The new partition, with all of its subfolders, is listed in the Partitions section.

The partition configuration can be exported from one Penrose Server and imported into another Penrose Server. This makes it much easier to have the same virtual directory mirrored on multiple servers.

The partition is a Java MBean object which starts and runs automatically with Penrose Server. Each source, connection, directory, and mapping is also an MBean object, controlled by the partition object. The partition can be started and stopped, which also starts or stops all of the sources, connections, directories, and mappings configured under it.

To start or stop a partition from Penrose Studio:

  1. Open the server entry in Penrose Studio, and expand the Partitions folder.

  2. Right-click the partition to start or stop under the Partitions folder.

  3. Select Start or Stop from the drop-down menu.

To start or stop a partition from the command line, run the command. For example:

/opt/vd-server-2.0/bin/ stop partition DEFAULT

The command is explained in Section A.7, “”.

5.5. Using Custom Java Classes

Penrose Virtual Directory comes with many different Java libraries which define different entry types, such as org.safehaus.penrose.partition.Partition for a partition and for virtual directory entries. It is possible to add custom classes to support special entries or to define specific subtree elements quickly.

To use a class for a specific partition only, create a lib/ directory in the partition directory, /opt/vd-server-2.0/partitions/partition_name/DIR-INF.

To make a custom class available for any partition, put the JAR file in the /opt/vd-server-2.0/lib/ext directory.


Do not put any custom libraries in /opt/vd-server-2.0/lib/. This directory is reserved for built-in libraries, and any custom files may be deleted or overwritten during upgrades.