[omniORB] Weird behavior with omniORBpy 1.x and ServantLocators

JohnD.Heintz JohnD.Heintz
Thu, 9 Aug 2001 10:30:19 -0500


On Thursday 09 August 2001 04:03, Duncan Grisby wrote:
> On Wednesday 8 August, John D. Heintz wrote:
> > In the sample code below we will get:
> > AttributeError: "None" object has no attribute "doSomething"
> >
> > Does anyone have any idea?  Are we doing something wrong?
>
> The problem is that the POA does nothing to prevent concurrent calls
> to your ServantLocator and servant. You have a race condition where

Really?  Do interceptors behave the same way?

> two threads can come in at roughly the same time. The first thread
> calls postinvoke() and clears the DomainObject before the second
> thread gets to invoke the servant's method.

Well yeah, that sure would be the case.

>
> You need to implement some sort of concurrency control. Note that
> using a single thread policy POA is not sufficient, since the three
> calls preinvoke(), servant method, postinvoke() are separate calls --
> other calls can occur between them.

I can do that, but I was hoping that the POA would take care of it for me=
=20
just for optimization reasons.  Do I need to do the same thing when we us=
e=20
interceptors with omniORB4?

>
> Cheers,
>
> Duncan.

--=20
=2E . . . . . . . . . . . . . . . . . . . . . . .

John D. Heintz | Senior Engineer

1016 La Posada Dr. | Suite 240 | Austin TX 78752
T 512.633.1198 | jheintz@isogen.com

w w w . d a t a c h a n n e l . c o m