The Carbon Java Framework  

The Carbon Core Bootstrap Subsytem

Deployment Properties

Author: Doug Voet (dvoet at sapient.com)
Version: $Revision: 1.2 $($Author: araman $ / $Date: 2003/04/10 09:43:55 $)
Created: January 2002

What Are Deployment Properties?

Deployment Properties are used to hold information specific to the current deployment of Carbon. They are similar to system properties available from the JVM (via System.getProperty() and System.setProperty()). One of the limitation of system properties is that their scope is too large; they are global for the entire JVM. In most cases, this is OK. Problems arise, however, when multiple instances of an application are deployed in the same JVM, but require different values for the system properties. Deployment Properties enhance system properties by using a properties file in addition to system properties. If a Deployment Property is requested, the Bootstrap subsystem will first look in the system properties, if the property is not found, the properties file will be searched. This provides 3 benefits.

  • It provides a mechanism for specifying properties with a scope visible to the entire Carbon deployment, but not so large a scope as to effect other deployments.
  • It provides a place for specifying configuration information that is required before the Configuration Service is available and does not have to be contained within startup scripts.
  • it works with the common practice of using System Properties, so if this practice currently works, there is no need to change it, but it could be changed in the future with no code impact.

The properties file used is the first one found by the ClassLoader that loaded the Bootstrap subsystem with the name CarbonDeploymentConfig.properties. Using the ClassLoader to locate the properties file allows for flexibility in deployment. The file location could be specified on the java classpath or it could be contained within an ear file.

The amount of information specified via Deployment Properties should be small. In most cases, the Configuration Service is a better place. The information stored as Deployment Properties should either be required before the Configuration Service has been started (e.g. where to locate the root of the Configuration Service) or for information that varies based on the deployment (e.g. environment and instance name used by the Deployment Service). In the case of the latter, the Deployment Service should probably used, but if not, the Configuration Service should still be used (see Attribute Value References) instead of direct references to the Bootstrap subsystem.

Carbon Deployment Properties

Below is the list of all the Deployment Properties used within Carbon.

Property Name Description Required (Y/N)
carbon.bootstrap.Loader Specifies the implementation of org.sape.carbon.core.bootstrap.Loader used to load Carbon. By default, the class used is org.sape.carbon.core.bootstrap.DefaultLoader. N
carbon.exception.Delegate Specifies the implementation of org.sape.carbon.core.exception.ExceptionDelegate used by the exception service. By default, the class used is org.sape.carbon.core.exception.DefaultExceptionDelegate. N
carbon.config.ServiceFactory Specifies the implementation of org.sape.carbon.core.config.ConfigurationServiceFactory used by Bootstrap to create the configuration service. By default, the class used is org.sape.carbon.core.config.DefaultConfigurationServiceFactory. N
carbon.config.CacheType Specifies the implementation of org.sape.carbon.core.config.cache.ConfigurationCache used by the Configuration Service. By default, the class used is org.sape.carbon.core.config.cache.SynchronizedConfigurationCache. Carbon contains one other implementation, org.sape.carbon.core.config.cache.DoubleCheckConfigurationCache, that relies on a double-check locking scheme to ensure thread safety. N
carbon.config.RootLink Specifes the path to the LinkNode configuration document. If this is not specified, the Bootstrap subsystem will use the ClassLoader to locate a resource named CarbonConfigRoot.link. If it cannot locate the resource, it uses a document that contains a Configuration of type FileLinkNode. The value specified by carbon.config.Path below is used as the LinkToPath (i.e. the path to the root directory of the configuration hierachy). N
carbon.config.Path The fully qualified path of the root directory of configuration. This is only used if carbon.config.RootLink is not specifed. Y
carbon.deployment.Environment Secifies the name of the environment for the Deployment Service. Y
carbon.deployment.Instance Secifies the name of the instance for the Deployment Service. Y

Copyright © 2001-2003, Sapient Corporation