Entry Descriptor

Attributes

Attribute Required Description
key yes The key that the component implementation will use when retrieving a value from the supplied context using the context.get( key ) operation.
type no The classname of the context entry. The default value is java.lang.String.
optional no The optional status of the entry. If optional is TRUE, a container is not required to supply the entry. The default value is FALSE.
alias no An alternative name that a component may use to locate an entry. This is convinient when dealing with legacy applications.
volatile no A 'true' or 'false' value that determines if a entry value may be cached by a container or if the value must be recomputed on each access. The default value is 'false' resulting in cached behaviour. Volotile entries are useful for contitions such as incremental key generation, time value lookup, etc.

Description

The entry element declares the criteria for the inclusion of a context entry within a context object. The entry exposes a context key and the type that the context entry may be safely cast to.

Example XML

<context>
  <entry key="home" type="java.io.File"/>
  <entry key="test" type="MySpecialClass" optional="TRUE"/>
  <entry key="timestamp" type="java.util.Data" volatile="TRUE"/>
</context>