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

  1. ChrisMut ChrisMut

    Вывод из запоя в Реутове в наркологической клинике «Детокс» — комплексное медицинское лечение, направленное на прекращение длительного употребления алкоголя, снятие абстинентного синдрома, детоксикацию организма и восстановление нормального самочувствия. Помощь доступна круглосуточно: опытный врач-нарколог может провести осмотр на дому либо организовать лечение пациента в стационаре. Формат выбирается индивидуально с учетом длительности запоя, количества выпитого, возраста, наличия хронических заболеваний, выраженности интоксикации и общего физического и психического состояния человека. При тяжелых случаях наркологическая помощь оказывается под постоянным медицинским наблюдением.
    Подробнее – https://vyvod-iz-zapoya-reutov15.ru/

  2. RichardTon RichardTon

    A helpful website healthfare.ca covering health, balanced nutrition, and daily wellness. Users will discover practical guides on food choices, along with useful recommendations. Additional content includes product overviews. Special attention is given to healthy habits, diet and nutrition, exercise and fitness, self-care, and general wellness.

  3. Перед началом лечения человек получает информацию о выбранном методе, сроке действия, возможных побочных реакциях, правилах поведения и ограничениях. Врач отвечает на вопрос, насколько вариант сочетается с сопутствующими заболеваниями и лекарственной терапией. Информированное согласие обязательно перед проведением вмешательства. Если требуется срочный вывод из запоя, сначала выполняется снятие абстинентного синдрома, а кодирование переносится на безопасный период. Просто провести укол без подготовки при наличии алкоголя в крови было бы неоправданно опасным.
    Подробнее – виды кодирования от алкоголизма

  4. Режим 24/7 — это не только открытая дверь, но и правильно расставленные акценты по часам суток. Ночью — больше поведенческих опор и короткие видеовставки, днём — контроль витальных, уточнение плана гидратации и питания, вечером — «световые правила» и дыхательные циклы. В каждом окне мы знаем, что именно проверяем и что считаем успехом: так исчезают импровизации и ненужные «усиления», а пациент получает предсказуемую траекторию.
    Подробнее – http://narkologicheskaya-klinika-v-stavropole15.ru/narkolog-stavropol/

Leave a Reply

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