2 Documentation Errata

This chapter describes changes, enhancements, and corrections made to the Oracle Coherence documentation for 12c (12.1.3).

The Coherence documentation for 12c (12.1.3) can be found at the following URL:

http://docs.oracle.com/middleware/1213/coherence/index.html

This chapter contains the following sections:

2.1 Replacement for the Deprecated XmlConfigurable Interface

The com.tangosol.run.xml.XmlConfigurable interface has been deprecated in the Coherence 12c (12.1.3) release. Coherence used this interface to inject XML parameters into instances of custom classes.

Note:

For information on the interfaces, classes, and methods affected by the deprecation of the XmlConfigurable interface, see Section 1.12.1, "XmlConfigurable Interface.".

In the Coherence 12c (12.1.3) release, you can initialize parameters by writing XML which nests <instance> and <class-scheme> (or any other custom namespace) inside of <param-value> elements.

For example, given the following Java code:

public class MyClass
  {
  public MyClass(String s, OtherClass o, int i) { ... }
  }
 
public class OtherClass
  {
  public OtherClass(String s) { ... }
  }
 

You can initialize the MyClass and OtherClass classes by writing the following XML. In the XML, the MyClass class is initialized with the string Hello World and the integer 42. The instance of the OtherClass class which appears in the MyClass class, is initialized with the string Goodbye World.

<instance>
  <class-name>MyClass</class-name>
    <init-params>
      <init-param>
        <param-value>Hello World</param-value>
      </init-param>
      <init-param>
        <param-value>
          <instance>
            <class-name>OtherClass</class-name>
              <init-params>
                <init-param>
                  <param-value>Goodbye World</param-value>
                </init-param>
              </init-params>
          </instance>
        </param-value>
      </init-param>
      <init-param>
        <param-value>42</param-value>
      </init-param>
    </init-params>
  </instance>