[Zope] Re: CoreSessionTracking
Chris McDonough
chrism@digicool.com
Mon, 16 Apr 2001 14:47:26 -0400
Hi Uwe,
If possible, continue to cc the Zope list on this... thanks...
You can explicitly cause a transaction to be committed, but not in DTML or
in a Python Script. You'll need to use an external method...
Here's an example of an function which does this:
def commit_trans():
get_transaction().commit()
Make an external method named commit_trans, reference this function from
within the external method UI, and then from dtml, you can do this:
<dtml-call commit_trans>
... right before the raise. This should save the session data, then it
won't matter if you raise afterwards in the DTML.
HTH,
- C
----- Original Message -----
From: "Uwe C. Schroeder" <Uwe.Schroeder@contrada.de>
To: "Chris McDonough" <chrism@digicool.com>
Sent: Monday, April 16, 2001 2:32 PM
Subject: Re: CoreSessionTracking
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 16 April 2001 20:22, you wrote:
> Hi Uwe,
>
> Thanks for the concise explanation of the problem... I'm cc'ing the Zope
> list on this... it's best to keep this stuff on the Zope list because the
> message archive helps other folks out (including me! ;-)
>
> I think what's happening here is that the dtml-raise in the middle of the
> first snippet of DTML below aborts the ZODB transaction, and so the
session
> data is never saved...
>
> Is there a way to prompt for authorization without doing a DTML raise?
> I've never used LoginManager...
>
Hi,
wow - that's a quick answer.
No I don't think that there's another way to do handle loginmanager.
Loginmanager gets called on an authorization exception. The LoginForm isn't
called directly, but gets called on any object a user tries to view without
proper authentication.
I don't know much about ZODB transactions, but probably you know if there's
a
way to finish the old transaction and start a new one ?
Thanks - I'll try to remove the raise.
Regards
Uwe C. Schröder
- --
Uwe C. Schröder ConTrada Consultants
Lindenstrasse 15 Tel/Fax: +49 8294 80070
D-86477 Adelsried Mobil: +49 172
8532352
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE62zrRTJbO78VG0aIRAhVvAKCq1jMYJgKai9x4qBLCKS1y8rAigACffDfG
IqFwZQA8KO4a6d5++Qpik/o=
=IV1E
-----END PGP SIGNATURE-----