-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 16 April 2001 20:47, Chris McDonough wrote: Hi Chris, the commit doesn't work as expected. My bet it that SessionTracking won't save any sessiondata in a auth method. I traced through loginmanager - but there are no exceptions in the code (none relevant). The general architecture leads me to the asumption that the exception must be generated in the Zope core. I did something else: I use the SessionID to store values in a SQL database. That works. So it really has something to do with the storage. For now I use the SQL solution - since the project needs a database anyways thats no big impact. But it would have been nice to use the CoreSessionTracking - methods, since they're more flexible. Lucky me that the site has no big traffic - SQL slows things down. Thanks for you help.
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-----
- -- 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 iD8DBQE638y9TJbO78VG0aIRAp4+AJ9QN7PHcy4ukph+gUNetSOlVk+DEgCdHHKd tqugd0ZtS5XG0oNoDTy6ASY= =mBWe -----END PGP SIGNATURE-----