[omniORB] Question about passing arguments to preinvoke()

Duncan Grisby duncan at grisby.org
Wed Jun 14 16:27:17 BST 2006


On Tuesday 13 June, "Michael Shearer" wrote:

> I'm trying to figure out a nice and clean way of passing arguments to
> the preinvoke primitive when using a CORBA servant locator.  I have an
> object that needs two parameters in the constructor when creating the
> instance.  Obviously I could add a primitive to initialize this data
> separately but ideally I'd like some way of passing the 2 arguments to
> the preinvoke.  What I'm doing right now is basically setting 2 member
> variables in the servant locator which are used in the preinvoke.  These
> 2 member variables are currently locked with a mutex as I'm not sure if
> the POA ensures that no other object references will be requested before
> the previous one has been dispatched. Is that the best I can do or am I
> missing something?  Here's what it looks like in a nutshell:

I'm confused about what you're trying to do. The whole point of a
servant locator is that the servant is created/located on demand, when a
client calls an operation on the object. preinvoke can thus be called at
any time, as determined by the clients. How do you set the member
variables at the right time?  I suspect that you perhaps don't want to
be using a servant locator at all.

Can you explain what you are doing that makes you think you need to do
this?

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list