ACS Course Component Activation H Sommer ESO Garching

  • Slides: 8
Download presentation
ACS Course Component Activation H. Sommer ESO - Garching 23 June – 02 July,

ACS Course Component Activation H. Sommer ESO - Garching 23 June – 02 July, 2003

Component Initialization ALMA Project lifecycle method Container 1 activate(“C 1”) get(“C 2”) C 4

Component Initialization ALMA Project lifecycle method Container 1 activate(“C 1”) get(“C 2”) C 4 C 3 C 2 may request component references C 1 initialize() Container 2 activate(“C 2”) Manager 19. November 2002 2

Component Initialization ALMA Project • Lifecycle IF methods initialize() and execute() are the earliest

Component Initialization ALMA Project • Lifecycle IF methods initialize() and execute() are the earliest chances for a component to obtain references to other components • Circular activation attempt will result in deadlock or failure • Otherwise no known issues (since ACS 2. 1 with Jac. ORB) • Special component state during initialization: component reference can’t be retrieved, and thus no functional methods can be called before a component has returned from initialize() and execute() 19. November 2002 3

Component Initialization Reading the Log output ALMA Project Jul 1, 2003 10: 07: 50

Component Initialization Reading the Log output ALMA Project Jul 1, 2003 10: 07: 50 AM alma. acs. container. Acs. Container activate_COB INFO: <<<<<<<<<<<<<<<<<<<<< Jul 1, 2003 10: 07: 50 AM alma. acs. container. Acs. Container activate_COB INFO: activate_COB: handle=16777222 name=IDENTIFIER_ARCHIVE class=alma. archive. helpers. Identifier. Helper type=IDL: alma/xmlstore/Identifier: 1. 0 […other messages. . . ] Jul 1, 2003 10: 07: 51 AM alma. acs. container. Acs. Container activate_COB INFO: component IDENTIFIER_ARCHIVE activated and initialized. Jul 1, 2003 10: 07: 51 AM alma. acs. container. Acs. Container activate_COB INFO: >>>>>>>>>>>>>>>>>>>>> 19. November 2002 4

Component Initialization Reading the Log output (cont’d) ALMA Project If during component activation another

Component Initialization Reading the Log output (cont’d) ALMA Project If during component activation another component must be activated by the same Java container (e. g. because this is requested in initialize()), we’ll see nested <<<<<<<<<<<<<<<<<<<<< …comp 1 activation until initialize <<<<<<<<<<<<<<<<<<<<< …complete comp 2 activation >>>>>>>>>>>>>>>>>>>>> …comp 1 activation after initialize >>>>>>>>>>>>>>>>>>>>> lines in the log output which leverage quick orientation 19. November 2002 5

Example 1 ALMA Project 1) OBSPREP/Project. Repository alma. Project. Repository. IF. Lightweight. Project. Repository.

Example 1 ALMA Project 1) OBSPREP/Project. Repository alma. Project. Repository. IF. Lightweight. Project. Repository. Imp l. Lightweight. Project. Repository. Impl#initialize() 2 a) ARCHIVE/Archive alma. archive. components. Operational. Impl#initialize() 2 b) ARCHIVE/Archive alma. archive. components. Administrative. Impl#initialize() 3) ARCHIVE/Database alma. archive. database. xindice. Xindice. Database. Impl 19. November 2002 6

Example 2 ALMA Project 1) ACS/…/jcontexmpl alma. demo. Xml. Component. Impl#say. Hello() 1) ACS/…/jcontexmpl

Example 2 ALMA Project 1) ACS/…/jcontexmpl alma. demo. Xml. Component. Impl#say. Hello() 1) ACS/…/jcontexmpl alma. demo. Hello. Lamp. Impl#initialize() 3) acsexmpl LAMP COB 19. November 2002 7

After initialization ALMA Project Once a component has been activated, getting references to other

After initialization ALMA Project Once a component has been activated, getting references to other components is even less critical. From any functional method, a call to Container. Services#get. Component(other) will retrieve the reference from the manager. Even circular dependencies are no longer an issue. 19. November 2002 8