Articles   Forum   Download   Open Source   CORBA examples   WebServices examples

 

PocoCapsule/C++ examples

Copyright(c) 2006, 2007 by Pocomatic Software LLC. All rights reserved.

Basic IoC and DSM examples:

hello

In this basic IoC example, the assembly/deployment descriptor setup.xml declares the application's bean instantiation, lifecycle control and several post-instantiation invocations (generalized setter). These IoC invocations are to be invoked by PocoCapsule container as non-invasive callbacks on plain old C++ object (POCO) constructor, destructor, C++ class member function, operator, as well as C global function.

movie lister

The original POJO version of this example for Spring framework was used by Martin Fowler in his article. Here, this example is converted into a C++ application with plain old C++ objects (POCO) as components and deployed using PocoCapsule/C++ XML configuration (the setup.xml).

gps

This example is originated from an OMG CCM tutorial, and has been converted from CCM to a non-CORBA C++ application with plain old C++ objects (POCO) as components, and then assembled and deployed using PocoCapsule IoC container. As shown in the diagram, three components (POCOs), involving circular dependency, are instantiated and wired up as declared in the PocoCapsule/C++ deployment description (the setup.xml) using the PocoCapsule core schema. A CORBA version of this example is also provided and can be found in the examples/corba/gps directory.

sdr

This example is originated from the CRC's reference implementation of the JTRS-SCA, and has been converted into non-CORBA version. In the example, a Software Defined Radio (SDR) waveform application (as shown in the diagram), with 8 mocked composites and 22 circular dependences, is assembled and deployed as described in the PocoCapsule/C++ XML configuration (the setup.xml).

A CORBA variation of this example that uses the JTRS-SCA assembly model is also provided and can be found in the examples/corba/jtrs-sca directory.

stl map

This example illustrates the use of C++ template and STL container classes (e.g. std::map) in PocoCapsule/C++.

extend schema

This example illustrates a scenario that the PocoCapsule/C++ core schema is easily extend to support <map> and <property> elements in a non-invasive and type-safe manner (as shown in the setup.xml).

dsm gps

This example is same as the gps example listed above, except the deployment descriptor (the setup.xml) here is expressed in an user defined domain-specific-modeling (DSM) schema.

dynamic wiring

This example demonstrates a straightforward way to support dynamic wiring in PocoCapsule as a domain specific modeling (DSM). By dynamic wiring, an application can be deployed with some of its dependent services not being wired immediately and unchangably but being wired and rewired later when each individual service become available or being updated.

higher-order transformation

This example illustrates the usage of poco-dsl templates and higher order transformations (HOTs) that transform DSM transformation templates expressed in user defined schema (such as the poco-dsl) into W3C XSLT templates.

dsm sdr

This example is same as the sdr example listed above, except the deployment descriptor (the setup.xml) here is expressed in an user defined domain-specific-modeling (DSM) schema.

robotic vehicle

This example illustrates the scenario of using PocoCapsule IoC + DSM to assemble a robotic vehicle motion control application from components.

on-error

This example illustrates the usage of the binary branching element <on-error>.

pipeline

This example illustrates a (circular) pipeline is setup from two independently developed node component implementations. Each of these two components is built together with its dynamic invocation proxies. This scenario avoids the need of building (generating and compiling) these proxies on the field.

 

Articles   Forum   Download   Open Source   IoC&DSM examples   WebServices examples

 

CORBA examples:

(POA server, corbaloc URL, JTRS-SCA, Event/Notification, DDS, and RTC)

hello

This is a basic CORBA client/server application, with the server being deployed using the PocoCapsule/CORBA framework.

hello-tie

This is a TIE version of the above hello example. In this example, the business logic implementation supports all operation signatures defined in the IDL interface but does not inherit from the POA servant skeleton mapping from the IDL. A TIE servant class is used to proxy this implementation to POA.

gps

This example is originated from an OMG CCM tutorial, and has been converted from CCM to a plain CORBA 2.0 example. In the example, three components (CORBA local objects), with circular dependency, are wired up in PocoCapsule/CORBA deployment (as shown in the diagram). A non-CORBA version of this example is also provided and can be found in the examples/basic-ioc/gps directory.

jtrs-sca

This example is originated from the CRC's reference implementation of JTRS-SCA. In the example, a Software Defined Radio (SDR) waveform application (as shown in the diagram), with 8 mocked composites and 22 circular dependences, is assembled and deployed using using JTRS-SCA software assembly model (in the sad.xml) achieved as a domain specific modeling (DSM) extension on top of PocoCapsule/CORBA

A non-CORBA version of this example that uses PocoCapsule/C++ core deployment model is also provided and can be found in the examples/basic-ioc/sdr directory.

poa-server

This is a CORBA server example. The server application deployed using PocoCapsule/CORBA (as shown in the application deployment descriptor setup.xml) covers all of the following POA request-processing policy settings:

  • "use-aom-only",

  • "use-default-servant",

  • "use-servant-manager" + "non-retain" servant-retention policy, and

  • "use-servant-manager" + "retain" the servant-retention policy.

dsm-server

This example shows that application developers can easily define their own CORBA server application deployment model expressed by a domain specific modeling (DSM) on top of the core PocoCapsule/CORBA deployment model. In this example, a CORBA server similar to the poa-server example is deployed using an user defined deployment model that largely abstracts away the POA concept (as shown in the application deployment descriptor setup.xml).

event & notification

This example illustrates the scenarios of connecting event supplier and/or consumer components to OMG Event/Notification Service. Unlike CCM that mandates applications to use an EVIL (Event as Valuetype of IdL) event model and contradicts with conventional event/notification service applications, PocoCapsule/CORBA supports POEM (Plain Old Event Model) event model commonly used by almost all normal CORBA applications. As declared in the publish and subscribe descriptors (publish.xml and subscribe.xml), the following POEM scenarios are covered by this example:

  • typed event

  • structured event

  • sequence event

  • untyped event

  • typed event with filter

  • structured event with filter

event & notification (classic version)

This example is same as the example above, except that the event listeners in this example are implemented as POA servants inherited from their respective event interface POA skeletons.

dds

This example illustrates the scenario of developing and deploying OMG Data Distribution Service (DDS) data reader and data writer applications using PocoCapsule/CORBA+DDS.

rtc

This example illustrates the scenario of assembling an OMG Robotic Technology Component (RTC) application using PocoCapsule IoC + DSM.

 

Articles   Forum   Download   Open Source   IoC&DSM examples   CORBA examples

 

Web Services examples:

(Poco/WebServices and OASIS-OpenCSA)

hello-ws

This is a basic client/server Web Services example deployed using PocoCapsule/WebService deployment model. It comprises one service provided by a plain old server object extended from C++ SOAP skeleton.

This example is a POCO variation of the similar SCA example that can be found in the example/web-services/hello-ocsa directory

bigbank-ws

This example is originated from an OASIS-OpenCSA (formerly known as OpenSOA-SCA) user example highlighted in the official OASIS-OpenCSA documents and a prove-of-concept prototype implementation. Here, it is converted to use the PocoCapsule/WebServices service deployment and component assembly model, that is not only more intuitive, simpler and flexible but also powerful than OASIS-OpenCSA's model.

The same bigbank example assembled using the OASIS-OpenCSA assembly model can be found in examples/web-services/bigbank-ocsa directory.

hello-ocsa

This is a basic client/server Web Services example of using OASIS-OpenCSA assembly model. The assembly descriptor (service.composite) declares an OASIS-OpenCSA composition that comprises of one service provided by a plain old service object extended from a C++ SOAP skeleton.

A PocoCapsule/WebService variation of this example is provided and can be found in the examples/web-service/hello-ws directory.

bigbank-ocsa

This is the well known OASIS-OpenCSA (formerly known as OpenSOA-SCA) user example highlighted in official OASIS-OpenCSA documents and the prove-of-concept prototype implementation. The assembly descriptor (bigbank.account.composite) declares an OASIS-OpenCSA composite that exports one web service, uses one external service, and contains three internal components (as shown in the diagram).

A PocoCapsule/WebService variation of this example is provided and can be found in the examples/web-service/bigbank-ws directory.

calculator-ocsa

This is also a OASIS-OpenCSA (formerly known as OpenSOA-SCA) user example originated from an OASIS-OpenCSA prove-of-concept prototype implementation. In this examples, components are wired up by using either OASIS-OpenCSA <wire> elements (if the calculator-by-wire.composite descriptor is used) or <reference> elements (if the calculator-by-ref.composite descriptor is used).