• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Instance ID wrong?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Instance ID wrong?


  • Subject: Instance ID wrong?
  • From: Anjo Krank <email@hidden>
  • Date: Tue, 2 Dec 2008 10:45:58 +0100

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@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Instance ID wrong?
      • From: Chuck Hill <email@hidden>
    • Re: Instance ID wrong?
      • From: Andrew Lindesay <email@hidden>
  • Prev by Date: Re: WebObjects in Xcode 3.1: where are the project templates?
  • Next by Date: Error with Cross-Model Relationship
  • Previous by thread: Re: WebObjects in Xcode 3.1: where are the project templates?
  • Next by thread: Re: Instance ID wrong?
  • Index(es):
    • Date
    • Thread