[Zope] JDBC DA from Python

Roman Milner rmilner@pointone.com
21 Sep 2000 19:00:39 -0500


>>>>> "BB" == Brian Burton <Brian.Burton@nlynx.com> writes:

    BB> Has anyone come up with a way to access a JDBC driver from
    BB> Zope?  I have since several JPython solutions but I don't see
    BB> a way of executing JPython from Zope.  Would the best way be
    BB> to write a Zope/Python DA that opens sockets to a JPython or
    BB> Java servlet that then talks to the JDBC driver?  Sounds like
    BB> a bit of work.

I bet it would be easier than you think.  There are at least 2 python
DB API compliant interfaces to JDBC that I know of.  So you should be
able to write a generic python/jpython server that talks to a DB API
and returns the results to the client.  This is similar to how
sqlrelay works.  I think you should even be able to send pickles of
the data retults over the socket - because as far as I know jpython
and python use the same pickle code.

I would bet that it is gonna be god awful slow.  Might be good enough
for small return sets though.

^Roman