[prev in list] [next in list] [prev in thread] [next in thread] 

List:       zodb-dev
Subject:    [ZODB-Dev] accessing the ZODB through External Methods
From:       "Zachary Butikofer" <Zachary.Butikofer () sdl ! usu ! edu>
Date:       2004-03-30 22:03:49
Message-ID: 001801c416a2$e13079a0$6f041fac () usurf ! usu ! edu
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


I am working on a database application that allows me to view, and manipulate data \
over a web page.  Here is a brief summary of how it works:

1.  Zope Page Templates pass arguments to External Methods (This works)
2.  External Methods pass arguments to Zope Page Templates(This works)
3.  The External Methods import my custom built classes and create instances of them \
(This works) 4.  The External Methods "import ZODB.config" (This works)
5.  The problem comes when I try to connect to the datbase using the the functions:
     "connection = db.open()"
     "connection.close()"
      Zope will not run at this point.  My web page gives me the error:
Error Type: IOError
Error Value: [Errno 11] Resource temporarily unavailable


I am guessing that somehow the ZODB and Zope are stomping on each other's feet.

6.  The funny thing is that I can interact with the ZODB easily on the server side \
with out any problems.  I thought that External Methods were supposed to allow you to \
program python scripts on the server side without Zope interfering.  Note: that \
between Zope page templates and the External Methods I only pass strings.  I do not \
pass any kind of object or class instance.

I am using Zope-2.7.0 and  ZODB-3.2.1 and Python 2.3.3

Is there a better way to store customized objects in the ZODB?  I like the idea of \
using objects with ZODB instead of mapping objects to a relational datbase like MySQL \
.

Thanks for your help

-Zach


[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2722.900" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I am working on a database application that allows 
me to view, and manipulate data over&nbsp;a web page.&nbsp; Here is a brief 
summary of how it works:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>1.&nbsp; Zope Page Templates pass arguments to 
External Methods (This works)</FONT></DIV>
<DIV><FONT face=Arial size=2>2.&nbsp; External Methods pass arguments to Zope 
Page Templates(This works)</FONT></DIV>
<DIV><FONT face=Arial size=2>3.&nbsp; The External Methods import my custom 
built classes and create instances of them (This works)</FONT></DIV>
<DIV><FONT face=Arial size=2>4.&nbsp; The External Methods</FONT><FONT 
face=Arial size=2>&nbsp;"import ZODB.config" (This works)</FONT></DIV>
<DIV><FONT face=Arial size=2>5.&nbsp; The problem comes when I try to connect to 
the datbase using the the functions:</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"connection = 
db.open()"</FONT></DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;"connection.close()"</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Zope will not run at 
this point.&nbsp; My web page gives me the error:</FONT></DIV>
<DIV>
<P><STRONG>Error Type: IOError</STRONG><BR><STRONG>Error Value: [Errno 11] 
Resource temporarily unavailable</STRONG><BR></P>
<P><FONT face=Arial size=2>I am guessing that somehow the ZODB and Zope are 
stomping on each other's feet.</FONT></P></DIV>
<DIV><FONT face=Arial size=2>6.&nbsp; The funny thing is that I can interact 
with the ZODB easily on the server side with out any problems.&nbsp; I thought 
that External Methods were supposed to allow you to program python scripts on 
the server side without Zope interfering.&nbsp; Note: that between Zope page 
templates and the External Methods I only pass strings.&nbsp; I do not pass any 
kind of object or class instance.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I am using Zope-2.7.0 and&nbsp; ZODB-3.2.1 and 
Python 2.3.3</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Is there a better way to store customized objects 
in the ZODB?&nbsp; I like the idea of using objects with ZODB&nbsp;instead of 
mapping objects to a relational datbase like MySQL .</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks for your help</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>-Zach</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>


_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic