Re: [Zope-dev] DCOracle2 Beta 3

2001-06-16 Thread Andreas Repp


Sorry, but there were some mistakes in my last posting...

... To solve the performance problem I´d suggest to cache the user
 connections for a certain period of time. ...

Of course I haven't meant to 'cache' the connections but to keep em alive
while the respective user is active and shut it down after a timeout
period has passed.

enhanced ZSQL-example:
##(new)connection_id=dtml-var 'username+','+password' or default_connection_id,
##arguments=ID,NAME

I also know that this will hardly ever work ;-)

Maybe this shot would do a better job:

##default_connection_id=(changed via ZSQL manage_main Interface)
##connection_type=[ standard | custom | optional ]
##connection_options=(individual Oracle Connection String)
sql yada yada

'standard' = obvious
'custum'   = forced custom connection - will raise error if connection_options
 dont' have a valid connection string
'optional' = try 'custom' and fallback to 'standard' if it fails

btw: would be nice to have a drop box in the manage_main screen for this
stuff in a _far future_ release of ZSQL-Methods ;-)

I noticed that a SQL 'COMMIT' is hardcoded into (old) ZOracle/DCOracle1
code - this would'nt have any more sense if all mentioned is possible but
surely you know this.


Andy

--
Andreas Repp  [EMAIL PROTECTED]
Leibniz Rechenzentrum Muenchen  www.lrz.de
--


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )



[Zope-dev] DB(Oracle) Transactions with Zope(/ZPatterns)

2001-05-17 Thread Andreas Repp

Hi *,

i'm currently developing a (network information) DB web-interface using
ZPatterns specialists with one specialist for every logical object.

For instance i have a 'component'-specialist which handles
a object-table mapping for the tables:
 o component
   - product (n:1 foreign key)
   - location (n:1 foreign key)
   - physical port (1:n foreign key)
   - ...

The user (provided that she/he has permission) should be able to create
a new component as well as related physical ports, new product etc.

'create component' Sequence:


 (1) call component-specialist newItem
 - skin script 'WHEN OBJECT ADDED' calls SQL insert statement
with default attribute parameters from ZClass
### + SQL commit (Zope/DC Oracle default behavior)! ###

 (2) redirect user to .../component/#newid/edit

 (3) user adds new physical port
 - skin script 'WHEN OBJECT ADDED' calls SQL insert statement
with component #newid as foreign key + default stuff from ZClass
again an SQL commit-statement is appended
 ...

 (x) user clicks 'cancel'-button
 - MY PROBLEM (trash in DB because of no(?) possibility to make
a SQL rollback)

Questions:
--

1. Is it possible to make sure a user stays with a specific DC Oracle
   thread ? (trick timeouts via http-refresh ?)

2. Provided that a user can have her/his private DB thread (kind of a
   private xterm with PL/SQL ;-) is it possible to wrap a bunch of SQL
   statements (triggered by ZPatterns) into a (Oracle) DB Transaction ?


Any comments (maybe answers ;-) would be _very_ appreciated.

thank u in advance

Andy


--
Andreas Repp  [EMAIL PROTECTED]
Leibniz Rechenzentrum Muenchen  www.lrz.de
Barer Str. 21  office +49 8441 4980772
D-80333 Muenchen   mobile +49  172 8337010
--


___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )