getting started with openccm1 getting started with openccm tutorial an openccm application : the...
TRANSCRIPT
Getting started with OpenCCM 1
Getting started with Getting started with OpenCCMOpenCCMTutorialTutorial
An OpenCCM application : The demo3 “Client / Server-Producer /
Consumer”
Areski Flissi (IR CNRS / LIFL) [email protected]
Getting started with OpenCCM 2
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 3
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 4
Building a CCM application with OpenCCM is very easy...
IDL3
IR3
OMG IDL 2.x
Java OpenCCM Skeletons
Java Corba 2 stubs
Java implementation patterns
User’s Java implementation file
ir3_feed
ir3_idl2
ir3_java
jidl
ir3_jimpl
Compile and Build archive
demo3.idl3
demo3.jar
demo3.idlPackaging, Assembling and Deployment done by XML descriptors
User written filesCompiler
Generated files
GUIXML descriptors
Getting started with OpenCCM 5
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 6
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 7
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 8
Building the application :
Assembling CORBA Component instances
Component
Base ref.
Facet
Receptacle
Event Source
Event Sink
ServerComponent
ClientComponent
ConsumerComponent
Getting started with OpenCCM 9
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 10
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 componentsvaluetype
NamePrimaryKey : ::Components::PrimaryKeyBase { /** Just a string name. */ public /*string*/ long name; };
Getting started with OpenCCM 11
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 12
The Server Component
// The Server component typecomponent 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 componenthome ServerHome manages Server {};
ServerCompone
nt
Getting started with OpenCCM 13
The Server Component
// The Server component typecomponent 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 componenthome ServerHome manages Server {};
ServerHome
ServerComponent
Getting started with OpenCCM 14
The 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);
};
ServerManager
ServerComponent
Getting started with OpenCCM 15
The Client Component
// The Client component typecomponent Client : NamedComponent { // Uses the service provided by the Server component uses Service the_service;
};// Simple home for instanciating Client componentshome ClientHome manages Client { };// The home for managing Client componentshome 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); };
ClientComponent
Getting started with OpenCCM 16
The Client Component
// The Client component typecomponent Client : NamedComponent { // Uses the service provided by the Server component uses Service the_service;
};// Simple home for instanciating Client componentshome ClientHome manages Client { };// The home for managing Client componentshome 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); };
ClientHome
Client
Getting started with OpenCCM 17
The Consumer Component
// The Consumer component typecomponent Consumer : NamedComponent { // Consumes Events published by Server components consumes TextEvent from_servers;
};// Simple home for instanciating Client componentshome ConsumerHome manages Consumer { };// The home for managing Client componentshome ConsumerManager manages Consumer primarykey NamePrimaryKey { /** To create a new Consumer identified by the name. */ factory create_consumer(in string name);
/** To find a Consumer identified by the name. */ finder find_consumer(in string name); };
Consumer
Getting started with OpenCCM 18
The Consumer Component
// The Consumer component typecomponent Consumer : NamedComponent { // Consumes Events published by Server components consumes TextEvent from_servers;
};// Simple home for instanciating Client componentshome ConsumerHome manages Consumer { };// The home for managing Client componentshome ConsumerManager manages Consumer primarykey NamePrimaryKey { /** To create a new Consumer identified by the name. */ factory create_consumer(in string name);
/** To find a Consumer identified by the name. */ finder find_consumer(in string name); };
ConsumerHome
Consumer
Getting started with OpenCCM 19
Interconnections between CORBA component instances
ServerHome
ServerComponen
t
ConsumerHomeClientHome
Consumer
Consumer
Consumer
Client
Client
Client
Getting started with OpenCCM 20
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 21
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 22
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 23
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 24
Checking the demo3.idl3 file
C:\OpenCCM\demo\demo3>idl3_check demo3.idl3OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Reading from file demo3.idl3...
OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Preprocessing file demo3.idl3...
OpenCCM's OMG IDL 3.0 Compiler 0.5.0: File demo3.idl3 preprocessed
OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Feeding the Interface Repository ...
OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Compilation completed: 0 warnings.
This script checks if if the specified OMG IDL 3.0 file “demo3.idl3” is correct
Getting started with OpenCCM 25
Feeding the demo3.idl3 file into the OpenCCM's IR3
C:\OpenCCM\demo\demo3>ir3_feed demo3.idl3OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Reading from file demo3.idl3...
OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Preprocessing file demo3.idl3...
OpenCCM's OMG IDL 3.0 Compiler 0.5.0: File demo3.idl3 preprocessed
OpenCCM's OMG IDL 3.0 Compiler 0.5.0: Feeding the Interface Repository ...
OpenCCM's OMG IDL 3.0 Compiler 0.5.0: 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 26
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 27
Client-side and Server-side OMG IDL Mappings
User writtenCompilerGenerated files
ComponentDesigner
OMG IDL3.0
Localserver-sideOMG IDL 2.x
ClientStub
ComponentExecutor
ComponentSkeleton
OMG IDL 3.0
CompilerClient-side
OMG IDL 2.x
ComponentClient
ComponentImplementer
ClientApplication
uses
implemented by delegates to
implemented by
ORB
Getting started with OpenCCM 28
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 29
Client-Side OMG IDL Mapping rules
An event type is mapped to A value type
inheriting from Components::EventBase A consumer interface
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 30
Client-Side OMG IDL Mapping rules
TextEvent eventtype is mapped to :
eventtype TextEvent { /** Just contains a string. */ public string text; };
valuetype TextEvent : ::Components::EventBase { public string text; };interface TextEventConsumer : ::Components::EventConsumerBase { void push_TextEvent(in ::demo3::TextEvent the_textevent); };
Is mapped to
Getting started with OpenCCM 31
Client-Side OMG IDL Mapping rules
Server Component
component Server : NamedComponent {
provides Service the_service;publishes TextEvent to_consumers;
};
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); };
Is mapped to
ServerCompone
nt
Getting started with OpenCCM 32
Client-Side OMG IDL Mapping rules
home ServerHome
home ServerHome manages Server {};
interface ServerHomeExplicit : ::Components::CCMHome { };interface ServerHomeImplicit : ::Components::KeylessCCMHome { ::demo3::Server create(); };interface ServerHome : ::demo3::ServerHomeExplicit,
::demo3::ServerHomeImplicit { };
Is mapped to
ServerHome
ServerComponent
Getting started with OpenCCM 33
Client-Side OMG IDL Mapping rules
home ServerManager
home ServerManager manages Server
primarykey NamePrimaryKey
{
factory create_server(in string name);
finder find_server(in string name);
};
Is mapped to
ServerManager
ServerComponent
Getting started with OpenCCM 34
Client-Side OMG IDL Mapping rules
home ServerManagerinterface 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 { };
Is mapped to
Getting started with OpenCCM 35
Client-Side OMG IDL Mapping rules
Client Component
component Client : NamedComponent {
uses Service the_service;};
interface Client : ::demo3::NamedComponent { void connect_the_service(in ::demo3::Service connexion); ::demo3::Service disconnect_the_service(); ::demo3::Service get_connection_the_service(); };
Is mapped to
ClientComponent
Getting started with OpenCCM 36
Client-Side OMG IDL Mapping rules
Consumer Component
component Consumer : NamedComponent {
consumes TextEvent from_servers;};
interface Consumer : ::demo3::NamedComponent {
::demo3::TextEventConsumer get_consumer_from_servers();
};
Is mapped to
Consumer
Getting started with OpenCCM 37
Server-Side OMG IDL Mapping rules
A component type is mapped to three local interfaces
The main component executor interface Inheriting from Components::EnterpriseComponent
The monolithic component executor interface Operations to obtain facet executors and receive events
The component specific context interface 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 38
Server-Side OMG IDL Mapping rules : NamedComponent
// Main component executor interfacelocal interface
CCM_NamedComponent_Executor : ::Components::EnterpriseComponent
{ attribute string name; };// Monolithic component executor interfacelocal 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 };
NamedComponent
name = xxx
Getting started with OpenCCM 39
Server-Side OMG IDL Mapping rules : Server Component
// Main component executor interfacelocal interface
CCM_Server_Executor : ::demo3::CCM_NamedComponent_Executor
{ };
// Monolithic component executor interfacelocal 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); };
ServerCompone
nt
Getting started with OpenCCM 40
Server-Side OMG IDL Mapping rules : Server Component
ServerCompon
ent
Monolithic executor
CCM_Server
CCM_ServiceCCM_Server_Context
Server
Service
SessionComponent
SessionContext
Getting started with OpenCCM 41
Server-Side OMG IDL Mapping rules : Client Component
// Main component executor interfacelocal interface
CCM_Client_Executor : ::demo3::CCM_NamedComponent_Executor
{ };// Monolithic component executor interfacelocal 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(); };
ClientComponent
Getting started with OpenCCM 42
Server-Side OMG IDL Mapping rules : Client Component
ClientComponent
Monolithic executor
CCM_Client
CCM_Client_Context
Client
SessionComponent
SessionContext
Getting started with OpenCCM 43
Server-Side OMG IDL Mapping rules : Consumer Component
local interface CCM_TextEventConsumer { void push(in ::demo3::TextEvent event); };// Main component executor interfacelocal interface
CCM_Consumer_Executor : ::demo3::CCM_NamedComponent_Executor
{ };// Monolithic component executor interfacelocal 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
{ };
Consumer
Getting started with OpenCCM 44
Server-Side OMG IDL Mapping rules : Consumer Component
Monolithic Executor
CCM_Consumer
CCM_TextEventConsumerCCM_Consumer_Context
Consumer
TextEventConsumer
SessionComponent
SessionContext
Consumer
Getting started with OpenCCM 45
Generating the Java OpenCCM skeletonsassociated to demo3
The script id3_java.bat allows to generate skeletonsC:\OpenCCM\demo\demo3>ir3_java ::demo3
Files generated :
ClientCCM.javaClientHomeCCM.javaClientHomeSkeletonInterceptor.javaClientHomeStubInterceptor.javaClientManagerCCM.javaClientManagerSkeletonInterceptor.javaClientManagerStubInterceptor.javaClientMonolithicWrapper.javaClientSkeletonInterceptor.javaConsumerCCM.javaConsumerHomeCCM.javaConsumerHomeSkeletonInterceptor.javaConsumerHomeStubInterceptor.javaConsumerManagerCCM.javaConsumerManagerSkeletonInterceptor.javaConsumerManagerStubInterceptor.javaConsumerMonolithicWrapper.javaConsumerSkeletonInterceptor.java
Getting started with OpenCCM 46
Generating the Java OpenCCM skeletonsassociated to demo3
NamedComponentCCM.javaNamedComponentMonolithicWrapper.javaNamedComponentSkeletonInterceptor.javaNamePrimaryKeyFactoryHelper.javaServerCCM.javaServerHomeCCM.javaServerHomeSkeletonInterceptor.javaServerHomeStubInterceptor.javaServerManagerCCM.javaServerManagerSkeletonInterceptor.javaServerManagerStubInterceptor.javaServerMonolithicWrapper.javaServerSkeletonInterceptor.javaServiceSkeletonInterceptor.javaServiceStubInterceptor.javaTextEventConsumerSkeletonInterceptor.javaTextEventConsumerStubInterceptor.javaTextEventConsumerWrapper.javaTextEventFactoryHelper.java
Getting started with OpenCCM 47
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 48
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.javaClientImpl.javaConsumerHomeImpl.javaConsumerImpl.javaDemo3.javaServerHomeImpl.javaServerImpl.javaTextEventDefaultFactory.javaTextEventImpl.java
Getting started with OpenCCM 49
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 50
Implementing the Client/Server –Producer/Consumer OpenCCM example
Demo3.java Connect each client and consumer to server
....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());
....
ServerCompone
nt
ClientCompone
ntConsumerComponen
t
Getting started with OpenCCM 51
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 52
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 53
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 54
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 55
Compiling Java sourcesBuilding 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 56
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 57
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 58
Installing the OpenCCM configuration Repository, Starting the Name Service
C:\OpenCCM\demo\demo3>ccm_installThe OpenCCM Platform will be installed.
Creating the C:\OpenCCM\ORBacus-4.1\OpenCCM_CONFIG_DIR directory.
Creating the C:\OpenCCM\ORBacus-4.1\OpenCCM_CONFIG_DIR\ComponentServers directory.
The OpenCCM Platform is installed.
C:\OpenCCM\demo\demo3>ns_startThe Name Service will be started.
Launching the ORBacus Name Service.
The Name Service is started.
Getting started with OpenCCM 59
Starting Java Component Servers for demo3
Named ComponentServer1 and ComponentServer2C:\OpenCCM\demo\demo3>jcs_start ComponentServer1The OpenCCM's Java Component Server ComponentServer1 will be
started.Creating the C:\OpenCCM\ORBacus-4.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 ComponentServer2The OpenCCM's Java Component Server ComponentServer2 will be
started.Creating the C:\OpenCCM\ORBacus-4.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 60
Getting the IOR of the started Name Service and run demo3
C:\OpenCCM\demo\demo3>ns_iorIOR: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 61
The Client / Server-Producer / Consumer CCM application running...
Getting started with OpenCCM 62
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 63
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 64
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 65
Package, assembly and deploy the CCM application using XML descriptors
IDL/CIDLCompiler
IDL/CIDL File
Stubs, Skeletons
PackagingTool
Implementation
ProgrammingLanguage
Tools
User's Code
ComponentDescriptor
Default Properties
AssemblyTool
ComponentAssemblyPackage
Home Properties Component Properties
DeploymentTool
CORBAComponent
Package
CORBAComponent
Package
AssemblyDescriptor
CORBAComponent
Package
softpkgDescriptor
Getting started with OpenCCM 66
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 67
ConclusionConclusion
OpenCCM : 1st open standard for Distributed Component Computing Multi-languages, multi-OSs, multi-ORBs...etc.
An open compilation & generation tool chain 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 68
More information
ObjectWeb http://www.objectweb.org
OpenCCM http://www.objectweb.org/openccm/ Mailing list = [email protected]
LIFL http://www.lifl.fr
...