INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

Passing objects to remote methods as param.

Passing objects to remote methods as param.

(OP)

I would like to know, how can one program pass the reference of on of its object (of the interface it implements) to another program as a parameter of the remote object's method? I would like to know how the other program will get the first programs object reference, so that it can invoke its function subsequently.

I have the idl as follows:

module Simple
{

   interface myInterface
   {
        void myObject_fn();
   };

    interface SimpleObject
    {
        void
        call_me(in myObject obj);
    };

};


The myInterface is implemented by one program (program 1) and the SimpleObject interface is implemented by another program (program 2).

The program1 does initialization steps like  activation of myInterface implementation class object in the POA, activating POA manager, creating a thread that executes orb.run().  Similarly, program 2 also does the initialization.

Now in the main thread, after the program1 does lookup of SimpleObject through IOR and passes the  myInterfaceImpl._this() to the call_me() function, the program2 further is unable to call the myObject_fn().

Could you please help me regarding this?

RE: Passing objects to remote methods as param.

Hi Vijay.,

 In the call_me function., instead of passing the
 myIntercaceImpl._this() try the following:

 In the Program1 i.e myInterface Implemenation., after getting the reference of the SimpleObject Server., pass the servant stub.,meaning

 myIntefaceServant myIntfRef = new myIntefaceServant();

 now pass this one to the call_me function .,

 Let me know this helps.,

 Regds
 Muthu.


RE: Passing objects to remote methods as param.

Hi Vijay.,

 In the call_me function., instead of passing the
 myIntercaceImpl._this() try the following:

 In the Program1 i.e myInterface Implemenation., after getting the reference of the SimpleObject Server., pass the servant stub.,meaning

 myIntefaceServant myIntfRef = new myIntefaceServant();

 now pass this one to the call_me function .,

 Let me know this helps.,

 Regds
 Muthuvelan Swaminathan.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close