Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Complex return type

Status
Not open for further replies.

vgrigas

Programmer
Jan 13, 2010
1
0
0
DE
Hi!

I have a problem using JacORB with complex return types and I can't solve it.

My IDL Definition is (shorted):

Code:
interface Session;
interface Bank
{
    Session GetSession();
    void    DropSession(in Session theSession);
};
 
interface Session
{
    Account GetAccount(in long accountID, in string pin);
};


I´ve implemented both classes using the tie approach, my Java code looks like this:

Code:
public class BankOpImpl implements BankOperations
{ ...
   public Session GetSession()
   {
    ...
   }
...
}

Now I really don´t know, how I can return an object that implements the interface Session (JacORB created for both classes "Bank" and "Session" die Java classes/interfaces "*", "*Helper", "*Holder", "*Operations", "*POA", "*POATie").

I just can't return something like

Code:
return new SessionPOATie(new SessionOpImpl());

because SessionPOATie does not implement the interface Session. Even more, no generated class does this! So I do not know how to return just an object that implements Session. (The "father" object "Bank" I can look up well using a nameservice (exactly like described in the Tut), but I don’t want to give each member of the father object a separate name, of course.

Can anybody help me?

Thank you very much for your help,

Vasilios
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top