You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2003/10/01 14:48:19 UTC
DO NOT REPLY [Bug 23542] New: -
[PATCH/BUG] Better handling of CLOB in esql (get-xml) and handling of Oracle 'temporary lobs'
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23542>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23542
[PATCH/BUG] Better handling of CLOB in esql (get-xml) and handling of Oracle 'temporary lobs'
Summary: [PATCH/BUG] Better handling of CLOB in esql (get-xml)
and handling of Oracle 'temporary lobs'
Product: Cocoon 2
Version: Current CVS 2.1
Platform: All
OS/Version: All
Status: NEW
Severity: Major
Priority: Other
Component: general components
AssignedTo: dev@cocoon.apache.org
ReportedBy: tomasz.bech@bull.com.pl
It concerns 2.0.3+ as well.
Two changes to properly handle clob's for Oracle:
1.
File esql.xsl:
in <xsl:template
match="esql:row-results//esql:get-xml|esql:call-results//esql:get-xml">
instead of get-string use get-clob.
Issue: or make it much cleaner - in get-string-encoded check if column is CLOB
and call get-clob from there - I don't understand fully the issue with encoded.
2. Fix problem with temporary clob for Oracle
When such a statement is used in esql:
select something_what_returnes_temporary_clob from dual
(it applies also for call statement)
Oracle keeps return clob in TEMP segment and is not willing to free it.
Solution: according to Oracle JDBC docs call freeTemporary!
Patch:
File EsqlHelper.java:
In each place where the CLOB/BLOB is taken (getBlob, getClob), put before return:
//ORACLE 'temporary lob' problem patch start
if (dbClob.getClass().getName().equals("oracle.sql.CLOB"))
dbClob.getClass().getMethod("freeTemporary", new Class[0]).invoke(dbClob,
new Object[0]);
//ORACLE 'temporary lob' problem patch end
Hope it will be in the next release,
if need some explanation feel free to use my email.
Tomasz Bech