If you use deployment descriptors to declare OID assignments, use a build script to substitute the OID assignment variables with relevant imported properties.

To do the substitution. use the Ant copy task in the build script.

The following code example is from an extension deployment descriptor. In this example, the build script is to substitute the variables ${oid.products.resource-adaptors.http.parameter-set-types.ClientStats} and ${oid.products.resource-adaptors.http.parameter-set-types.ServerStats}.

<stats-parameter-sets>
    <stats-parameter-set-type name="HTTP.ClientStats" interface="com.opencloud.slee.resources.http.transport.stats.ClientStats" description="HTTP RA client statistics"/>
    <stats-parameter-set-type name="HTTP.ServerStats" interface="com.opencloud.slee.resources.http.transport.stats.ServerStats" description="HTTP RA server statistics"/>
    <root-parameter-set-name>HTTP</root-parameter-set-name>
</stats-parameter-sets>

<stats-presentation alias="HTTPRA" base-oid="${oid.products.resource-adaptors.http}">
    <usage-parameters-interface-type-oid-mapping usage-parameters-interface-type-name="HTTP.ClientStats" oid-suffix="${oid.products.resource-adaptors.http.parameter-set-types.ClientStats}" singleton="True"/>
    <usage-parameters-interface-type-oid-mapping usage-parameters-interface-type-name="HTTP.ServerStats" oid-suffix="${oid.products.resource-adaptors.http.parameter-set-types.ServerStats}" singleton="True"/>
</stats-presentation>

The following snippet from the build script build.xml shows how to use the Ant copy task to do the substitution.

<property file="${self.oid-mappings.properties}"/>

<mkdir dir="${classes}/diameter-ro-replication-test-service"/>
<copy todir="${classes}/diameter-ro-replication-test-service/META-INF">
    <fileset dir="${src}/com/opencloud/slee/diameter/test/replication/ro/META-INF" includes="*.xml"/>
    <filterchain>
        <expandproperties/>
    </filterchain>
</copy>

Use this script before building the jar file. The resultant deployment descriptor must be in the file path for the component’s jar build task.

Previous page Next page