init-param (cache)

init-param

Used in: init-params.

Defines an individual initialization parameter.

Elements

The following table describes the elements you can define within the init-param element.

Element Required/Optional Description
<param-name> Optional Contains the name of the initialization parameter.

For example:

<class-name>com.mycompany.cache.CustomCacheLoader</class-name>
<init-params>
  <init-param>
    <param-name>sTableName</param-name>
    <param-value>EmployeeTable</param-value>
  </init-param>
  <init-param>
    <param-name>iMaxSize</param-name>
    <param-value>2000</param-value>
  </init-param>
</init-params>
<param-type> Optional Contains the Java type of the initialization parameter.

The following standard types are supported:

  • java.lang.String (a.k.a. string)
  • java.lang.Boolean (a.k.a. boolean)
  • java.lang.Integer (a.k.a. int)
  • java.lang.Long (a.k.a. long)
  • java.lang.Double (a.k.a. double)
  • java.math.BigDecimal
  • java.io.File
  • java.sql.Date
  • java.sql.Time
  • java.sql.Timestamp

For example:

<class-name>com.mycompany.cache.CustomCacheLoader</class-name>
<init-params>
  <init-param>
    <param-type>java.lang.String</param-type>
    <param-value>EmployeeTable</param-value>
  </init-param>
  <init-param>
    <param-type>int</param-type>
    <param-value>2000</param-value>
  </init-param>
</init-params>

Please refer to the list of available Parameter Macros.

<param-value> Optional Contains the value of the initialization parameter.

The value is in the format specific to the Java type of the parameter.

Please refer to the list of available Parameter Macros.