SDM Snippets

Snippets are created by the plugin during packaging. They are part of the ZIP file and are used by the packaging for SDM projects. These files are generated during every build and should never be modified manually.

Snippet types:

  • instances snippet
  • queues snippet
  • rules snippet
  • variables snippet

Instances Snippet

This snippet contains a list of all service and process instances of the packaged project. During SDM packaging the instance snippets are used to define which service instances are available for deployment to the ESB containers. The container mapping pattern is applied to the hint attribute value of the ServiceInstance tag. This means you have to prefix a Servicename with (.*) or specify the groupID and artifactID as well.

The format of this snippet is ESB plugin specific.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<ServiceInstances>
  <ServiceInstance hint="com.my-maven-groupid.artifactID.ServiceInstanceName" name="ServiceInstanceName"/>
  <ServiceInstance hint="com.my-maven-groupid.artifactID.ServiceInstanceName2" name="ServiceInstanceName2"/>  
</ServiceInstances>

Queues Snippet

This snippet contains the Queues which are referenced by the ESB endoints of the packaged project. Queue entries are added to the SDM Model during packaging.

The format of this snippet is the SDM queues model format.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<Queues>
  <Queue>
    <Id>ServiceInstanceName.entry</Id>
  </Queue>
  <Queue>
    <Id>ServiceInstanceName2.entry</Id>
  </Queue>
</Queues>

Rules Snippet

Contains information about the service types init parameters. It only contains entries if the packaged project is an ESB service type project. This information is used to generate the TailoringMaps (xars/tailor) during service instance packaging. Rules snippets of all service types which are referenced by a service instance are taken into account to generate the TailoringMaps/ServiceMaps/ServiceMap entries for a given project.

The format of this snippet is the ESB tailor rule format.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<ServiceRules>
  <ServiceRule type="MyServiceType">
    <Param name="initparam1"/>
    <Param name="anotherInitParam"/>
    <Param name="OneMore"/>
  </ServiceRule>
</ServiceRules>

Variables Snippet

For service instances the parameters which can be tailored are added to this snippet. Via the dependency to the service type the plugin knows which parameters are available for tailoring. During SDM packaging the plugin will generate a target/sdm/generated.tailoring.properties file, which contains the variables and extracted values of all projects variable snippets. This file can be used as a template for environment specific tailoring.properties files.

Variables, which are not part of a provided tailoring properties file, will generate warnings in the Maven console output.

The format of this snippet is ESB plugin specific.

Example:

<?xml version="1.0" encoding="UTF-8"?>
<Variables>
  <Variable name="@ServiceInstanceName.initparam1@">current value which was exported</Variable>
  <Variable name="@ServiceInstanceName.anotherInitParam@">another value</Variable>
  <Variable name="@ServiceInstanceName.OneMore@">123</Variable>
</Variables>