cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marcus Crafter <>
Subject [C2] esql connections diff
Date Wed, 01 Nov 2000 17:04:24 GMT
Hi All,

	Hope everything is going well around the C2 globe.

	Attached is a patch that makes a change to the abilities of the esql

	Background: In our environment we are interfacing to a legacy database
	with a combination of stored procedures and select's.
	In our particular case, stored procedures generate temporary tables
	which are valid only for the current database session. They are
	automatically deleted afterwards. Our typical use of the database is
	to call a stored procedure and then do a select on this temporary table.

	The issue is that both the stored procedure invocation and select need
	to be done with the same jdbc 'Connection' object, otherwise the
	temporary table will be already deleted before the sql 'select' starts.

	Currently the esql taglib uses a separate connection object for each
	query causing us all sorts of bother. The attached patch allows the
	user to specify more than one <esql:query>..</esql:query> inside a
	<esql:execute-query> tag. The <esql:query>'s are then executed using
	the same 'Connection object'.


<esql:execute-query inner-method="no">


	<!-- first query executing stored procedure -->
		execute procedure ...

	<!-- second query performing select -->
		select ...



	2 things to be aware of though - the results are those from the last
	query; all others are dumped (not so bad), however the 'last' query
	may be xslt implementation dependant (ie. is the parse order of a
	stylesheet defined ?).

	Any suggestions or improvements are welcomed.


     ,,$$$$$$$$$,      Marcus Crafter
    ;$'      '$$$$:    Computer Systems Engineer
    $:         $$$$:   Open Software Associates GmbH
     $       o_)$$$:   82-84 Mainzer Landstrasse
     ;$,    _/\ &&:'   60327 Frankfurt Germany
       '     /( &&&
           \_&&&&'     Email :
          &&&&.        Business Hours : +49 69 9757 200
    &&&&&&&:           After Hours    : +49 69 49086750

View raw message