import-bot (20212) [Avatar] Offline
#1
[Originally posted by alteh]

Hi,

I'm using CORBA Java and C++ components so that they can
interoperate over CORBA. I've followed the examples
to create CORBA C++ and Java clients (i.e. init the ORB,
create SessionManager and Session, lookup component factory
reference, create factory, create component reference,
instantiate component, then call a method).

Now I want these components to be long-living so they can
retain state (e.g. one for Fred and one for Bob, containing counters).
I don't want instances to come and go per method call.
How do I keep them alive after instantiating them?
And how do I identify one from the other?
Is it all done using the Name Service?

Also, isn't there a default ORB since Jaguar is an ORB itself?
It should be possible not to have to set up another ORB,
Manager and Session...etc. in order to make an intercomponent
call. I just want to call an existing instance.
(BTW - the instance is in a loop like a Service Component)
Is this possible? If so, I haven't found an example anyway.

Thanks,

Alwyn
import-bot (20212) [Avatar] Offline
#2
Re: CORBA Components & InterComponent Calls
[Originally posted by mbarlotta]

> Now I want these components to be long-living so they can
> retain state (e.g. one for Fred and one for Bob, containing counters).
> I don't want instances to come and go per method call.
> How do I keep them alive after instantiating them?

Don't turn on the auto demarcation/deactivation

> And how do I identify one from the other?
> Is it all done using the Name Service?

The variable reference always points to the instance that is bound to your
session

>
> Also, isn't there a default ORB since Jaguar is an ORB itself?
> It should be possible not to have to set up another ORB,
> Manager and Session...etc. in order to make an intercomponent
> call. I just want to call an existing instance.
> (BTW - the instance is in a loop like a Service Component)
> Is this possible? If so, I haven't found an example anyway.

Not sure what you mean.
You can reuse the session to lookup several different components.

HTH

Mike