Hi,

I have a problem with the Adaptor. In transaction.c, it says:

/*
* Prepare appreq to use the given instance. The instance must be locked.
 */
static void tr_prepareToUseInstance(WOAppReq *appreq, WOInstanceHandle instHandle)
{
   _WOInstance *instance;

   instance = ac_lockedInstance(instHandle);
   if (instance)
   {
      /* this will prevent the instance from being freed */
      /* note that we are holding a write lock on the app */
      instance->pendingResponses++;
/* This number is used in req_reformatRequest when updating the request URL */ memcpy(appreq->instance, instance->instanceNumber, WA_MAX_INSTANCE_NUMBER_LENGTH);
      appreq->port = instance->port;
   }
}

which downs the line leads to the "wrong" instance ID given to the app. I.e. say you request

/cgi-bin/WebObjects/Foo.woa/20/...

then, if instance 20 does not exist or fails to reply quickly enough, the adaptor changes this to free instance 10 and rewrites the request to

/cgi-bin/WebObjects/Foo.woa/10/...

before proceeding. Now, the problem is that there may several reasons for 20 not to reply, but now instance 10 has no way of knowing that the session that doesn't exist in it's own session store didn't really expire but comes from a temporarily unavailable instance 20. Does anyone have enough inside into the adaptors to say why the request is rewritten? It looks pretty dumb to me, but maybe there is a good reason... I think if should store the old request add at least a header to indicate that this is not the intended instance.

At least the adaptor should keep a log of the occurences of a dead instance, otherwise such a thing is a bitch to track down...

Cheers, Anjo



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to