public class LoggerHelper extends ComponentHelper
To create an entry for your component in the Configuration Database, copy the line below into a new entry in the file $ACS_CDB/MACI/Components/Components.xml and modify the instance name of the component and the container:
Name="LOGGER_1" Code="alma.xmlstore.LoggerImpl.LoggerHelper" Type="IDL:alma/xmlstore/Logger:1.0" Container="frodoContainer"
componentInstanceName| Constructor and Description |
|---|
LoggerHelper(java.util.logging.Logger containerLogger)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected ComponentLifecycle |
_createComponentImpl()
Method _createComponentImpl to be provided by subclasses.
|
protected java.lang.String[] |
_getComponentMethodsExcludedFromInvocationLogging()
Tells the container to not automatically log calls to certain component interface methods.
|
protected java.lang.Class |
_getOperationsInterface()
Gets the xxOperations interface as generated by the IDL compiler.
|
protected java.lang.Class |
_getPOATieClass()
This method must be provided by the component helper class.
|
protected boolean |
requiresOrbCentralLogSuppression()
Do not overwrite this method unless you absolutely need to
(currently only for the archive logger component!)
|
_getInterfaceTranslator, getComponentImpl, getComponentLogger, getInternalInterface, getOperationsInterfacepublic LoggerHelper(java.util.logging.Logger containerLogger)
containerLogger - logger used only by the parent class.protected java.lang.String[] _getComponentMethodsExcludedFromInvocationLogging()
ComponentHelperACSComponentOperations#componentState().
Dealing with OffShoots: offshoots that follow the Corba Tie-approach enjoy automatic method invocation logging
just like components do. In the rare event that you explicitly activate offshoots from your component,
and want to suppress automatic logging for certain methods, return String(s) in the
following format: OFFSHOOT::<offshootinterfacename>#<methodname>.
Example for ALMA archive: "OFFSHOOT::Operational#retrieveFragment".
Note that returning Strings is fine (compared with more sophisticated Method objects)
because the functional component interface methods cannot have parameter polymorphism thanks to IDL limitations.
Thus there is no ambiguity in the method names.
_getComponentMethodsExcludedFromInvocationLogging in class ComponentHelperprotected boolean requiresOrbCentralLogSuppression()
ComponentHelper
If true then the ORB logger will not send any log messages to the central (remote) Log service
after activation of this component, regardless of any kind (env var, CDB, dynamic) log level settings.
Local stdout logging by the ORB is not affected.
Currently the ORB log suppression is not reversible: even when the component which requested this
is unloaded, the ORB logger will not resume sending remote log messages.
This may change in the future though.
Note that getComponentMethodsExcludedFromInvocationLogging can switch off automatic logging
done by the container on behalf of the component. However, the ORB does not use a logger-per-component
concept, and thus can't be told selectively to not log anything for a particualar component.
The entire process (container and all components) are affected by suppressing the ORB's remote logging.
This method addresses the special problem of an infrastructural component that receives log messages from the Log service and writes them to the archive. Any message logged by the ORB on the receiver side would go back to the Log service and be received by the infrastructural component, with positive feedback leading to an explosion of log messages. Therefore we can't rely on log level settings and must categorically rule out such feedback loops.
requiresOrbCentralLogSuppression in class ComponentHelperprotected ComponentLifecycle _createComponentImpl()
ComponentHelper_createComponentImpl in class ComponentHelperComponentHelper._createComponentImpl()protected java.lang.Class _getPOATieClass()
ComponentHelperreturn DummyComponentPOATie.class;._getPOATieClass in class ComponentHelperComponentHelper._getPOATieClass()protected java.lang.Class _getOperationsInterface()
ComponentHelper_getOperationsInterface in class ComponentHelperClass object associated with the operations interface.ComponentHelper.getOperationsInterface()