How do I wait for a module to be ready
A common mistake is to not make the difference between
the status of the Common Agent Container and the status of modules deployed inside.
As any container, CAC may be in good shape while modules deployed aren't.
The command "cacaoadm status" gives you the status of the container but
to get the actual state and status of a module the command is cacaoadm status <module name>.
The container may be in three states:
# cacaoadm statusdefault instance is DISABLED at system startup.default instance is not running.
# cacaoadm status
default instance is DISABLED at system startup.
Smf monitoring process:
13400
Uptime: 0 day(s), 0:16
# cacaoadm status
default instance is DISABLED at system startup.
Daemon is running but not available. Try again as it might be starting."
The container may be still starting executing its own initilization phase but mainly busy to
start modules deployed inside. see here for details. The container is ready to serve as soon as
an uptime is printed.
All this as nothing to do with the satus of a modules deployed. The container will start a module but
the module can be actually not ready to serve :
If an application depends on a service(s) deployed in CAC (i.e a module(s)) . This application
must monitor the status of the module it is interested in and not the container itself.
This is done by "cacaoadm status <module name>".
Few examples of module'state/status :
# cacaoadm status com.sun.cacao.rbacOperational State:ENABLEDAdministrative State:UNLOCKEDAvailability Status:[]Module is in good health.
#cacaoadm status com.sun.cacao.efd
Module com.sun.cacao.efd has not been loaded.
Cause of the problem:[OFF_LINE]
#cacaoadm status com.sun.cacao.instrumOperational State:DISABLEDAdministrative State:UNLOCKEDAvailability Status:[OFF_LINE]
#cacaoadm status com.sun.scn.base.SCNBaseModule com.sun.scn.base.SCNBase has not been loaded.Cause of the problem:[FAILED]
#cacaoadm status com.sun.scn.SolarisAssetModuleModule com.sun.scn.SolarisAssetModule has not been loaded.Cause of the problem:[DEPENDENCY]
Another tips for a module developer is set correctly its dependencies. One of basics examples is connectors.
If a module offer a service using the RMI connector (if the client part of the applications access it
only using the RMI connector). If the developer knows that its entire logic will be down because if this,
the module descriptor file of the module should define a dependency on the RMI module.
Posted at 09:12AM avr. 21, 2008 by ejannett in Common Agent Container FAQ | Comments[0]
Today's Page Hits: 8