需要幫助,我有一個定義的IDL文件,它看起來像這樣:CORBA IDL + + Java的:寫作僕人
module Banking {
typedef string Transactions[5];
typedef long AccountId;
interface Account {
exception InsufficientFunds {};
readonly attribute double balance;
long lodge(in double amount);
long withdraw(in double amount) raises (InsufficientFunds);
readonly attribute Transactions transactions;
};
interface Bank {
long accountCount();
double totalMoney();
Account account(in AccountId accNr);
};
};
我與IDLJ編譯。我定義了一個BankServant,客戶使用它來與服務器通信,並且我有一個工作程序,幾乎實現了所有的方法。我唯一的問題是,我不知道如何實現account(in AccountId accNr)
方法,這反過來會返回適當的Account對象。由於我不知道CORBA,而且我只是在幫助一位朋友,所以我想問一些解決方案/示例/ tutorials,這些解決方案/示例/ tutorials可以幫助我破解一個簡單但工作的佈局來處理這種情況。
預先感謝您。
非常感謝 - 我不想全面瞭解CORBA,因爲這應該是一個15分鐘的幫助任務,但即使閱讀了一些教程,我也沒有幾個問題。 – zeroDivisible 2010-12-02 05:17:52