You use configuration files in the $SERVER_HOME/config directory to configure VWS. You can also configure the Equinox framework properties using the $SERVER_HOME/lib/org.eclipse.virgo.kernel.launch.properties file. This section divides the configuration of the server into the following high-level tasks:
This section provides information about configuring the VWS kernel and the user region by updating the following files in the $SERVER_HOME/config directory:
Table 9.1. Kernel Configuration Files
| Property File | Description |
|---|---|
org.eclipse.virgo.kernel.properties | Configures kernel deployment and the Admin Shell of VWS. |
org.eclipse.virgo.kernel.userregion.properties | Configures the user region of VWS. |
org.eclipse.virgo.kernel.users.properties | Configures the users that are allowed to access the Admin Shell and Admin Console, and roles to which they map. |
org.eclipse.virgo.kernel.jmxremote.access.properties | Configures the permissions for users that are allowed to access the Admin Shell and Admin Console. |
org.eclipse.virgo.kernel.authentication.config | Configures the Java Authentication and Authorization Service (JAAS) for the Tomcat server users. |
You can configure three properties of deployment: the pickup directory into which you copy applications for hot-deployment, the deployment timeout, and whether automatic cloning of deployed bundles is enabled.
To change any of these properties, edit the deployer.XXX properties of the $SERVER_HOME/config/org.eclipse.virgo.kernel.properties file. The following table describes these properties.
Table 9.2. Deployment Configuration Properties
| Property | Description |
|---|---|
deployer.timeout | Specifies the amount of time, in seconds, after which VWS times out while trying to deploy a bundle, library, or plan. The default value is 300. If you want to disable deployment timeout, specify 0. |
deployer.pickupDirectory | Specifies the absolute or relative path to the pickup directory to which you copy applications for hot-deployment. Relative paths are relative to $SERVER_HOME. The default value is ./target/pickup.. |
The following listing displays the default configuration distributed with the VWS; only relevant sections of the org.eclipse.virgo.kernel.properties file are shown.
deployer.timeout=300 deployer.pickupDirectory=pickup
As the default configuration shows, the default pickup directory is $SERVER_HOME/pickup and the deployment timeout is 300 seconds.
The Admin Shell is a command line utility that allows you to examine artifacts currently installed to a particular Web Server instance, manage the lifecycle of the installed artifacts, install new artifacts, and shutdown the server. For complete documentation on the Admin Shell, see Chapter 4, Equinox Console Extension.
You configure the Admin Shell by updating the shell.XXX properties in the $SERVER_HOME/config/org.eclipse.virgo.kernel.properties file, as described in the following table:
Table 9.3. Admin Shell Configuration Properties
| Property | Description |
|---|---|
shell.enabled | Specifies whether the Admin Shell is enabled or not. Valid values are true or false. |
shell.port | Defines the port on which you can remotely access the Admin Shell. If not set, the shell is only available from stdout of the VWS process. |
The following example shows the default Admin Shell configuration in a freshly-installed org.eclipse.virgo.kernel.properties file; only the relevant section of the file is shown.
shell.enabled=true shell.port=2401
The example shows that the Admin Shell is enabled by default, and you connect to it remotely using the port 2401.
The user region is the subsystem of VWS that supports deployed applications, both your own user applications and those of the server itself, such as the Admin Console. The user region is deliberately isolated from the kernel, which makes it much simpler for you to manage your applications with the Admin Console or Admin Shell because the internal server bundles are not visible.
You configure the user region by updating properties in the $SERVER_HOME/config/org.eclipse.virgo.kernel.userregion.properties file; these properties are described in the following table.
WARNING: We strongly recommends that you update only the initialArtifacts property; updating the other properties could cause VWS to fail. These properties are documented for your information only.
Table 9.4. User Region Configuration Properties
| Property | Description |
|---|---|
baseBundles | Specifies the hard-coded list of bundles that VWS installs directly into the user region. Virgo Web Server does not perform any automatic dependency satisfaction for these bundles; in other words, you only get the bundles in the list and nothing more. |
packageImports | Specifies the packages that exist in the kernel that VWS imports into the user region so that they are in turn available to be imported by bundles in the user region. This property supports a .* wildcard. For example, com.springsource.util.* will import all packages that start with com.springsource.util. |
serviceImports | Specifies the services in the kernel that are imported into the user region so that they're available to bundles in the user region. |
serviceExports | Specifies the services in the user region that are imported into the kernel so that they're available to bundles in the kernel. |
inheritedFrameworkProperties | Specifies the framework properties, configured in the $SERVER_HOME/lib/org.eclipse.virgo.kernel.launch.properties file, that will also be set on the user region's nested framework. |
initialArtifacts | Specifies the artifacts that VWS deploys into the user region when the server starts. Virgo Web Server performs dependency satisfaction when it deploys these artifacts. This means that you only need to list the top-level artifacts that you care about; VWS automatically installs any other artifacts upon which they depend from the repository.
You can use this property to convert a VWS into a Virgo Kernel by removing the |
Virgo Web Server uses the Java Authentication and Authorization Service (JAAS) framework to authenticate the administration user that connects to Web Servers using the Admin Console or Admin Shell. This section describes how the authentication mechanism is configured by default, and the files that you need to update if you want to change the administration user, change their password, and so on.
The $SERVER_HOME/config/org.eclipse.virgo.kernel.authentication.config file configures the underlying authentication technology for VWS. The short file consists of the following entry:
dm-kernel {
org.eclipse.virgo.kernel.authentication.KernelLoginModule REQUIRED;
};The entry is named dm-kernel. This name corresponds to the <Realm> element in the $SERVER_HOME/config/tomcat-server.xml file that configures the JAAS authentication mechanism for the Catalina service of the Tomcat servlet container. The dm-kernel entry specifies that the JAAS LoginModule that VWS uses to authenticate users is org.eclipse.virgo.kernel.authentication.KernelLoginModule and that this KernelLoginModule is required to "succeed" in order for authentication to be considered successful. The KernelLoginModule succeeds only if the name and password supplied by the user are the ones it expects. The default administration username/password pair for Web Server is admin/springsource.
You configure the administration user in the org.eclipse.virgo.kernel.users.properties file. The default file for a freshly installed VWS is as follows:
################## # User definitions ################## user.admin=springsource ################## # Role definitions ################## role.admin=admin
The administration user that connect to the Admin Console and Admin Shell must have the admin role. The preceding file shows how, by default, the admin role is assigned the admin user with password springsource.
If you want to change the administration user, update the org.eclipse.virgo.kernel.users.properties file. For example, if you want the juliet user, with password supersecret, to be the new adminstration user, update the file as shown:
################## # User definitions ################## user.juliet=supersecret ################## # Role definitions ################## role.admin=juliet
Be sure to restart VWS after you make this change for it to take effect.
The final file involved in VWS authentication is $SERVER_HOME/config/org.eclipse.virgo.kernel.jmxremote.access.properties. This file specifies the JMX access privileges that the administration user has; by default they are read and write, as shown in the following listing:
admin=readwrite
The only other value you can enter is readonly, which means that the adminstration user would only be able to view information using the Admin Console and Admin Shell.