Sun Java System Application Server Enterprise Edition 8.1 2005Q2 High Availability Administration Guide

- Previous: Server Instance Synchronization
- Next: Unique Settings and Configuration Management

## Synchronizing Library Files

The `--libraries` deploy time attribute for an application can be used to specify runtime dependencies of an application.

To make a library available to the whole domain, you could place the JAR file in domain-dir`/lib` or domain-dir`/lib/classes`. (For more information, see Using the Common Classloader in Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Developer’s Guide. ) This is usually the case for JDBC drivers and other utility libraries that are shared by all applications in the domain.

For cluster-wide or stand alone server wide use, copy the jars into the domain-dir`/domain1/config/`xyz-config`/lib` directory. Next, add the jars in `classpath-suffix` or `classpath-prefix` element of xyz-config. This will synchronize the jars for all server instances using xyz-config.

In summary:

- `domains/domain1/lib` - domain wide scope, common class loader, adds the jars automatically.

- `domains/domain1/config/cluster1`, `config/lib` - config wide, update `classpath-prefix` or `classpath-suffix`.

- `domains/domain1/config/cluster1`, `config/lib/ext` - adds to java.ext.dirs automatically.

- Previous: Server Instance Synchronization
- Next: Unique Settings and Configuration Management

- © 2010, Oracle Corporation and/or its affiliates