Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

DF14900 Software Engineering

TDDD05 Component-Based Software


Portable Object Adapter (POA) revisited
„ CORBA object = Object ID + servant instance + mapping

CCM: Client Server


The CORBA Component Model
POA – ”MyPOA” Servant
policies ...
Object ”Fred”
„„ Portable
Portable Object
Object Adapter
Adapter(POA)
(POA) revisited
revisited references Servant
”Anna”
„„ CORBA
CORBA Objects
Objects
„„ CORBA
CORBAComponent
Component Model
Model (CORBA
(CORBA3.0)3.0)
Szyperski: Component Software 2e, Chapter 13.3
Szyperski: Component Software 2e , Chapter 13.3
Christoph Kessler, IDA,
Active Object Map Image adapted from: F. Bolton:
Pure CORBA, Sams Publ., 2002.
Linköpings universitet, 2010. maps object IDs to servants
C. Kessler, IDA, Linköpings universitet. 2 DF14900 / TDDD05

Configuring a POA Configuring a POA, continued


POA policy type Allowed values RootPOA Child POA „ Remark: Not all theoretically possible combinations
policy default pol. make sense / are permitted.
ThreadPolicy ORB_CTRL_MODEL (multithr.)
SINGLE_THREAD_MODEL
LifeSpanPolicy TRANSIENT
PERSISTENT „ RootPOA: The default POA when the server comes up
IdAssignmentPol. SYSTEM_ID
USER_ID „ Customized child POA’s can be created with different policies
IDUniquenessPol. UNIQUE_ID
MULTIPLE_ID
RequestProcess- USE_ACTIVE_OBJECT_MAP_ONLY
USE_DEFAULT_SERVANT
ingPolicy
USE_SERVANT_MANAGER
ServantRetention- RETAIN
Policy NON_RETAIN
ImplicitActivation- NO_IMPLICIT_ACTIVATION
Policy IMPLICIT_ACTIVATION
3
C. Kessler, IDA, Linköpings universitet. DF14900 / TDDD05 C. Kessler, IDA, Linköpings universitet. 4 DF14900 / TDDD05

Life span of CORBA Objects Types of CORBA Objects (1)


Controlled by POA life span policy „ Session objects
„ Transient objects z usually short-lived, non-persistent
z Lifetime bounded by
Client Server
 lifetime of server process that created it
 and of its POA
POA –”SessionPOA” Servant
z Usually, short-lived
TRANSIENT, ...
„ Persistent objects 3. ”Fred”
Create IOR 1.
z Lifetime unbounded Create servant
z Its creating server can be stopped and restarted multiple times
z Dormant when its POA is destroyed;
reactivated when its server is restarted and POA is reinstantiated
z State stored in a database 2.
Image adapted from: F. Bolton:
Activate servant Pure CORBA, Sams Publ., 2002.
C. Kessler, IDA, Linköpings universitet. 5 DF14900 / TDDD05 C. Kessler, IDA, Linköpings universitet. 6 DF14900 / TDDD05
Types of CORBA Objects (2) Types of CORBA Objects (3)
„ Entity objects „ Factory Object
z usually long-lived, persistent z Create, find and destroy other objects
z Perform steps 1, 2, 3 (, 4) as above
Client Server for session / entity objects
Servant z Can itself be a session or entity object
POA – ”EntityPOA” state

PERSISTENT, ...
4. ”Fred” 2.
Create IOR Create servant

DB
1.
Create DB record

3.
Image adapted from: F. Bolton:
Activate servant Pure CORBA, Sams Publ., 2002.
C. Kessler, IDA, Linköpings universitet. 7 DF14900 / TDDD05 C. Kessler, IDA, Linköpings universitet. 8 DF14900 / TDDD05

CORBA Component Model (CCM) CORBA Component Model Architecture


„ Abstraction of CORBA object with its environment home: factory object to create, find,
remove component instances
„ Container
z Abstraction of POA functionality Home Home
 Life cycle management
z Provision of CORBA Services for enterprise applications component: basic
facet: provided manages building block for
external inter- manages
 security, transaction, event service faces to client
server application

 Simplified interfaces covering most commonly used features


„ Support for ready-made components Component Component Component
z Configuration and assembly
„ Separate component logic and CORBA functionality
Container
z e.g., hide house-keeping code (POA object creation, life cycle receptacle: registry for
component references –
management for CORBA objects etc.) ”uses” relation made explicit

„ EJB (2.0) look-and-feel callback interfaces for container: environment


container to notify com- that supports components Image adapted from: F. Bolton:
z Basic components: Fully EJB compatible ponent about events etc. Pure CORBA, Sams Publ., 2002.
C. Kessler, IDA, Linköpings universitet. 9 DF14900 / TDDD05 C. Kessler, IDA, Linköpings universitet. 10 DF14900 / TDDD05

CORBA Component Model CORBA Component Categories


„ Basic components: Fully EJB compatible and interoperable „ Session components (cf. EJB stateful session beans)
„ Extended components: beyond EJB, e.g. ports z transient state, transient identity
„ Ports: Special sorts of interfaces, grouped together „ Service components (cf. EJB stateless session beans)
z Facets z no state, no identity
z Receptacles „ Entity components (cf. EJB entity beans)
z Event sources z persistent state
z Event sinks z persistent identity, automatically visible to clients
„ Configuration interfaces with setters and getters „ Process components
z persistent state
„ Extended IDL (Component IDL, CIDL)
z persistent identity, not automatically visible to clients
z New elements: component, interface, home, finder, factory
...
C. Kessler, IDA, Linköpings universitet. 11 DF14900 / TDDD05 C. Kessler, IDA, Linköpings universitet. 12 DF14900 / TDDD05

You might also like