[Zope] Re: Page Template help

2008-08-10 Thread Philipp von Weitershausen

Garito wrote:
Could someone point me where the page template code decide if an 
expression is a path expression or a string or python one, please?


I'm studying the zope page template classes and I would like to 
understand where this decision is taken


Products.PageTemplates.Expressions.createZopeEngine():

for pt in ZopePathExpr._default_type_names:
e.registerType(pt, ZopePathExpr)

ZopePathExpr._default_type_names contains, among others, the name 
'standard', which makes this expression type the default expression type.


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] Page Template help

2008-08-10 Thread Garito
Hi!
Could someone point me where the page template code decide if an expression
is a path expression or a string or python one, please?

I'm studying the zope page template classes and I would like to understand
where this decision is taken

Thank you so much!

-- 
Mis Cosas
http://blogs.sistes.net/Garito
Zope Smart Manager
http://blogs.sistes.net/Garito/670
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Asking advice on best way to perform an interaction with an external webservice

2008-08-10 Thread Dieter Maurer
Marco Bizzarri wrote at 2008-8-2 10:11 +0200:
>I've to implement a SOAP client, and I wonder  how to interact with
>the external webservice from a transactional point of view: I don't
>want to call twice the same service because of ZPublisher redoing
>transactions, and this sort of things.

For Zope 2.8, the code to interface with the transaction
system is in "Shared.DC.ZRDB.TM".
Zope's database adapters (e.g. "Products.ZPsycopgDA.db")
provides examples for its use.


As Andreas told me, there are more modern ways in e.g. Zope 2.11.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Asking advice on a Zope "stuck" (or: what did I do wrong?)

2008-08-10 Thread Dieter Maurer
Marco Bizzarri wrote at 2008-8-2 09:33 +0200:
> 
>I installed DeadlockDebugger, and tried to have a dump from it, but it
>is unable to answer, at leasts it seems to me.
>
>So, I followed the recipe from ZopeLabs:
>
>http://www.zopelabs.com/cookbook/1073504990
>
>and got a traceback from gdb.
>
>info threads gives the following:
>
>* 5 Thread 0xb5b29b90 (LWP 17713)  0xe410 in __kernel_vsyscall ()
>  4 Thread 0xb5322b90 (LWP 17714)  0xe410 in __kernel_vsyscall ()
>  3 Thread 0xb4b21b90 (LWP 17715)  0xe410 in __kernel_vsyscall ()
>  2 Thread 0xb4320b90 (LWP 17716)  0xe410 in __kernel_vsyscall ()
>  1 Thread 0xb7d4b8c0 (LWP 17687)  0xe410 in __kernel_vsyscall ()
>
>
>I'm including the traceback. As you can see, the last lines tell (for
>all the threads) are:
>
>
>  File "/var/local/zope28/base288/lib/python/Shared/DC/ZRDB/Results.py",
>line 55, in __init__
>if n != name: aliases.append((n, SQLAlias(name)))

This is unbelievable.

The above Python code should not block (and not cause an infinite
recursion) other than for memory requests.

At C-level, you see to be in a kernel call.
Look closer at the C level tracebacks to find out which kernel
call this is.

You may need to have a Python with debug symbols to get reliable
C level tracebacks.



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: Re: [Zope] Mouting + Logging Errors after Zope Upgrade 2.7.4 --> 2.11.1

2008-08-10 Thread Dieter Maurer
Wolfgang Lausenhammer wrote at 2008-8-4 09:56 +0200:
>I just tried to lock the file manually and it works
>But I recognized when zope reports those errors with locking, the reported 
>file can't be opened in the filesystem also, so it is really locked. It 
>seems that zope doesn't unlock it and so if zope tries to access it again 

Zope locks the file to prevent concurrent use of the storage (which is
not supported and would corrupt the storage).

Thus, while a process accessing a storage is running, another process
is prevented from opening it.

When a process finished, the operating system would automatically
release the lock (when the process has not done it itself).

>Altough the error doesn't have any effect on the website I'm running... 
>Kinda strange..

Looks like there was a running Zope process -- the lock of which
prevented the start of a new one -- as it should be...



-- 
Dieter
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )