ccm
#contents
CCM (CORBA Component Model)
CCM provides a server-side component model for CORBA, as well as a framework for building an EJB-like component environment on a CORBA environment.
Components
There are various definitions of a component, but it is generally said to be a “reusable unit of software.” According to a definition by M. Collins-Cope and others, something that satisfies the following four requirements is called a component, and this definition appears to be widely used.
| Self-contained / self-describing | It exists as an independent functional unit, and its interface is defined declaratively. In addition, standard methods are defined for its operation and manipulation, and the mechanisms for them are clearly defined. |
| Dynamic function addition and modification are possible | Properties, events, and other settings can be configured and changed from outside the component. A standard method for doing so is also provided. |
| Interface transparency | Based on the interface definition, a method for cooperation at the binary level is provided. |
| Support for loose coupling with other components | It does not have a direct communication path with other components, and is connected through a framework such as a container or assembly environment. |
“New Distributed Environments Opened by CORBA Components,” Junichi Suzuki, Doctor Dobb’s Journal Japanese Edition, April 1999 issue, pp.150-158.
Component Model
| Facet | Indicates that the component's interface is exposed externally. Clients can obtain the exposed interface through introspection and call the methods provided by the interface. |
| Receptacle | Indicates that interfaces provided by other components can be connected. Receptacle types include Simplex Receptacle, to which one interface can be connected, and Multiplex Receptacle, to which multiple interfaces can be connected to the same Receptacle. |
| Event Source | Indicates that a specific event is issued. Event notification types include Publisher, which can notify one-to-many, and Emitter, which can notify only one at a time. |
| Event Sink | Indicates that a specific event is received. |
| Attribute | Indicates an attribute possessed by the component. It has the same meaning as an attribute of a normal CORBA object. |
Keywords Added for CIDL
- component
- consumes
- emits
- eventtype
- finder
- getraises
- home
- import
- multiple
- primarykey
- provides
- publishes
- setraises
- typeid
- typeprefix
- uses
XML Files for Deployment and Configuration
| Descriptor | Extension |
|---|---|
| Component Package Descriptor: | .cpd |
| Component Implementation Descriptor: | .cid |
| Implementation Artifact Descriptor: | .iad |
| Component Interface Descriptor (CORBA Component Descriptor): | .ccd |
| Component Domain Descriptor | .cdd |
| Deployment Plan Descriptor (Component Deployment Plan): | .cdp |
| Top Level Package Descriptor | package.pcd |
| ZIP file containing all of above + binaries | .cpk |
Component Declaration
CCM components are declared according to the following syntax using the component declarator based on extended IDL.
component <component_name> [ : <base_name> ]
[ supports <interface_name> [, <interface_name>] * ]
{
<attribute declaration> *;
<port declaration> *;
};
The <component_name> following component describes the name of the component to be declared. As an optional declaration, a component can inherit from one component ( <base_name> ). Also, by using the support declarator, it can have several interfaces ( <interface_name> ) defined in IDL at the same time, and these are called supported interfaces. In the body of the component, component attributes ( <attribute declaration> ) and Ports ( <port declaration> ) can be declared.
This declaration is equivalent to declaring it as an equivalent interface equivalent to IDL2 as follows.
interface <component_name>
: Components::CCMObject, [<base_name>, <interface_name>, <interface_name>] * ]
{
};
Therefore, <base_name> is distinguished as a component name and <interface_name> as an interface name, but in the equivalent interface, all of these become interfaces and are reduced to inheritance from these interfaces.
For example, a HelloWorld component with a Hello interface can be declared as follows.