Public Member Functions | |
AcsCorba (Logger logger) | |
void | setPortOptions (Integer orbPort, Integer orbPortSearchRetry) |
synchronized void | setLogger (Logger logger) |
synchronized void | initCorba (String[] args, int port) throws AcsJContainerEx |
synchronized boolean | isInitialized () |
synchronized POA | initCorbaForClient (boolean isAdmin) throws Exception |
void | runCorba () throws AcsJContainerEx |
void | blockOnORB () |
void | shutdownORB (final boolean wait_for_completion, boolean isOrbThread) |
void | doneCorba () |
ORB | getORB () |
POA | getRootPOA () |
org.omg.CORBA.Object | activateContainer (AcsContainer container, String name) throws AcsJContainerEx |
POA | createPOAForComponent (String compName) throws AcsJContainerEx |
ComponentServantManager | setServantManagerOnComponentPOA (POA componentPOA) throws AcsJContainerEx |
POA | getPOAForOffshoots (POA componentPOA) throws AcsJContainerEx, AcsJUnexpectedExceptionEx |
org.omg.CORBA.Object | activateComponent (Servant servant, String name, POA compPOA) throws AcsJContainerEx |
boolean | deactivateComponentPOAManager (POA compPOA, final String compName, int timeoutMillis) |
boolean | destroyComponentPOA (POA compPOA, ComponentServantManager compServantManager, int timeoutMillis) |
org.omg.CORBA.Object | activateOffShoot (Servant servant, POA compPOA) throws AcsJContainerEx, AcsJUnexpectedExceptionEx |
void | deactivateOffShoot (Servant servant, POA compPOA) throws AcsJContainerEx |
void | setORBLevelRoundtripTimeout (double timeoutSeconds) throws AcsJContainerServicesEx |
org.omg.CORBA.Object | wrapForRoundtripTimeout (org.omg.CORBA.Object corbaRef, double timeoutSeconds) throws AcsJContainerServicesEx |
void | prepareOrb (String[] args) |
Static Public Attributes | |
final String | SYSPROP_FIRESTARTER_OAPORT = "acs.firestarter.oaport" |
Protected Member Functions | |
void | initRootPoa (ORB orb) |
RVtrialAndError | trialAndError (String[] args, int first, int retries) |
Protected Attributes | |
int | DEFAULT_PORT = 3075 |
int | DEFAULT_RETRY = 5 |
Private Member Functions | |
synchronized void | setInitialized (boolean initialized) |
void | initPOAForContainer () throws AcsJContainerEx |
void | initPOAForComponents () throws AcsJContainerEx |
void | setORB (ORB orb) throws IllegalArgumentException |
ORB | createOrb (String[] args, Integer port) |
Private Attributes | |
org.omg.CORBA.ORB | m_orb |
POAManager | sharedPoaManager |
POA | m_rootPOA |
POA | m_containerPOA |
POA | m_componentPOA |
Policy[] | m_compPolicies |
Policy[] | m_offshootPolicies |
Logger | m_logger |
boolean | m_isInitialized = false |
Integer | orbPort |
Integer | orbPortSearchRetry |
boolean | isOrbChoosingPort = false |
alma.acs.container
or alma.acs.component.client
package.
An instance of AcsCorba
encapsulates an ORB instance, together with the POAs.
POA structure:
OffShoot
objects for a given component. See getPOAForOffshoots(POA). This class must not be used directly by ACS applications such as components or component clients. If you feel that you need to access ORB functionality, please request to have it provided in alma.acs.container.ContainerServices or alma.acs.container.AdvancedContainerServices.
created on Nov 4, 2002 2:56:44 PM
|
ctor |
|
Activates a component using a given component POA.
|
|
Activates the container using the respective POA, so that the container becomes a CORBA object.
|
|
Activates an offshoot object (which is a regular CORBA object owned by a component). All offshoot objects for a component are activated using a non-persistent "offshootPOA".
|
|
Calls ORB#run() which from the point of view of the caller blocks the thread until the ORB has shut down, optionally performing tasks for the ORB in the meantime (see Corba spec 2.4 , chap. 4.2.3.3) |
|
Creates an ORB with a port determined by the values given in setPortOptions(Integer, Integer). Aside from the logger, no instance variables are used in this method.
|
|
Creates a new POA that is responsible for exactly one component. Dependent CORBA objects (offshoots) are activated through a child POA. The new POA is created as a child of the shared ComponentPOA. The new component POA uses its own POA manager, which allows discarding requests for this component (w/o discarding requests for other components, the container, or even this component's offshoots).
|
|
Deactivates a component's POA manager. The effect is that no further calls will reach the component. This method returns immediately if the POA manager is already inactive. Otherwise it will only return when the active requests are done.
Note for JacORB (1.4 as well as 2.2.4): there seems to be a problem in
The purpose of this method is to allow the container to "drain" a component of requests, so that
Note that POAManager#deactivate(boolean, boolean) is called in a separate thread, so that this method itself may well be called from an ORB thread. This method uses
|
|
|
|
Destroys the component POA (and its child the offshoot POA if it exists), waiting at most
|
|
Calls The Corba spec v. 2.4 says in section 4.2.3:
With ACS 8.0, this method no longer attempts to destroy policy objects, trusting that either an explicit call to AcsCorba#shutdownORB(boolean, boolean)} or the abovementioned implicit call to ORB#shutdown(boolean)} takes care of this. See also problems reported in COMP-2632. |
|
Returns the ORB instance.
|
|
Creates (or reuses) the non-persistent POA for offshoot objects as a child of the given POA. In spite of the suggestive name 'componentPOA', this POA can actually be any kind of POA, so that also client application can use the offshoot mechanism. This method is synchronized inside to avoid race conditions between several offshoot POA creation/retrievals, where otherwise the POA would fail to be created even though first it was not found for reuse.
|
|
|
|
Initializes the ORB and POAs to be used by a Java container. Calls setPortOptions to ensure that for container ORBs the specified port gets used. Thus any previous settings of port finding options will be overwritten.
|
|
Initializes CORBA for the limited needs of a component client application.
If this class is used for client applications (outside a container), not all methods will be available (currently resulting in NPEs). Mainly
|
|
Creates
|
|
|
|
Initializes the root poa on the ORB provided as an argument. Also obtains the POA manager, but does not yet initialize it. See runCorba().
Note that this method does not work on
|
|
|
|
Gets an ORB and initializes the root POA using initRootPoa(ORB). If this method has been called before, the same ORB will be returned. Depending on the values given in setPortOptions(Integer, Integer), a fixed port will be used (resulting in a failure if it can't be obtained), or the port will be chosen from a given range, or the ORB will be allowed to pick a port. This class is fail-fast in that it tries to create an orb instantly on a call to this method. If this first call goes well, subsequent calls will succeed (aside from other general errors).
|
|
Runs the ORB and POAs. Currently it calls
|
|
|
|
|
|
|
|
Sets the roundtrip timeout for all calls going out through the ORB that is encapsulated by this class. For example, this applies to all corba calls made by a container and any of its components.
|
|
Usage of parameters orbPort | orbPortSearchRetry (a) 1234 | null : try port 1234-1238 (b) 1234 | 3 : try port 1234-1236 (c) 1234 | 0 : use port 1234 (d) 1234 | -1 : use port 1234
(e) null | null : try port 3075-3079 (f) null | 3 : try port 3075-3077 (g) null | 0 : use port 3075 (h) null | -1 : let orb choose portNotes:
|
|
Creates a servant manager of type
This
Note that org.omg.PortableServer.POAOperations#get_servant_manager() will not return the
|
|
Calls
If this method is invoked from an ORB thread (as it happens in the Java container in case of shutdown being commanded by the manager), it returns immediately, independently of the
: As a workaround for a JacORB bug (http://www.jacorb.org/cgi-bin/bugzilla/show_bug.cgi?id=537), we currently skim off the
|
|
trial-and-error: try out some ports, break on success |
|
Impl note: The corba spec (v 2.4, 4.3.8.1) describes the difference between SetOverrideType.SET_OVERRIDE and SetOverrideType.ADD_OVERRIDE. It is not clear to me (HSO) which one should be used, or if there is no practical difference.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|