[Zope] Re: CoreSessionTracking
Uwe C. Schroeder
Uwe.Schroeder@contrada.de
Fri, 20 Apr 2001 07:44:26 +0200
-----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=
=20
save any sessiondata in a auth method. I traced through loginmanager - bu=
t=20
there are no exceptions in the code (none relevant). The general architec=
ture=20
leads me to the asumption that the exception must be generated in the Zop=
e=20
core. I did something else: I use the SessionID to store values in a SQL=20
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 anywa=
ys=20
thats no big impact. But it would have been nice to use the=20
CoreSessionTracking - methods, since they're more flexible. Lucky me that=
the=20
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 fro=
m
> 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 i=
t
> 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 Z=
ope
> > 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 i=
sn't
> called directly, but gets called on any object a user tries to view wit=
hout
> proper authentication.
> I don't know much about ZODB transactions, but probably you know if the=
re'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=F6der
>
> - --
> Uwe C. Schr=F6der ConTrada Consult=
ants
> 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=3D
> =3DIV1E
> -----END PGP SIGNATURE-----
- --=20
Uwe C. Schr=F6der
- --
Uwe C. Schr=F6der ConTrada Consultan=
ts
Lindenstrasse 15 Tel/Fax: +49 8294 80=
070
D-86477 Adelsried Mobil: +49 172 853=
2352
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE638y9TJbO78VG0aIRAp4+AJ9QN7PHcy4ukph+gUNetSOlVk+DEgCdHHKd
tqugd0ZtS5XG0oNoDTy6ASY=3D
=3DmBWe
-----END PGP SIGNATURE-----