[Zope] PopyDA and DBMS Transactions
Hi I heve finally installed the PopyDA0.7 that is a Multithreaded DA (multiple concurrent access on the DBMS) Now I'm doing tests to verify the DBMS transactions (Postgress support DB transations): But something doesn't work as expected: I summarize my tests: I have two DTML Documents: first DTML: now called D1 ...1st sql statement: select * from customers where name='white' ...time.sleep(10) #external function that invokea the sleep function (10 sec) ...2dn sql statement: update customer set descr='Updated 1' where customer='white' Second DTML: now called D2 ...sql statement: update customer set descr='Updated 2' where customer='white' with two browser I called: D1 and then D2 My expected Behaviour was: -With the first statement of D1, Postgres would locks the table The update of D2 has to wait to write because the table is locked only when D1 has finished, D2 commit As result the updated field has to result "Update 2" and not 'Update 1" With the option Auto-commit mode ON the Behaviour was: -D2 autocommit without waiting the end of D1! (as espected with autocomm. off) As result the updated field has to result "Update 1" (because D1 ended after D1) With the option Auto-commit mode OFF the Behaviour was: -D2 autocommit without waiting the end of D1!! Why??!?!??!? -When D1 finished an error occurs: Error Type: ProgrammingError Error Value: ERROR: Can't serialize access due to concurrent update As result the updated field has to result "Update 2" FAULT!! HOW CAN I HAVE TO DO in order to build a concurrent transaction Application with Popy and Postgress??? Thank you Very Much for your Help! Paolo Quaglia Information Technology Coordinator Sitek S.p.A. [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] PoPy1.4 Installed:
Hi Here Is some tips to install PoPy DA on a RH6.2 First: You have to use Postgres7.0 with PoPy1.4 - download the Postgres7.0 with the development libraries (the development RPM from the Postgres download) - Download the Popy1.4.1 and the ZPopyDA0.7 - untar Popy1.4.1 - $./configure - change the Makefile ... the include path isn't /usr/include/postgres but it's /usr/include/pgsql - the file /usr/include/pgsql/os.h is a broken link .. we have to solve this prob download the source distribution of Posrgress7.0 (not the RPM) and substitute the broken link os.h with the file linux.h ... rename linux.h->os.h and put it in the correct path (/usr/include/pgsql) - make will now finish without errors!! and you get the Popymodule.so - copy the popymodule.so in the [zopedir]/lib/python - Untar the ZPopyDA and go to the ZPoPyDa directory in the lib/python/Products dir of Zope - modify the PoPy_db.py file changing, __compatibility__ = ('1.4','1.4.1') - Launch Zope and All WORKS!! Hope this Help Paolo Quaglia Information Technology Coordinator Sitek S.p.A. [EMAIL PROTECTED] ___ Zope maillist - [EMAIL PROTECTED] 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 )
RE: [Zope] mx ODBC Connection
Hi Phil, I have done what you have suggested and Zope start without errors. I can build a new ZmxODBC connection to a SQL server 7.0, and Zope doesn't return errors. Now I tried to browser the DB (that already exists) and I got this Error: Error Type: InterfaceError Error Value: SQL type (code -9) not implemented I tried to make a simple select in a already existent Table ex: select * from T_TIPO but the same error occurs I created some new table with the test query utils in Zope and no error was presented. I can make select in those new tables. How is the Problem?? With The ZODBCDA I can browse the DB and all works? Any Idea? Any Suggestion? Thanks Very Much Paolo Quaglia > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of > Philipp Auersperg > Sent: Tuesday, December 12, 2000 12:51 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [Zope] ODBC Connection > > > the ZmxODBC DA uses the Zope-independent product mxODBC, that > provides a generic > Python DB API compliant ODBC interface to Python. > > ZmxODBC installs mxODBC into lib/python/Shared/mx. The problem is > that this path is not in the default PythonPath. > > Solution: > move the mx directory from lib/python/Shared into a directory > that's member of PythonPath (for example lib/python). > > phil ___ Zope maillist - [EMAIL PROTECTED] 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 )
RE: [Zope] I SOLVED!!
Sure I will post My detailed solution in a few days!! Ciao to all Paolo Quaglia -Original Message- From: Eric Walstad <[EMAIL PROTECTED]> Date: Fri, 15 Dec 2000 11:10:45 -0800 Subject: RE: [Zope] I SOLVED!! > Hi Paolo, you should post your solution to the mailing list so that > if > others run into your same problem they can find your solution by > searching > ht emailing list archives. > Just a thought. > Eric. > > // -Original Message- > // From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf > Of Paolo > // Quaglia > // Sent: Friday, December 15, 2000 10:26 AM > // To: [EMAIL PROTECTED] > // Subject: [Zope] I SOLVED!! > // > // > // THANKS TO ALL for your help But I solved the Probs with the PoPy > DA. > // > // Ciao > // > // Paolo > // > // > // > // > // ___ > // Zope maillist - [EMAIL PROTECTED] > // 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 ) > // > ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] I SOLVED!!
THANKS TO ALL for your help But I solved the Probs with the PoPy DA. Ciao Paolo ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] PoPy module finally compiled but there is another prob
Hi to all Finally I compiled the Popy module (the 1.4) and I obtained the PoPymodule.so file I copied the module in the [ZopDir]/lib/python directory I installed the ZPoPyDA.0.7 but When I start Zop this error occour: Traceback (innermost last): File "/usr/local/Zope-2.2.4-linux2-x86/lib/python/OFS/Application.py", line 397, in import_products product=__import__(pname, global_dict, global_dict, silly) File "/usr/local/Zope-2.2.4-linux2-x86/lib/python/Products/ZPoPyDA/__init__.py", line 32, in ? import sys, os, Globals, DA File "/usr/local/Zope-2.2.4-linux2-x86/lib/python/Products/ZPoPyDA/DA.py", line 35, in ? from PoPy_db import DB File "/usr/local/Zope-2.2.4-linux2-x86/lib/python/Products/ZPoPyDA/PoPy_db.py", line 37, in ? raise "The PoPy module is old: Update your version of PoPy" The PoPy module is old: Update your version of PoPy Has someone had the same probs? How do you think the problem is? Thanks Paolo Quaglia ___ Zope maillist - [EMAIL PROTECTED] 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 )
RE: [Zope] HELP with Postgress!! HELP!!
Thank you very much to all for the quick replies. I'm fighting compiling the modules ... and trying to solve the prob I'll let you know ... :) Ciao Paolo Quaglia > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of César A. K. Grossmann > Sent: Thursday, December 14, 2000 6:49 PM > To: Paolo Quaglia > Cc: [EMAIL PROTECTED] > Subject: Re: [Zope] HELP with Postgress!! HELP!! > > > > Paolo Quaglia wrote: > > > > I have tried the ZPyGreSQLDA-0.3-rjr2.tar.gz, but the product result > > BROKEN PRODUCT!! > > Did you have compiled it? > > []s > -- > +-+-+ > | César A. K. Grossmann | Capacitação Solidária | > | [EMAIL PROTECTED]| http://www.uol.com.br/umminuto/ | > | http://members.xoom.com/ckant/ | Clique e doe - é de graça | > +-+-+ >http://www.halcyon.com/sciclub/cgi-pvt/instr/instr.html > A ética do iG: http://antispambr.abranetrj.org.br/not-20001023.html > > All is well that ends well. > -- John Heywood > > ___ Zope maillist - [EMAIL PROTECTED] 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 )
[Zope] HELP with Postgress!! HELP!!
Hi I m trying to setup a linux box (Redhat 6.1) with PostGress 6.5 What DA shall I use? I have tried the ZPyGreSQLDA-0.3-rjr2.tar.gz, but the product result BROKEN PRODUCT!! I have tried some ZPopyDA but some error occours How Can I Install a decent PostGress SQL DA? I thank you VERY Much Paolo Quaglia
[Zope] DA Adapter for transactional DB
What is the most reliable DA Adapter for the supported transactional DB: I mean for Postgres, MS SQL Server, for Interbase etc ... Are there some DA that work in multithreaded manner under WinNT? Thanks a lot Paolo QuagliaInformation Technology CoordinatorSitek S.p.A.[EMAIL PROTECTED]
[Zope] More on DB Transactions
Reading the [EMAIL PROTECTED] archive I found one message with an interesting sentence: [Message] > I am currently considering and evaluating Zope as one of the options we have> to build a really large, completely databasedriven "enterprise scale"> web-platform. I am a bit worried about this "maximum of 7 threads per dbThis isn't a maximum. It's just the default. It's easy to increase thenumber of connections. [/Message] Where is this Default and How can I increase this counter?? Thanks very much in advance Paolo QuagliaInformation Technology CoordinatorSitek S.p.A.[EMAIL PROTECTED]
[Zope] Advanced Transactions:
Hi All, I'm building a high transaction traffic db application using Zope. I used for this tests two DB: MSAccess 97 and SQL Server 7.0 with the ZODBCDA product I have made some tests and I have found this: The test is: I have two DTML document called Test1 and Test2 I have 2 ZSQL Queries called Select1 and Select2 I have an external method (which id is Wait) that call the time.sleep(10) #it sleeps 10 seconds Test1 calls Select1 and then the Wait() Test2 calls Select2 First transaction test: Select1 and Select2 queries are equal:= select * from Users where name='example' I call test1 in a browser and immediately after test2 in another Browser. RESULT: Test2 wait the end of test1 before the page was displayed Second Transaction test: Select1 = select * from Users where name='example' Select2 = select * from Products where id='example' I call test1 in a browser and immediately after test2 in another Browser. RESULT: Test2 wait the end of test1 before the page was displayed!! Third Transaction test: Select1 = select * from Users where name='example' on the Access Connection Select2 = select * from Products where id='example' on the SQL sever Connection I call test1 in a browser and immediately after test2 in another Browser. RESULT: Test2 wait the end of test1 before the page was displayed!! :( Now Summarizing: I think the Zope transaction Server works in every Zope operation. This is good, but it seems that it uses a bad locking method. I mean when I read a DB (usually a select) I wouldn't to lock the entire DB and I would let the other DB session free to call select statements!! Am I right?? Or I do some mistake?? Thanks Very much for your cooperation Paolo QuagliaInformation Technology CoordinatorSitek S.p.A.[EMAIL PROTECTED]
RE: [Zope] ODBC Connection
Hi Emmon I don't well understand the exact moment the error occurs: If you correctly have the ZODBCDA entry in the product list, you should have a new entry in the available objects list. Now you have to create a new datasource with the win32 ODBC manager (in control panel). then go to a folder and add a new ZODBC Database connection and chose the created ODBC Datasorce for me this work well ... Let me know Paolo Quaglia -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emmon SimboSent: Tuesday, December 12, 2000 1:19 PMTo: Paolo Quaglia; [EMAIL PROTECTED]Subject: RE: [Zope] ODBC Connection Hi Paolo I already have that. The problem was that it wasn't in the lib/python path. Moving it there fixed the problem. Now I get an error Error Type: NameErrorError Value: SQLDataSources when I try to add a new datasource. Emmon -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Paolo QuagliaSent: 12 December 2000 11:12To: [EMAIL PROTECTED]Subject: RE: [Zope] ODBC Connection Try to use the ZODBCDA http://www.zope.org/Products/DA/ZODBCDA It works very well! Paolo Quaglia -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emmon SimboSent: Tuesday, December 12, 2000 11:26 AMTo: [EMAIL PROTECTED]Subject: [Zope] ODBC Connection Hi I have a few customers who are using Zope and have shown an interest in using the OpenLink ODBC Drivers. Unfortunately, I am not familiar with Zope and wondered if there was a How-To that I can use to show me how to use Zope with ODBC. I have downloaded the ZmxODBCDA module but when I select this from the Products menu, it shows up as ZmxODBCDA(Broken product ZmxODBCA). If I click on the link, I get File "D:\APPS\ZopeWeb\lib\python\OFS\Application.py", line 397, in import_products product=__import__(pname, global_dict, global_dict, silly) File "D:\APPS\ZopeWeb\lib\python\Products\ZmxODBCDA\__init__.py", line 91, in ? import DA File "D:\APPS\ZopeWeb\lib\python\Products\ZmxODBCDA\DA.py", line 92, in ? from db import DB, manage_ODBCDataSources File "D:\PROGRA~1\Zope22\lib\python\Products\ZmxODBCDA\db.py", line 87, in ?ImportError: No module named mx.ODBC Any ideas what's wrong here and secondly how I can go about making an ODBC connection. Thanks for you help in advance Best Regards, Emmon SimboConsultantOpenLink SoftwareTel: +44 (0) 20 8681 7701Web: http://www.openlinksw.comXML & E-Business Infrastructure Technology Provider
[Zope] Last day of Month
Hi everibody Is there some tricky way to know the last day of the month of a DateTime object? for ex: if my DateTime object is 12/12/2000 is there a method or a function that return the last day of the month? (in this example 31) Thanks a lot Paolo QuagliaInformation Technology CoordinatorSitek S.p.A.[EMAIL PROTECTED]
RE: [Zope] ODBC Connection
Try to use the ZODBCDA http://www.zope.org/Products/DA/ZODBCDA It works very well! Paolo Quaglia -Original Message-From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Emmon SimboSent: Tuesday, December 12, 2000 11:26 AMTo: [EMAIL PROTECTED]Subject: [Zope] ODBC Connection Hi I have a few customers who are using Zope and have shown an interest in using the OpenLink ODBC Drivers. Unfortunately, I am not familiar with Zope and wondered if there was a How-To that I can use to show me how to use Zope with ODBC. I have downloaded the ZmxODBCDA module but when I select this from the Products menu, it shows up as ZmxODBCDA(Broken product ZmxODBCA). If I click on the link, I get File "D:\APPS\ZopeWeb\lib\python\OFS\Application.py", line 397, in import_products product=__import__(pname, global_dict, global_dict, silly) File "D:\APPS\ZopeWeb\lib\python\Products\ZmxODBCDA\__init__.py", line 91, in ? import DA File "D:\APPS\ZopeWeb\lib\python\Products\ZmxODBCDA\DA.py", line 92, in ? from db import DB, manage_ODBCDataSources File "D:\PROGRA~1\Zope22\lib\python\Products\ZmxODBCDA\db.py", line 87, in ?ImportError: No module named mx.ODBC Any ideas what's wrong here and secondly how I can go about making an ODBC connection. Thanks for you help in advance Best Regards, Emmon SimboConsultantOpenLink SoftwareTel: +44 (0) 20 8681 7701Web: http://www.openlinksw.comXML & E-Business Infrastructure Technology Provider
[Zope] New user - couple of questions
Hi to all, I'm a new Zope user/developer ... Zope has impressed me very much! Ihave a couple of questions. I want to build a new intranet site for my company using Zope, but: 1. How can I import and use Python modules For example I want to use the function sleep(secs) that resides in the time module. I wrote this code: import time def hello(self): sleep(10) return "I'm Back!!" but when I call the external method bounded with the hello function an error occours!! 1st. Have I to install the time module? - if yes where can I found it and where can I install it? 2nd. How do I have to call the sleep function? 2. I want to build an application that use the database transection to update rows. I use SQL server that support DB transactions. where can I build SQL transactions with Zope? do I have to build a ZSQL method with multiple SQL calls? .. for example: ... begin transaction update t_cliente set primaetichinterna = 'mia' commit Am I sure that the transaction will work (if another user use the same method at the same time)? How can I test if a transaction has been committed or aborted? Thanks VERY MUCH in advance Paolo Quaglia Sitek Spa Italy Paolo QuagliaInformation Technology CoordinatorSitek S.p.A.[EMAIL PROTECTED]