Does the host application calls noteVbContentDone at end?

Asked by Jatin

I have to free some resources at end of the transaction. So, when squid decides to free up the resources associated with the transaction or it decides no more to call ecap adapter for the transaction then does it always call noteVbContentDone ?

Question information

Language:
English Edit question
Status:
Answered
For:
eCAP Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Alex Rousskov (rousskov) said :
#1

TLDR: The adapter transaction destructor should check whether any cleanup is needed. If you want to cleanup adapter state as soon as possible, then you may want to add another cleanup check inside noteVbContentDone() and other notification methods.

Roughly speaking, the host transaction must call noteVbContentDone() when it expects to see no additional virgin body content. There are several grey areas here. For example, if the host transaction is being destroyed unexpectedly (i.e., the HTTP client has closed the connection and the host application has decided to terminate all associated transactions), then the host transaction may not call any eCAP notification methods at all -- just the adapter transaction destructor. Also, it is not clear whether noteVbContentDone() may precede the very _last_ noteVbContentAvailable() call.

Please do not assume that the adapter has retrieved all virgin content when noteVbContentDone() is called. This notification is not about what the adapter has retrieved (from the host) but about what the host has available (for the adapter).

Can you help with this problem?

Provide an answer of your own, or ask Jatin for more information if necessary.

To post a message you must log in.