From: alan r. <ru...@ru...> - 2004-01-21 20:59:51
|
> Thank you very much. But we don't use zeo. I just want to fire this sp and > don't need any response. Are there any other way to solve the problem? > > Rebecca Rebecca, I would *highly* suggest installing and running ZEO. It will make life a lot easier. But if you DO NOT want to install ZEO the only thing left is firing off a thread. You really need to be careful when you use threads. Especially in a high traffic'ed system. What I would do then is: - create a payload (path to stored_proc in ZODB, paramters you want to call it with and a token) - fire off a Thread in a external method that takes this payload and executes it and renders results to the filesystem - then you would show them a page with metarefresh checking for token. once it appears on the filesystem parse the info back. These are the only two solutions that would be available in any framework (well twisted has another mechanism). darn. I just looked for an example that kapil sent me awhile ago. cant find it ;-( you can pass the thread a database context. and then let the thread do the traversal to the stored_proc. get the results and do something with them. look at CMFLinkChecker in the collective - I believe they do something similiar. KEY! DO NOT WRITE TO THE ZODB WITH THIS BORROWED CONNECTION! The ZODB will complain because it knows what threads have it opened and since your passing it to a foreign thread it will gripe since its not registered. alan |