Getting started with OpenCCM

Download Report

Transcript Getting started with OpenCCM

Getting started with OpenCCM
Tutorial
An OpenCCM application :
The demo3 “Client / Server-Producer / Consumer”
Areski Flissi (IR CNRS / LIFL)
[email protected]
Getting started with OpenCCM
1
Tutorial Objectives

An OpenCCM application


How to design, build, implement, compile, deploy and
execute an application according to the OMG CORBA
Component Model with the OpenCCM platform
Illustrated with a concrete example : demo3


A simple Client / Server-Producer / Consumer
application
Build with OpenCCM 0.4 and ORBacus 4.1 and Java
programming language
Getting started with OpenCCM
2
Agenda
1. OMG IDL3 : design the application by defining
components and assembling component instances
2. OpenCCM compilation and generation chain for
the demo3 example
3. OpenCCM execution chain for the demo3
example
4. Package, assembly and deploy the CCM
application with XML descriptors (edited using
simple GUI)
Getting started with OpenCCM
3
Building a CCM application with OpenCCM is
very easy...
Java implementation
patterns
demo3.idl3
User written files
Compiler
Generated files
IDL3
ir3_feed
ir3_jimpl
User’s Java
implementation file
IR3
demo3.jar
Compile and
Build archive
ir3_idl2
OMG
IDL 2.x
demo3.idl
jidl
Java Corba 2
stubs
Packaging, Assembling and
Deployment done by XML
descriptors
ir3_java
Java OpenCCM
Skeletons
GUI
Getting started with OpenCCM
XML
descriptors
4
Agenda
1. OMG IDL3 : design the application by defining
components and assembling component instances
2. OpenCCM compilation and generation chain for
the demo3 example
3. OpenCCM execution chain for the demo3
example
4. Package, assembly and deploy the CCM
application with XML descriptors (edited using
simple GUI)
Getting started with OpenCCM
5
1. OMG IDL3 : design the application by defining
components and assembling component instances

OMG IDL3 : defining demo3 module




Interfaces
Eventtypes
Components and interconnections between
components (facets, receptacles, event
sources, event sinks)
Component homes for instantiating and
managing components
Getting started with OpenCCM
6
The Client/Server-Producer/Consumer Example


Client components synchronously invoke a Server
component which asynchronously publishes
Events to the set of connected Consumer
components.
Components are created by simple component
homes or managers with primary keys
Getting started with OpenCCM
7
Building the application :

Assembling CORBA Component instances
Component
Base ref.
Facet
Receptacle
Event Sink
Event Source
Client
Component
Server
Component
Getting started with OpenCCM
Consumer
Component
8
OMG IDL 3.0 for demo3 example
// Importation of the Components module
// when access to OMG IDL definitions contained
// into the CCM's Components module is required.
import Components;
module demo3
{
// Sets the prefix of all these OMG IDL definitions.
// Prefix generated Java mapping classes.
typeprefix demo3 "ccm.objectweb.org";
. . .
};
Getting started with OpenCCM
9
Defining a base component type
// A base type for named component.
component NamedComponent
{
/** The identifier name property. */
attribute string name;
};
// The primary key to identify components
valuetype NamePrimaryKey :
::Components::PrimaryKeyBase
{
/** Just a string name. */
public /*string*/ long name;
};
Getting started with OpenCCM
10
The Service Interface and Event valuetype
interface Service
{
void display(in string text);
};
// The Event valuetype published by the Server
// component and consumed by its Consumer components
eventtype TextEvent
{
/** Just contains a string. */
public string text;
};
Getting started with OpenCCM
11
The Server Component
Server
Component
// The Server component type
component Server : NamedComponent
{
// Provides a Service to its Client components
provides Service the_service;
// Publishes Events to its Consumer components
publishes TextEvent to_consumers;
};
// Simple home for instantiating Server component
home ServerHome manages Server {};
Getting started with OpenCCM
12
The Server Component
ServerHome
Server
Component
// The Server component type
component Server : NamedComponent
{
// Provides a Service to its Client components
provides Service the_service;
// Publishes Events to its Consumer components
publishes TextEvent to_consumers;
};
// Simple home for instantiating Server component
home ServerHome manages Server {};
Getting started with OpenCCM
13
The Server Component
ServerManager
Server
Component
// The home for managing Server components
home ServerManager manages Server
primarykey NamePrimaryKey
{
// To create a new Server identified by the name
factory create_server(in string name);
// To find a Server identified by the name
finder find_server(in string name);
};
Getting started with OpenCCM
14
The Client Component
Client
Component
// The Client component type
component Client : NamedComponent
{
// Uses the service provided by the Server component
uses Service the_service;
};
// Simple home for instanciating Client components
home ClientHome manages Client
{
};
// The home for managing Client components
home ClientManager manages Client
primarykey NamePrimaryKey
{
/** To create a new Client identified by the name. */
factory create_client(in string name);
/** To find a Client identified by the name. */
finder find_client(in string name);
};
Getting started with OpenCCM
15
The Client Component
ClientHome
Client
// The Client component type
component Client : NamedComponent
{
// Uses the service provided by the Server component
uses Service the_service;
};
// Simple home for instanciating Client components
home ClientHome manages Client
{
};
// The home for managing Client components
home ClientManager manages Client
primarykey NamePrimaryKey
{
/** To create a new Client identified by the name. */
factory create_client(in string name);
/** To find a Client identified by the name. */
finder find_client(in string name);
};
Getting started with OpenCCM
16
The Consumer Component
// The Consumer component type
component Consumer : NamedComponent
{
// Consumes Events published by Server components
consumes TextEvent from_servers;
};
// Simple home for instanciating Client components
home ConsumerHome manages Consumer
{
};
// The home for managing Client components
home ConsumerManager manages Consumer
primarykey NamePrimaryKey
{
/** To create a new Consumer identified by the name. */
factory create_consumer(in string name);
Consumer
/** To find a Consumer identified by the name. */
finder find_consumer(in string name);
};
Getting started with OpenCCM
17
The Consumer Component
ConsumerHome
// The Consumer component type
component Consumer : NamedComponent
{
// Consumes Events published by Server components
consumes TextEvent from_servers;
};
// Simple home for instanciating Client components
home ConsumerHome manages Consumer
{
};
// The home for managing Client components
home ConsumerManager manages Consumer
primarykey NamePrimaryKey
{
/** To create a new Consumer identified by the name. */
factory create_consumer(in string name);
Consumer
/** To find a Consumer identified by the name. */
finder find_consumer(in string name);
};
Getting started with OpenCCM
18
Interconnections between CORBA
component instances
ConsumerHome
ClientHome
Client
Client
ServerHome
Consumer
Server
Component
Consumer
Client
Consumer
Getting started with OpenCCM
19
Agenda
1. OMG IDL3 : design the application by defining
components and assembling component instances
2. OpenCCM compilation and generation chain for
the demo3 example
3. OpenCCM execution chain for the demo3
example
4. Package, assembly and deploy the CCM
application with XML descriptors (edited using
simple GUI)
Getting started with OpenCCM
20
2. OpenCCM compilation and generation chain
for the demo3 example








Loading the OpenCCM environment
Start the OpenCCM's OMG IDL3 Repository (named IR3)
Checking the demo3.idl3 file
Feeding the demo3.idl3 file into the OpenCCM's IR3
Generating equivalent OMG IDL 2.4 mapping for demo3
Generating the Java OpenCCM skeletons for demo3
Implementing the Client/Server–Producer/Consumer
example
Compiling generated Java CORBA 2 stubs, generated Java
OpenCCM skeletons, all Java implementation sources and
building archive demo3.jar
Getting started with OpenCCM
21
Loading the OpenCCM environment

Assuming OpenCCM is compiled and installed in
C:\OpenCCM with ORBacus-4.1 under Windows
NT :
C:\OpenCCM>ORBacus-4.1\bin\envi_OpenCCM.bat
 To have access to all OpenCCM’s tools
Getting started with OpenCCM
22
Start the OpenCCM's OMG IDL3 Repository
C:\OpenCCM\demo\demo3>ir3_start



Start the OpenCCM’s IR3
Feed the OpenCCM's IR3 with the IFR_3_0.idl file
Feed the OpenCCM's IR3 with the Components.idl
file
 this script automatically creates the
$OpenCCM_CONFIG_DIR directory
Getting started with OpenCCM
23
Checking the demo3.idl3 file
C:\OpenCCM\demo\demo3>idl3_check demo3.idl3
OpenCCM's
OpenCCM's
OpenCCM's
OpenCCM's
OpenCCM's

OMG
OMG
OMG
OMG
OMG
IDL
IDL
IDL
IDL
IDL
3.0
3.0
3.0
3.0
3.0
Compiler
Compiler
Compiler
Compiler
Compiler
0.5.0:
0.5.0:
0.5.0:
0.5.0:
0.5.0:
Reading from file demo3.idl3...
Preprocessing file demo3.idl3...
File demo3.idl3 preprocessed
Feeding the Interface Repository ...
Compilation completed: 0 warnings.
This script checks if if the specified OMG IDL 3.0
file “demo3.idl3” is correct
Getting started with OpenCCM
24
Feeding the demo3.idl3 file
into the OpenCCM's IR3
C:\OpenCCM\demo\demo3>ir3_feed demo3.idl3
OpenCCM's
OpenCCM's
OpenCCM's
OpenCCM's
OpenCCM's

OMG
OMG
OMG
OMG
OMG
IDL
IDL
IDL
IDL
IDL
3.0
3.0
3.0
3.0
3.0
Compiler
Compiler
Compiler
Compiler
Compiler
0.5.0:
0.5.0:
0.5.0:
0.5.0:
0.5.0:
Reading from file demo3.idl3...
Preprocessing file demo3.idl3...
File demo3.idl3 preprocessed
Feeding the Interface Repository ...
Compilation completed: 0 warnings.
The ir3_feed script allows to compile demo3.idl3
file and to feed the OpenCCM's IR3 (necessary to
use any of the OpenCCM tools)
Getting started with OpenCCM
25
Generating equivalent OMG IDL 2.4
mapping for the demo3 IR3 object


The ir3_idl2 script generates the OMG IDL 2.4 CCM's
mapping associated to an OpenCCM's IR3 object
(demo3.idl) :
C:\OpenCCM\demo\demo3>ir3_idl2 demo3
Add –o filename option to produce an output file and –i
option to add the #include statement, ie :
C:\OpenCCM\demo\demo3>ir3_idl2 -i
Components.idl -o demo3.idl demo3
In this case, “-i Components.idl” produces the “#include
Components.idl” statement in the demo3.idl file
Getting started with OpenCCM
26
Client-side and Server-side
OMG IDL Mappings
Component
Client
Client
Application
Component
Designer
Component
Implementer
OMG IDL
3.0
Component
Executor
uses
implemented by
OMG IDL
3.0
Compiler
Client-side
OMG IDL 2.x
User written
implemented by
Compiler
Client
Generated files
Stub
Local
server-side
OMG IDL 2.x
delegates to
ORB
Component
Skeleton
Getting started with OpenCCM
27
Client-Side OMG IDL Mapping rules




A component type is mapped to an interface
inheriting from Components::CCMObject
Facets and event sinks are mapped to an
operation for obtaining the associated reference
Receptacles are mapped to operations for
connecting, disconnecting, and getting the
associated reference(s)
Event sources are mapped to operations for
subscribing and unsubscribing to produced events
Getting started with OpenCCM
28
Client-Side OMG IDL Mapping rules

An event type is mapped to

A value type


A consumer interface


inheriting from Components::EventBase
inheriting from Components::EventConsumerBase
A home type is mapped to three interfaces

One for explicit operations user-defined



inheriting from Components::CCMHome
One for implicit operations generated
One inheriting from both previous interfaces
Getting started with OpenCCM
29
Client-Side OMG IDL Mapping rules

TextEvent eventtype is mapped to :
eventtype TextEvent
{
/** Just contains a string. */
public string text;
};
Is mapped to
valuetype TextEvent : ::Components::EventBase
{
public string text;
};
interface TextEventConsumer : ::Components::EventConsumerBase
{
void push_TextEvent(in ::demo3::TextEvent the_textevent);
};
Getting started with OpenCCM
30
Client-Side OMG IDL
Mapping rules

Server Component
component Server : NamedComponent
{
provides Service the_service;
publishes TextEvent to_consumers;
};
Server
Component
Is mapped to
interface Server : ::demo3::NamedComponent
{
::demo3::Service provide_the_service();
::Components::Cookie subscribe_to_consumers(in
::demo3::TextEventConsumer consumer);
::demo3::TextEventConsumer unsubscribe_to_consumers(in
::Components::Cookie ck);
};
Getting started with OpenCCM
31
Client-Side OMG IDL
Mapping rules

ServerHome
home ServerHome
home ServerHome manages Server {};
Server
Component
Is mapped to
interface ServerHomeExplicit : ::Components::CCMHome
{
};
interface ServerHomeImplicit : ::Components::KeylessCCMHome
{
::demo3::Server create();
};
interface ServerHome :
::demo3::ServerHomeExplicit,
::demo3::ServerHomeImplicit
{
};
Getting started with OpenCCM
32
Client-Side OMG IDL
Mapping rules

ServerManager
home ServerManager
Server
Component
home ServerManager manages Server
primarykey NamePrimaryKey
{
factory create_server(in string name);
finder find_server(in string name);
};
Is mapped to
Getting started with OpenCCM
33
Client-Side OMG IDL Mapping rules

home ServerManager
Is mapped to
interface ServerManagerExplicit : ::Components::CCMHome
{
::demo3::Server create_server(in string name);
::demo3::Server find_server(in string name);
};
interface ServerManagerImplicit
{
::demo3::Server create(in ::demo3::NamePrimaryKey key);
::demo3::Server find_by_primary_key(in
::demo3::NamePrimaryKey key);
void remove(in ::demo3::NamePrimaryKey key);
::demo3::NamePrimaryKey get_primary_key(in ::demo3::Server
comp);
};
interface ServerManager : ::demo3::ServerManagerExplicit,
::demo3::ServerManagerImplicit { };
Getting started with OpenCCM
34
Client-Side OMG IDL
Mapping rules

Client
Component
Client Component
component Client : NamedComponent
{
uses Service the_service;
};
Is mapped to
interface Client : ::demo3::NamedComponent
{
void connect_the_service(in ::demo3::Service connexion);
::demo3::Service disconnect_the_service();
::demo3::Service get_connection_the_service();
};
Getting started with OpenCCM
35
Client-Side OMG IDL
Mapping rules

Consumer Component
Consumer
component Consumer : NamedComponent
{
consumes TextEvent from_servers;
};
Is mapped to
interface Consumer : ::demo3::NamedComponent
{
::demo3::TextEventConsumer
get_consumer_from_servers();
};
Getting started with OpenCCM
36
Server-Side OMG IDL Mapping rules

A component type is mapped to three local interfaces

The main component executor interface


The monolithic component executor interface


Operations to obtain facet executors and receive events
The component specific context interface


Inheriting from Components::EnterpriseComponent
Operations to access component receptacles and event sources
A home type is mapped to three local interfaces

One for explicit operations user-defined



Inheriting from Components::HomeExecutorBase
One for implicit operations generated
One inheriting from both previous interfaces
Getting started with OpenCCM
37
Server-Side OMG IDL
Mapping rules : NamedComponent
NamedComponent
// Main component executor interface
name = xxx
local interface CCM_NamedComponent_Executor :
::Components::EnterpriseComponent
{
attribute string name;
};
// Monolithic component executor interface
local interface CCM_NamedComponent :
::demo3::CCM_NamedComponent_Executor
{
// no operations to obtain facet executors and receive events
};
// Component-specific context interface.
local interface CCM_NamedComponent_Context :
::Components::CCMContext
{
// no operations to access component receptacles and event
sources
};
Getting started with OpenCCM
38
Server-Side OMG IDL
Mapping rules : Server Component
// Main component executor interface
local interface CCM_Server_Executor :
::demo3::CCM_NamedComponent_Executor
{
};
Server
Component
// Monolithic component executor interface
local interface CCM_Server : ::demo3::CCM_Server_Executor
{
::demo3::CCM_Service get_the_service();
};
// Component-specific context interface.
local interface CCM_Server_Context :
::demo3::CCM_NamedComponent_Context
{
void push_to_consumers(in ::demo3::TextEvent event);
};
Getting started with OpenCCM
39
Server-Side OMG IDL
Mapping rules : Server Component
Server
Component
Server
CCM_Server
Service
SessionComponent
CCM_Service
Monolithic executor
CCM_Server_Context
SessionContext
Getting started with OpenCCM
40
Server-Side OMG IDL
Mapping rules : Client Component
Client
Component
// Main component executor interface
local interface CCM_Client_Executor :
::demo3::CCM_NamedComponent_Executor
{
};
// Monolithic component executor interface
local interface CCM_Client :
::demo3::CCM_Client_Executor
{
};
// Component-specific context interface.
local interface CCM_Client_Context :
::demo3::CCM_NamedComponent_Context
{
::demo3::Service get_connection_the_service();
};
Getting started with OpenCCM
41
Server-Side OMG IDL
Mapping rules : Client Component
Client
Component
Client
CCM_Client
SessionComponent
Monolithic executor
CCM_Client_Context
SessionContext
Getting started with OpenCCM
42
Server-Side OMG IDL
Mapping rules : Consumer Component
local interface CCM_TextEventConsumer
Consumer
{
void push(in ::demo3::TextEvent event);
};
// Main component executor interface
local interface CCM_Consumer_Executor :
::demo3::CCM_NamedComponent_Executor
{
};
// Monolithic component executor interface
local interface CCM_Consumer :
::demo3::CCM_Consumer_Executor
{
void push_from_servers(in ::demo3::TextEvent event);
};// Component-specific context interface.
local interface CCM_Consumer_Context :
::demo3::CCM_NamedComponent_Context
{ };
Getting started with OpenCCM
43
Server-Side OMG IDL
Mapping rules : Consumer Component
Consumer
Consumer
CCM_Consumer
SessionComponent
CCM_TextEventConsumer
TextEventConsumer
Monolithic Executor
CCM_Consumer_Context
SessionContext
Getting started with OpenCCM
44
Generating the Java OpenCCM skeletons
associated to demo3

The script
id3_java.bat allows
to generate
skeletons
C:\OpenCCM\demo\d
emo3>ir3_java
::demo3

Files generated :
ClientCCM.java
ClientHomeCCM.java
ClientHomeSkeletonInterceptor.java
ClientHomeStubInterceptor.java
ClientManagerCCM.java
ClientManagerSkeletonInterceptor.java
ClientManagerStubInterceptor.java
ClientMonolithicWrapper.java
ClientSkeletonInterceptor.java
ConsumerCCM.java
ConsumerHomeCCM.java
ConsumerHomeSkeletonInterceptor.java
ConsumerHomeStubInterceptor.java
ConsumerManagerCCM.java
ConsumerManagerSkeletonInterceptor.java
ConsumerManagerStubInterceptor.java
ConsumerMonolithicWrapper.java
ConsumerSkeletonInterceptor.java
Getting started with OpenCCM
45
Generating the Java OpenCCM skeletons
associated to demo3
NamedComponentCCM.java
NamedComponentMonolithicWrapper.java
NamedComponentSkeletonInterceptor.java
NamePrimaryKeyFactoryHelper.java
ServerCCM.java
ServerHomeCCM.java
ServerHomeSkeletonInterceptor.java
ServerHomeStubInterceptor.java
ServerManagerCCM.java
ServerManagerSkeletonInterceptor.java
ServerManagerStubInterceptor.java
ServerMonolithicWrapper.java
ServerSkeletonInterceptor.java
ServiceSkeletonInterceptor.java
ServiceStubInterceptor.java
TextEventConsumerSkeletonInterceptor.java
TextEventConsumerStubInterceptor.java
TextEventConsumerWrapper.java
TextEventFactoryHelper.java
Getting started with OpenCCM
46
Generating Java CORBA 2 stubs

Using jidl compiler for ORBacus-4.1, --tie option
allows to generate tie classes, -I option to
include idl files, this generate stubs for demo3 in
demo3\generated\stubs directory.
C:\OpenCCM\demo\demo3>jidl --auto-package --tie -I.
-I../../ORBacus-4.1/idl --output-dir
generated/stubs demo3.idl
Getting started with OpenCCM
47
Implementing the Client/Server –
Producer/Consumer OpenCCM example


Now we have to implement this example by writing Java
implementation files
Only functional parts of the application have to be
implemented
Files to write :
ClientHomeImpl.java
ClientImpl.java
ConsumerHomeImpl.java
ConsumerImpl.java
Demo3.java
ServerHomeImpl.java
ServerImpl.java
TextEventDefaultFactory.java
TextEventImpl.java
Getting started with OpenCCM
48
Implementing the Client/Server –
Producer/Consumer OpenCCM example

Demo3.java is the bootstrap of the application, here we
have to









Initialise the ORB, obtain the Name Service
Obtain component servers ComponentServer1 and
ComponentServer2
Obtain the container homes
Instantiate a container on each server
Install homes for Client, Server and Consumer
Create components with create() method of homes : here we
have three clients, three consumers and one server-producer
Configure components
Connect each client and consumer to server
Call the configuration_complete() method of components
implementation
Getting started with OpenCCM
49
Implementing the Client/Server –
Producer/Consumer OpenCCM example
Demo3.java  Connect each client and consumer to server
Client
Component
Server
Component
Consumer
Component
....
Service the_service = s.provide_the_service();
c1.connect_the_service(the_service);
c2.connect_the_service(the_service);
c3.connect_the_service(the_service);
s.subscribe_to_consumers(cs1.get_consumer_from_servers());
s.subscribe_to_consumers(cs2.get_consumer_from_servers());
s.subscribe_to_consumers(cs3.get_consumer_from_servers());
....
Getting started with OpenCCM
50
Implementing the Client/Server –
Producer/Consumer OpenCCM example

ClientImpl.java :
 Instantiates, constructs and shows the GUI
 Perform the action when the button is clicked by calling
the display service service.display(...) (Service interface
operation)
....
// Obtain the object reference associated to the
// 'the_service' receptacle.
Service service = the_context_.get_connection_the_service();
// Calls the display service.
service.display(name_ + ":" + text_.getText());
....
Getting started with OpenCCM
51
Implementing the Client/Server –
Producer/Consumer OpenCCM example

ServerImpl.java
 Instantiates, constructs and shows the GUI
 Implements the display method for the Service
interface by displaying string text
 Push events to consumers push_to_consumers(... )
...
public void display(String text)
{
// Puts the text into the text area.
textArea_.append(text + "\n");
// Pushes an event to all connected consumers.
the_context_.push_to_consumers
( new TextEventImpl(text) );
}
...
Getting started with OpenCCM
52
Implementing the Client/Server –
Producer/Consumer OpenCCM example

ConsumerImpl.java :


Instantiates, constructs and shows the GUI
Implements reception of events published by server components
push_from_server(...)
...
public void
push_from_servers(TextEvent event)
{
push(event);
}
public void
push(TextEvent event)
{
// Put the text into the text area.
textArea_.append(event.text + "\n");
}
...
Getting started with OpenCCM
53
Implementing the Client/Server –
Producer/Consumer OpenCCM example

ClientHomeImpl.java
This class inherits from the local CCM_ClientHome
interface generated. It implements the create_home()
method called by the OpenCCM Component Server to
create a home instance
ConsumerHomeImpl.java, ServerHomeImpl.java
 Implements the create_home() method to create a
home instance
 Register the TextEvent valuetype factory to the ORB


Getting started with OpenCCM
54
Compiling Java sources
Building archive demo3.jar

Now, we have to :



Compile generated Java CORBA 2 stubs and
Java OpenCCM skeletons,
Compile all Java implementation sources,
Build archive demo3.jar
Getting started with OpenCCM
55
Agenda
1. OMG IDL3 : design the application by defining
components and assembling component instances
2. OpenCCM compilation and generation chain for
the demo3 example
3. OpenCCM execution chain for the demo3
example
4. Package, assembly and deploy the CCM
application with XML descriptors (edited using
simple GUI)
Getting started with OpenCCM
56
3. OpenCCM execution chain for the demo3
example

Installing the OpenCCM configuration Repository
 ccm_install

Starting the NameService
 ns_start

Starting Java Component Servers
 jcs_start

Getting the IOR of the started Name Service
 ns_ior

Starting JVM to run demo3
Getting started with OpenCCM
57
Installing the OpenCCM configuration
Repository, Starting the Name Service
C:\OpenCCM\demo\demo3>ccm_install
The OpenCCM Platform will be installed.
Creating the C:\OpenCCM\ORBacus-4.1\OpenCCM_CONFIG_DIR directory.
Creating the C:\OpenCCM\ORBacus4.1\OpenCCM_CONFIG_DIR\ComponentServers directory.
The OpenCCM Platform is installed.
C:\OpenCCM\demo\demo3>ns_start
The Name Service will be started.
Launching the ORBacus Name Service.
The Name Service is started.
Getting started with OpenCCM
58
Starting Java Component Servers for demo3

Named ComponentServer1 and ComponentServer2
C:\OpenCCM\demo\demo3>jcs_start ComponentServer1
The OpenCCM's Java Component Server ComponentServer1 will be
started.
Creating the C:\OpenCCM\ORBacus4.1\OpenCCM_CONFIG_DIR\ComponentServers\ComponentServer1.archive
_cache directory.
Launching an OpenCCM's Java Component Server.
The OpenCCM's Java Component Server ComponentServer1 is started.
C:\OpenCCM\demo\demo3>jcs_start ComponentServer2
The OpenCCM's Java Component Server ComponentServer2 will be
started.
Creating the C:\OpenCCM\ORBacus4.1\OpenCCM_CONFIG_DIR\ComponentServers\ComponentServer2.archive
_cache directory.
Launching an OpenCCM's Java Component Server.
The OpenCCM's Java Component Server ComponentServer2 is started.
Getting started with OpenCCM
59
Getting the IOR of the started Name Service
and run demo3
C:\OpenCCM\demo\demo3>ns_ior
IOR:000000000000002a49444c3a6f6f632e636f6d2f436f73........

Then we call the JVM with IOR args and demo3.jar
archive in classpath
Starting demonstration demo3 ...
Initializing the ORB...
Obtaining the Name Service...
Obtaining Component Servers...
Installing archives...
Creating components...
Configuring components...
Interconnecting components...
Configuration completion...
Demonstration demo3 is ready to be used ...
Getting started with OpenCCM
60
The Client / Server-Producer / Consumer CCM
application running...
Getting started with OpenCCM
61
Agenda
1. OMG IDL3 : design the application by defining
components and assembling component instances
2. OpenCCM compilation and generation chain for
the demo3 example
3. OpenCCM execution chain for the demo3
example
4. Package, assembly and deploy the CCM
application with XML descriptors (edited using
simple GUI)
Getting started with OpenCCM
62
4. Package, assembly and deploy the CCM application
with XML descriptors edited using simple GUI

Software Package Descriptor


describe general elements (title, author, description,
web page, license, link to IDL file...etc) and list
implementations (information about implementations
like OS, ORB, language, compiler, dependancies on
other libraries...etc. , entry point)
Property File Descriptor


used to set home and component properties.
It contains pairs of name/value to configure home and
component attributes
Getting started with OpenCCM
63
Package, assembly and deploy the CCM application with
XML descriptors edited using simple GUI

Component Assembly Descriptor




References component software descriptors client.csd,
server.csd and consumer.csd
Defines home instances and their collocation,
component instances
Defines that homes, components or ports are to be
registered in the ComponentHomeFinder or Naming
Service
Defines connections to be made between Client, Server
and Consumer component ports (receptacles to facets,
event sinks to event sources)
Getting started with OpenCCM
64
Package, assembly and deploy the CCM
application using XML descriptors
IDL/CIDL File
User's Code
Programming
Language
Tools
IDL/CIDL
Compiler
Default Properties
Stubs, Skeletons
Home Properties
Component Properties
CORBA
Component
Package
Implementation
Packaging
Tool
CORBA
Component
Package
Assembly
Tool
Component
Assembly
Package
Component
Descriptor
Assembly
Descriptor
softpkg
Descriptor
CORBA
Component
Package
Getting started with OpenCCM
Deployment
Tool
65
Edit XML descriptors using simple GUI
 demo : Packaging, Assembling and Deploying
the Client / Server – Producer / Consumer CCM
application by defining :
 Component names properties
 Home instances and their collocation
 Component instances
 Connections between components
 ...
Getting started with OpenCCM
66
Conclusion

OpenCCM : 1st open standard for Distributed
Component Computing


An open compilation & generation tool chain





Multi-languages, multi-OSs, multi-ORBs...etc.
An OMG IDL3 Compiler
An OMG IDL3 Repository
A generator for equivalent OMG IDL2
A generator for extended Java skeleton classes
A flexible distributed deployment & execution
middleware infrastructure
Getting started with OpenCCM
67
More information

ObjectWeb


OpenCCM



http://www.objectweb.org/openccm/
Mailing list = [email protected]
LIFL


http://www.objectweb.org
http://www.lifl.fr
...
Getting started with OpenCCM
68