[Zope] Session and objects

Bo M. Maryniuck b.maryniuk@forbis.lt
Wed, 2 Oct 2002 10:07:13 +0200


On Wednesday 02 October 2002 08:04, Dario Lopez-K=C3=A4sten wrote:
> Well, the way we did it is not very persistent, but we have managed to =
get
> per user-connections utilising an external method, that opens and close=
s an
> oracle connection for each sql-method.=20
That exactly what I did quite before. But this idea not good, because:
 - You have no complete Oracle security: you need not open connection onl=
y,=20
but run some SQL's to set your rights and when logout, you should run oth=
er=20
SQL's to make session close (in Oracle).=20
 - In this case you solution will be that slow.

[SKIPPED]

> Re making these connections persistent or poolable, I really don't know=
 how
> to tackle that...
We have the same as you mentioned above (and I skipped :-) but also I've =
did a=20
pool, which already doing this persistent. I did it in this way:
 - Develope separate product for login/logout, which creates the connecti=
on=20
and puts new connection to the pool and writes to the session the ID of t=
he=20
new connection.
 - Develope my own SQL Method, which supports:
   a) SQL query
   b) Stored procedure
   c) Bind variables (for IN/OUT and overloaded procedures)
 - Glue it all together: my SQL Method "understands" which connection it=20
should use from the pool.
 - Make a good help and nice icons ;-)

--=20
Regards, Bogdan

#define QUESTION ((bb) || !(bb)) /* Shakespeare */