Rule Builder > Managing Repositories > Working With Repositories > Saving a Repository

You can save a repository as a set of files or in a database.

Saving a repository as a set of files is useful for portability reasons. In addition, a file-based repository can be integrated into a source code control (SCC) system such as CVS. This way of storing a repository also provides persistence and allows multiple users to access elements of the same repository.

Furthermore, if the repository is not too big, the burden of setting up a database is avoided.

Saving a Repository as a Set of Files

If you are saving the repository as a set of files for the first time:

  1. Click Save Repository on the File menu.
  2. In the dialog box that opens, select the File option (this is the default value), and indicate where you want to save the repository, as shown in Figure 3.2.

  3. images/savingFileRepository.gif
  4. Figure 3.2    Saving a Repository as a Set of Files

Subsequent saves of a repository do not require you to specify the name or location, and you have access to the Save As function to redefine the location.
Note
You may receive messages from the Repository Repair Mechanism while saving.

A file-based repository is represented in the file system as a directory that has the respository name, and whose content includes an Application and a Tool directory. For more information see the Enterprise Integration User's Manual. A file-based repository can be worked on by multiple users, using either the CVS plug-in or the JRules locking features.

Saving a Repository in a Database

To save the repository in a Relational Database Management System (RDBMS):

  1. Click Save Repository on the File menu.
  2. In the dialog box that opens, select the RDBMS option, and specify the location of the database in which you want to save the repository, as shown in Figure 3.3.

  3. images/saveDBRepository.gif
  4. Figure 3.3    Saving a Repository in a Database
  5. To improve database access performance select the RDBMS (Compact) option. The Compact option is an organization of the RDBMS tables that speeds up the reading time and decreases the saving time.
    Notes
    1. If you use this option, it is strongly recommended that you group objects logically into packages to keep saving and loading operations as modular as possible.
    2. SQL cannot be used to query the repository.
  6. Your must add your Java Data Base Connection (JDBC) driver to the Rule Builder classpath by editing the file bin/RuleBuilder/build.xml. Add a new line in the <classpath> section of the "run" target in your build.xml file containing the location of your driver, for example:
  7. <pathelement location=.../>
  8. Then, depending on your JDBC driver, you may have to do some additional settings. There are two kinds of JDBC driver: type III and type IV.
    1. Type III drivers require the database client to be configured on the client box.
    2. Type IV drivers are 100% java drivers that do not require any additional settings or third party software.
  9. Click one of the buttons in the lower part of the dialog box to carry out one of the following functions:
    1. Create Tables: Creates the database tables used to save the repository. If previously existing tables are found in the database, a message is displayed asking whether you want to drop them or not.
    2. Drop Tables: Deletes the database tables previously used to store the repository.
      Warning
      You may want to run a backup before using this option, because the content of the tables cannot be recovered later.
    3. Create SQL File: Creates a text file with the list of database commands used to create the database tables. This is for information purposes only and the commands listed depend on the database used.

See Also

Using the Repository Repair Facility | Working with Repositories in CVS


Customer Support | Copyright © 1987-2004 ILOG S.A. All rights reserved. Legal terms. PREVIOUS   NEXT