
Overview
========

see com.sun.mfwk.discovery Javadoc

Example Description
===================



This directory contains an end to end discovery example
which goal is to help you integrate the discovery mechanism:
 - in your component product: 
       TestDiscoveryResponder.java
 - in the module part of your CP that runs in the Agent: 
       discoveryExample_Module.java 
       discoveryExample_module.xml

*************
***WARNING***
*************

This example presents the bare minimum for the discovery 
to work but is ***NOT*** a complete mfwk example.
The module that will is created will not appear in
the mfwkadm module list CLI for instance.
To have a complete example (discovery + CIB part), skip to 
the complete MSGCP and STORECP examples. These integrate
the discovery mechanism in a real life example.


How to use it
=============

1. On the Component product
---------------------------


* compile the TestDiscoveryResponder with j2se 1.5 and specify the SDK jar files in your classpath.
* start the TestDiscoveryResponder
      java -classpath <classpath> com.sun.mfwk.examples.discovery.TestDiscoveryResponder

2. On the agent
---------------

* make sure you have cacao and the agent up and running before going further 
* compile the discoveryExample_Module.java with j2se 1.5 and specify the SDK & Agent jar files in your classpath.
* put the example in a jar
* copy the jar in the <cacao_modules> directory (/opt/SUNWcacao/lib at the moment)
* make sure the associated cacao module has the right info 
* copy the associated cacao module descriptor in <cacao_descriptor> directory (/etc/opt/SUNWcacao/modulesat the moment) 
* stop/restart cacao 
* if not done already start the TestDiscoveryResponder
* the agent logs should contain the info provided by TestDiscoveryResponder.

NB1. the info should be in the agent logs regardless of the order in which the agent and the CP have been started.
NB2. if cacao is already started you can manually force the loading of the cacao module. Check cacao documentation for more


Known problems/limitations
==========================

- Multicast is not configured by default on linux
  on the loopback interface.

- All the discovery information is passed through a udp
  packet => there is a limit to the info that can
  be passed:

           header_length + payload_length  < 65536 bytes

  An exception is thrown in case the info overrides this value.


Addiditional documentation
========================

DiscoveryResponder javadoc.
DiscoveryInfo javadoc.



