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

3,564 Comments

  1. Ricardolem Ricardolem

    С пациентом работают профильные специалисты, которые оценивают состояние и подбирают безопасный план помощи.
    Узнать больше – zakazat-kapelnicu-ot-zapoya-na-domu

  2. Billyjuh Billyjuh

    Если присутствуют признаки угрозы жизни — потеря сознания, судороги, выраженная одышка, сильная боль в груди, подозрение на инсульт или тяжелый психоз, — требуется экстренное медицинское вмешательство. Плановый вызов нарколога не заменяет скорую медицинскую службу. В менее острых ситуациях специалист проведет первичную оценку и решит, возможно ли лечение дома или необходим стационар.
    Подробнее – https://vyvod-iz-zapoya-moskva15-3.ru/

  3. ThomasDaype ThomasDaype

    Если вам нужен вывод из запоя на дому круглосуточно, наши специалисты готовы прийти на помощь в любое время суток. Выезд организуется по районам Красноярска и отдельным населенным пунктам Красноярского края. Нарколог проводит тщательный осмотр, определяет объем медицинской помощи и назначает только те препараты, которые соответствуют потребностям пациента. Для каждого обращения используется индивидуальная схема, а медицинская деятельность осуществляется в соответствии с действующими требованиями РФ.
    Изучить вопрос подробнее – http://vyvod-iz-zapoya-v-kkrasnoyarske17.ru/

  4. top online pokies and casinos australian deals, canadian blackjack
    online free and cash poker online canada, or canadian gambling
    apps

    Here is my blog :: casino table games cheats (Tonja)

  5. new online canadian casino, online slots bonausaa
    and whats the largest casino in australia, or united kingdom real money
    pokies online

    Feel free to visit my webpage mobile gamble (Adrianne)

  6. JosephSwoks JosephSwoks

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

Leave a Reply

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