[Zope] Session and objects

Ulla Theiss u.theiss@eurodata.de
Mon, 30 Sep 2002 13:10:20 +0200


Hi Bodgan,

I had the same problem as long as I used python-scripts to store objects
in the SESSION-data.
Now I transferred my project to a product and now it's possible to store
self-defined objects 
in the SESSION-data. But I don't know why ...

Ulla.

"Bo M. Maryniuck" schrieb:
> 
> Hello, all.
> 
> I would like to handle session events. For example: user closes browser, etc.
> Seems that is not possible, so I desire do it via the Session. But... is it possible
> to add somethin non-string'ish into the SESSION? For example, I would like add
> the an DB connecton or DB cursor or any other object.
> But Zope tells me something like:
> 
> Error Type: InvalidObjectReference
> Error Value: Attempt to store an object from a foreign database connection
> 
> Traceback (innermost last):
>   File /opt/zope/lib/python/ZPublisher/Publish.py, line 150, in publish_module
>   File /opt/zope/lib/python/ZPublisher/Publish.py, line 114, in publish
>   File /opt/zope/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook
>     (Object: storedProcedure)
>   File /opt/zope/lib/python/ZPublisher/Publish.py, line 102, in publish
>   File /opt/zope/lib/python/Zope/__init__.py, line 173, in commit
>   File /opt/zope/lib/python/ZODB/Transaction.py, line 234, in commit
>   File /opt/zope/lib/python/ZODB/Connection.py, line 346, in commit
>     (Info: (('Products.Transience.TransientObject', 'TransientObject'), '\x00\x00\x00\x00\x00\x00\x00\x0b', ''))
> InvalidObjectReference: (see above)
> 
> Is here some workaround or advantage?
> 
> --
> Regards, Bogdan
> 
> BASIC:
>         A programming language.  Related to certain social diseases
>         in that those who have it will not admit it in polite company.
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )