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,737 Comments

  1. united kingdom no deposit casino bonus, new gambling sites usa and united statesn lakeside casino in pahrump nv (Thorsten) slots online, or top
    paying online casinos united states

  2. PerryJeple PerryJeple

    Не существует единственного количества дней, после которого вывод из запоя становится обязательным. У одного пациента выраженная абстиненция развивается после нескольких дней запоя, другой человек дольше сохраняет относительно стабильное самочувствие. Врач оценивает не только длительность запоя, но и стаж алкоголизма, состояние организма, возраст, заболевания и предыдущие осложнения. Самостоятельный выход из длительного запоя может быть опасен, если человек уже зависим от алкоголя и постоянно использует новую дозу спиртного для облегчения похмельного синдрома.
    Получить больше информации – https://vyvod-iz-zapoya-krasnoyarsk59.ru/

  3. Charlesgorne Charlesgorne

    В этой медицинской статье мы погрузимся в актуальные вопросы здравоохранения и лечения заболеваний. Читатели узнают о современных подходах, методах диагностики и новых открытий в научных исследованиях. Наша цель — донести важную информацию и повысить уровень осведомленности о здоровье.
    Подробнее – magadan trezvost clinica

  4. blackjack usa play for free online casino games (Frederic) game download casino, best
    payout online casino united states and online gambling poker australia, or best usa online slot sites

  5. 10 minimum deposit online bgo casino login page (Derrick) usa,
    online pokie machines united states and united statesn poker
    95 download, or biggest pokie win in united states

  6. CaseyCic CaseyCic

    Эта публикация содержит ценные советы и рекомендации по избавлению от зависимости. Мы обсуждаем различные стратегии, которые могут помочь в процессе выздоровления и важность обращения за помощью. Читатели смогут использовать полученные знания для улучшения своего состояния.
    Подробнее можно узнать тут – частной наркологической клиники

Leave a Reply

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