
...
<tns:registry-implementation>org.ow2.petals.microkernel.registry.overlay.RegistryOverlayImpl</tns:registry-implementation>
...
</tns:domain>
{code}
The tag '{{registry-implementation}}' can be omitted and in that case the default implementation is the Petals Registry Overlay.
h3. Configuring the implementation itself
The implementation itself must be configured using an extension of the domain tag. See the [documentation of the registry implementation|Petals ESB "Registry"#Implementations] for more information.
Example:
{code}
<tns:domain name="domain-0" mode="static" xmlns:tns="http://petals.ow2.org/topology">
...
<tns:registry-implementation>org.ow2.petals.microkernel.registry.overlay.RegistryOverlayImpl</tns:registry-implementation>
...
<registry:configuration xmlns:registry="http://petals.ow2.org/petals-registry-overlay-client/configuration">
<registry:group-name>default-sample</registry:group-name>
<registry:group-password>s3cr3t</registry:group-password>
<registry:overlay-members>
<registry:overlay-member port="7901">localhost</registry:overlay-member>
</registry:overlay-members>
</registry:configuration>
</tns:domain>
{code}
h1. Declaring containers configurations
As we have seen, the {{topology.xml}} resource is used to declare the configuration of a Petals ESB cluster.
h2. Generic container configuration
Each Petals ESB container declared within must conforms to the following XML structure:
{code:lang=xml}
<tns:container name="0">
<tns:description>description of the container 0</tns:description>
<tns:host>localhost</tns:host>
<tns:user>petals</tns:user>
<tns:password>petals</tns:password>
<tns:webservice-service>
<tns:port>7600</tns:port>
<tns:prefix>petals/ws</tns:prefix>
</tns:webservice-service>
<tns:jmx-service>
<tns:rmi-port>7700</tns:rmi-port>
</tns:jmx-service>
<tns:transport-service>
<tns:tcp-port>7800</tns:tcp-port>
</tns:transport-service>
</tns:container>
{code}
The meaning of these properties is summarized in the following table :
{center}
|| Property name || Default value || Required || Description ||
| {{name}} | 0 | yes | name of the container |
| {{description}} | description of the container 0 | no | description of the container |
| {{host}} | localhost | yes | host name or ip address of the container |
| {{user}} | petals | no | jmx username |
| {{password}} | petals | no | jmx password |
|| {{webservice-service}} || || || ||
| {{port}} | 7600 | yes | administration webservices port (topology, information, ...) |
| {{prefix}} | petals/ws | yes | path of the webservice |
|| {{jmx-service}} || || || ||
| {{rmi-port}} | 7700 | yes | jmx service port |
|| {{transport-service}} || || || ||
| {{tcp-port}} | 7800 | yes |NIO transporter port |
{center}
h1. Configuring the local container
As we have seen, the {{topology.xml}} file contains the declaration of many Petals ESB containers: to determine which configuration must be used by the local container at startup, you must specify one of the container name to the property {{petals.container.name}} declared in the {{server.properties}}.
{noformat}
#This property specifies the name of the container. In distributed mode, this property is mandatory
#and must match a container name in the topology.xml file
petals.container.name=0
{noformat}
The container name given to the {{petals.container.name}} property must be declared within the {{topology.xml}} file, otherwise, Petals ESB won't be able to start. This mean that you must have declared the local container configuration within the {{topology.xml}} file.
h1. Appendix
h2. Topology XML Schema
For more information on the structure of the topology.xml file, you can consult its XML schema definition here : [^petalsTopology.xsd].