Servant to Corba Object

Servant to Corba Object

Post by Vladislav Vladimiro » Tue, 15 Jul 2003 22:43:08



Hi all,
 does anyone knows how to map(transform) Servant to Corba Object
 
 
 

Servant to Corba Object

Post by Arthur J. Musgrov » Wed, 16 Jul 2003 00:02:46


PortableServer::POA::servant_to_reference.

-- A.J.


Quote:> Hi all,
>  does anyone knows how to map(transform) Servant to Corba Object


 
 
 

Servant to Corba Object

Post by Vladislav Vladimiro » Tue, 15 Jul 2003 23:59:46


I'm asking in implementation point of view
 
 
 

Servant to Corba Object

Post by Vladislav Vladimiro » Wed, 16 Jul 2003 00:36:45


No ,I mean how to implement this ;-)
I realised that if there is a way to get Repostiroy ID of Servant then there
will be no problem for this.....
 
 
 

Servant to Corba Object

Post by Douglas C. Schmi » Wed, 16 Jul 2003 01:26:31


Hi Vladislav,

Quote:>> No ,I mean how to implement this ;-)

It's not clear what you mean.  At any rate, given that there are a
bunch of open-source ORBs available that implement the POA, why don't
you just take a look at one of them to see how to implement this?!

Thanks,

        Doug
--
Dr. Douglas C. Schmidt, Professor           TEL: (615) 343-8197
Electrical Engineering and Computer Science FAX: (615) 343-7440
Vanderbilt University                       WEB: www.cs.wustl.edu/~schmidt/

 
 
 

Servant to Corba Object

Post by Arthur J. Musgrov » Wed, 16 Jul 2003 01:27:21


Perhaps I don't understand the question. The RepositoryID doesn't really
come in to play with these APIs. Its the ObjectID that the POA uses. Even if
you "lost" the ObjectID, you don't need it to get at the object reference
for an activated servant.

If you have a servant, and it is not activated, then there is no map to an
object reference (because servants and objects are different).

If you activated using activate_object, that returned a
PortableServer::ObjectId. You can use that object ID with id_to_reference to
get the reference for that object.

If you activated with activate_object_with_id, then you just use the ID you
passed in with id_to_reference.

If you have only available the activated servant, then you can pass that
servant in to servant_to_reference to get back the object reference.

You can also use _this() on the servant to get the reference. If the servant
is not activated, and it allows implicit activation, it will return an
object reference. If it is already activated, it will return an object
reference.

-- A.J.


Quote:> No ,I mean how to implement this ;-)
> I realised that if there is a way to get Repostiroy ID of Servant then
there
> will be no problem for this.....

 
 
 

1. Why are servant managers CORBA objects

 Reading page 480 of 'Advanced CORBA Programming with C++' it says that
servant managers are themselves CORBA objects. Why is this?

I would have thought that SMs are objects that sit *behind* the real
CORBA objects and merely reflect a particular approach to implementing
the functionality of the server.

What am I missing?

--
Cheers, Des

Sent via Deja.com http://www.deja.com/
Before you buy.

2. Hex character *input* w/iostreams?

3. Accessing actual servant object from corba interface object

4. Fresco and ViewFinder

5. Servant , CORBA objects - Whats the diff?

6. Helpdesk and Netscape Communicator 4.01

7. Why Servant manager a CORBA object?

8. Update / Status of MS Browser Library ???

9. HELP: transient servant/corba objects and self-destruction

10. Persistent Object Id's after registering objects using Servant Manager

11. Reference Counted Servants with Servant Activator

12. Question about POAs, Servant Activators, and temporary servants