Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: DB

zope2 rdb and reconnect

 

 

Zope db RSS feed   Index | Next | Previous | View Threaded


zope at kevinkal

Dec 6, 2007, 3:00 AM

Post #1 of 3 (581 views)
Permalink
zope2 rdb and reconnect

I am wondering about the behavior of the publisher in regards to
rdb.ZopeDatabaseAdapter when a Retry is raised do to a
mysqldba.OperationalError.

From what I understand, when Publisher recieves a Retry it again
retries the request, but in my current case I see the error message.
Is my understanding correct that this is what should happen? If so,
does this hold true for xmlrpc calls as well?

I am using Zope2.9.8-Final, Five 1.4.4, and making requests with xmlrpc.


-Kevin
_______________________________________________
Zope-DB mailing list
Zope-DB[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-db


zope at kevinkal

Dec 9, 2007, 10:42 AM

Post #2 of 3 (524 views)
Permalink
Re: zope2 rdb and reconnect [In reply to]

Found the problem.
I back ported this connector from a zope3 app. For the retry, being
raised was rdb.interfaces.Retry, I changed it to raise ZPublisher.Retry,
which works for zope2.

Maybe there is a better way for zope2, but this works.

-Kevin

Brian Sutherland wrote:
> On Thu, Dec 06, 2007 at 12:00:58PM +0100, zope[at]kevinkal.com wrote:
>
>> I am wondering about the behavior of the publisher in regards to
>> rdb.ZopeDatabaseAdapter when a Retry is raised do to a
>> mysqldba.OperationalError.
>>
>> From what I understand, when Publisher recieves a Retry it again retries
>> the request,
>>
>
> The zope3 publisher definitely does this. Does the Zope2 publisher
> recognize Retry as well? (It probably should)
>
>
>> but in my current case I see the error message. Is my
>> understanding correct that this is what should happen? If so, does this
>> hold true for xmlrpc calls as well?
>>
>> I am using Zope2.9.8-Final, Five 1.4.4, and making requests with xmlrpc.
>>
>>
>> -Kevin
>> _______________________________________________
>> Zope-DB mailing list
>> Zope-DB[at]zope.org
>> http://mail.zope.org/mailman/listinfo/zope-db
>>
>>
>
>


_______________________________________________
Zope-DB mailing list
Zope-DB[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-db


dieter at handshake

Dec 10, 2007, 10:22 AM

Post #3 of 3 (527 views)
Permalink
Re: zope2 rdb and reconnect [In reply to]

zope[at]kevinkal.com wrote at 2007-12-9 13:42 -0500:
>Found the problem.
>I back ported this connector from a zope3 app. For the retry, being
>raised was rdb.interfaces.Retry, I changed it to raise ZPublisher.Retry,
>which works for zope2.
>
>Maybe there is a better way for zope2, but this works.

A better way would be to raise an exception derived from "ConflictError".

Such an exception would cause ZPublisher to perform the "Retry"
and with a good name for your new exception you would clearly see
what happened in case, the exception were repeated.



--
Dieter
_______________________________________________
Zope-DB mailing list
Zope-DB[at]zope.org
http://mail.zope.org/mailman/listinfo/zope-db

Zope db RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.