List of all members.
Public Member Functions |
boolean | equals (Object obj) |
int | hashCode () |
org.omg.CORBA.Object | getReference () |
int | getHandle () |
String | getName () |
String | getType () |
Protected Member Functions |
void | finalize () throws Throwable |
Package Functions |
| ComponentAdapter (String compName, String type, String code, int compHandle, String containerName, ComponentLifecycle component, AcsManagerProxy managerProxy, ClassLoader componentClassLoader, AcsLogger logger, AcsCorba acsCorba) throws AcsJContainerEx |
void | setComponentXmlTranslatorProxy (Object xmlTranslatorProxy) |
ContainerServicesImpl | getContainerServices () |
void | activateComponent (Servant servant) throws AcsJContainerEx |
void | initializeComponent () throws ComponentLifecycleException |
void | executeComponent () throws ComponentLifecycleException |
void | deactivateComponent () throws AcsJComponentDeactivationUncleanEx, AcsJComponentDeactivationFailedEx |
Runnable | getComponentAbortionist (final boolean killComponentPOA) |
ComponentInfo | getComponentInfo () |
ComponentStateManagerImpl | getComponentStateManager () |
void | setMethodsExcludedFromInvocationLogging (String[] excludedMethods) |
Detailed Description
Adapter between the container on the one side and a component with all its child objects on the other. For the component, ComponentAdapter
is the container, since it calls the ComponentLifecycle
methods. For the container, it represents the component with its meta data.
- Author:
- hsommer Nov 6, 2002 2:48:13 PM
Constructor & Destructor Documentation
alma.acs.container.ComponentAdapter.ComponentAdapter |
( |
String |
compName, |
|
|
String |
type, |
|
|
String |
code, |
|
|
int |
compHandle, |
|
|
String |
containerName, |
|
|
ComponentLifecycle |
component, |
|
|
AcsManagerProxy |
managerProxy, |
|
|
ClassLoader |
componentClassLoader, |
|
|
AcsLogger |
logger, |
|
|
AcsCorba |
acsCorba | |
|
) |
| | throws AcsJContainerEx [package] |
Member Function Documentation
void alma.acs.container.ComponentAdapter.activateComponent |
( |
Servant |
servant |
) |
throws AcsJContainerEx [package] |
void alma.acs.container.ComponentAdapter.deactivateComponent |
( |
|
) |
throws AcsJComponentDeactivationUncleanEx, AcsJComponentDeactivationFailedEx [package] |
Deactivates a component.
-
First the component's POA manager is put into inactive state, so that all incoming calls to this component are rejected. However, we wait for currently executing calls to finish, with a timeout as described below.
-
Rejection applies to requests already received and queued by the ORB (but that have not started executing), as well as to requests that clients will send in the future.
-
Note that entering into the inactive state may take forever if the component hangs in a functional call.
-
Therefore we use a timeout to proceed in such cases where POA manager deactivation does not happen in time. This bears the risk of undesirable behavior caused by calling the cleanUp method while other threads still perform functional calls on the component.
-
Second the component itself is deactivated:
-
The lifecycle method cleanUp is called, currently without enforcing a timeout.
-
TODO: use a timeout, unless we decide that a client-side timeout for releaseComponent is good enough.
-
Third the component is disconnected from CORBA ("etherealized" from the POA).
-
Note that also etherealization may take forever if the component hangs in a call.
-
Therefore we use a timeout to proceed with deactivation in such cases where etherealization does not happen in time.
-
Currently a component that failed to etherealize in time can stay active as long as the container is alive. TODO: check if using the "container sealant" we can identify and stop the active ORB threads.
This method logs errors as FINER if they also cause an exception, and as WARNING if they cannot lead to an exception because other more important error conditions are present.
- Exceptions:
-
| ComponentDeactivationUncleanEx,ComponentDeactivationFailedEx | |
References alma.acs.container.CleaningDaemonThreadFactory.cleanUp(), alma.acs.container.ContainerServicesImpl.cleanUp(), alma.acs.component.ComponentLifecycle.cleanUp(), alma.acs.container.corba.AcsCorba.deactivateComponentPOAManager(), alma.acs.container.corba.AcsCorba.destroyComponentPOA(), alma.acs.container.ComponentAdapter.getHandle(), alma.acs.logging.AcsLogger.log(), and alma.acs.container.ComponentStateManagerImpl.setStateByContainer().
Referenced by alma.acs.container.AcsContainer.activate_component().
boolean alma.acs.container.ComponentAdapter.equals |
( |
Object |
obj |
) |
|
void alma.acs.container.ComponentAdapter.finalize |
( |
|
) |
throws Throwable [protected] |
Runnable alma.acs.container.ComponentAdapter.getComponentAbortionist |
( |
final boolean |
killComponentPOA |
) |
[package] |
ComponentInfo alma.acs.container.ComponentAdapter.getComponentInfo |
( |
|
) |
[package] |
To be called by the container to change the component state. In some cases, the state will be changed by this ComponentAdapter though.
- Returns:
- the
ComponentStateManager
that gives acces to the state.
int alma.acs.container.ComponentAdapter.getHandle |
( |
|
) |
|
String alma.acs.container.ComponentAdapter.getName |
( |
|
) |
|
org.omg.CORBA.Object alma.acs.container.ComponentAdapter.getReference |
( |
|
) |
|
Returns the reference.
- Returns:
- org.omg.CORBA.Object
String alma.acs.container.ComponentAdapter.getType |
( |
|
) |
|
int alma.acs.container.ComponentAdapter.hashCode |
( |
|
) |
|
- See also:
- java.lang.Object.hashCode()
void alma.acs.container.ComponentAdapter.setComponentXmlTranslatorProxy |
( |
Object |
xmlTranslatorProxy |
) |
[package] |
void alma.acs.container.ComponentAdapter.setMethodsExcludedFromInvocationLogging |
( |
String[] |
excludedMethods |
) |
[package] |
The documentation for this class was generated from the following file: