Developing exteNd Director Applications

CHAPTER 7

Editing the Configuration of a Resource Set

This chapter describes how to edit a project resource set. It has these sections:

 
Top of page

About the Resource Set Editor

exteNd Director provides a custom editor for editing the configuration file for a resource set. That file is always called resourceset.xml and is in the WEB-INF/conf directory of an application WAR that uses a resource set. This section describes interesting features of the Resource Set Editor.

NOTE:   The section Configuring the resource set provides information about the settings you make in resourceset.xml.

Procedure To open the Resource Set Editor:

  1. On the Project tab of the Navigation Pane, find resourceset.xml in the WEB-INF/conf directory of the WAR.

    OR

    On the View tab within the Resources tab of the Navigation Pane, find resourceset.xml in an appropriate view.

  2. Double-click the file name.

    The editor opens and displays one of several tabbed panes. You can edit values in this graphical view or you can select XML source view and edit the XML as text:

    cdResourceSetEdit

 
Top of page

Using boolean variables in check box fields

Variables you define in resourceset.xml are available for use in any attribute or element value. In graphical view, you can choose variables from a list. The Resource Set Editor will display either a checked or an empty check box according to the current value of the variable.

Procedure To use a variable for a check box value:

  1. Right-click on or beside the check box.

    A popup menu displays each boolean variable in normal and negated versions.

    cdResourceSetVariable

  2. Select the variable you want from the list.

    The box is checked if the variable expression is true and empty if the variable expression is false.

NOTE:   To see what values use variables, switch to XML Source View and look for variables in the form $variablename$ and !$variablename$.

 
Top of page

Working with entries for resourcePath and libPath

When working with the list of entries for resourcePath and libPath, there are several points to keep in mind:

Point

Details

For check box values, such as Enabled, you can use a variable.

You might configure the resource set so that an entry is enabled when a variable is set to indicate the presence of a particular subsystem.

The order of entries is significant.

Use the Up and Down arrows to move entries to the correct position in the list. JARs and disk locations that you want searched first should be at the end of the list.

To specify the location of a JAR that is in the deployed WAR, specify a relative path, usually WEB-INF/lib.

You can use the variable $WEB-INF$, whose value is WEB-INF/lib.

To specify a disk location, specify an absolute path.

This is one of the few values that needs to be changed if you move the project to another computer. However, if you use the variable $WARLOCATION$ in the path, you will only need to redefine the variable, not all the entries, if you move the project.

 
Top of page

Using resource set utilities

The resource set is not just a feature of your deployed application. It is also running in the development environment to enable tools like the Relationship Viewer and Search and to find resource files used by editors and wizards. To control the resource set in the development environment, the Resource Set Editor provides several utilities on the General tab.

These utilities affect the resource set in the development environment only, not the deployed application:

Button

What it does

Stop, Start, Restart

Starts or stops the resource set.

Use Restart after changing entries on resourcePath and libPath so that the development environment can find the correct resource set contents.

Use Stop to conserve memory when you're not editing a resource set's files or using it on the Resources tab of the Navigation Pane.

Validate

Runs the validation classes in the resource set. The default validation verifies that entries in libPath and resourcePath exist. If you've added your own validation classes, they are executed too.

For more information    For information on adding custom validation classes, see Validating a resource set.

If you set Validate to true in resourceset.xml (on the upper half of the General tab), the same validation process is run during the exteNd Director boot process on the server.

Clear

Clears the messages reported by resource set utilities.

Enable/Disable Resource Subprojects

Displays a list of resource JAR subprojects in the resource set. Clear the check boxes of projects whose JARs you want to leave out of the archive. The settings you specify will be used the next time you build the archive in the development environment.

When dynamic class loading is enabled, you need to disable subprojects whose classes will be loaded from a disk location. Typically this is the myapp-resource subproject. To find out what is being loaded from disk, see the last entries on the libPath tab.

To speed deployment, you might also disable subprojects that your application isn't using yet.



Copyright © 2004 Novell, Inc. All rights reserved. Copyright © 1997, 1998, 1999, 2000, 2001, 2002, 2003 SilverStream Software, LLC. All rights reserved.  more ...