Skip to content

An example of use of CORBA

Hello

CORBA (Common Object Request Broker Architecture) is a standart defined by OMG (Object Management Group), this let distributed object from different languages and OS to communicate. It also provides total transparency in the communication. The IDL (Interface Definition Language) is the tecnology used to describe the interfaces. IDL has your own data types, that are mapped to the data types in other languages. There is an IDL compiler, it generates the codes that do the communication.

But how it works? We have some definitions in a .idl file, in this case Bank-idl (remember to change the filename).

Acessing the files, you will see a lot of definitions like:

Module definition:

module banco {

Definition of data type valor as double

typedef double valor;

Definition of the transacao struct

struct transacao {
unsigned long data; // Formato: ddmmyyyy
string<12> descricao;
valor quantia;
};

Definition of some methos, vars and exceptions

interface auto_atendimento {
readonly attribute string boas_vindas;
valor saldo ( in conta c )
raises ( conta_inval );
void extrato ( in conta c,
out transacoes t, out valor saldo )
raises ( conta_inval );
void transferencia ( in conta origem,
in conta destino, in valor v )
raises ( conta_inval, saldo_insuf );
void investimento ( in conta c,
in aplicacao apl, in valor v )
raises ( conta_inval, saldo_insuf );
};

With this file you can generate a lot of different interfaces compiled to different languages. To generate the interfaces in Java use:

idlj -fall bank.idl

It will generate many files inside a banco folder, with the .java files. Now you just have to code what each method will do.

Example of implementation of a bank service and a client in Java using CORBA and IDL

Matheus

PS: This is just a introduction to CORBA. It uses a lot of other definitions as Object Management Architecture and others

References:
My Professor Frank page.
http://en.wikipedia.org/wiki/Common_Object_Request_Broker_Architecture

Published injava

1,608 Comments

  1. Lou Lou

    Hi are using WordPress for your site platform? I’m new
    to the blog world but I’m trying to get started and
    set up my own. Do you need any coding expertise to make your own blog?
    Any help would be greatly appreciated!

    Feel free to visit my page :: apuestas españa gana mundial (Lou)

  2. Robertfus Robertfus

    Вывод из запоя на дому в Казани удобен, когда близкий человек не готов ехать в клинику, плохо переносит дорогу или находится в состоянии сильной слабости. Врач приезжает на дому, сохраняет анонимность, спокойно объясняет процесс и начинает лечение только после осмотра и согласия пациента. Вызов врача на дому особенно важен, если муж, отец, брат, мама или другой близкий уже не может перестать пить и нуждается в срочной помощи.
    Углубиться в тему – вывод из запоя капельница на дому в казани

  3. I’ve been surfing online more than 3 hours today, yet I never found any interesting article like yours. It’s pretty worth enough for me. In my opinion, if all website owners and bloggers made good content as you did, the net will be much more useful than ever before.

  4. Randallgek Randallgek

    врач приезжает по указанному адресу в течение 1 часа после обращения (возможна и более быстрая реакция при необходимости).
    Выяснить больше – нарколог на дом в казани

Leave a Reply

Your email address will not be published. Required fields are marked *