Thanks again- I'd better go back and add sql:close to my sheets. Based on the bug you describe, should only the parent XSLT sheet call sql:close()? For example, if a parent sheet includes several child sheets and they all specify the same connection information (I typically do this for querying master-detail information), would calling sql:close() in a child sheet close *all* the similar connections, even if they are still in use?

Also, could you comment on allowing XConnection to auto-wrap a JNDI datasource? Would people be receptive to this as a contribution? I've not yet looked at the code, so I'm not sure how complex this would be...

Thanks,
--ee


On Mar 1, 2005, at 2:56 PM, John Gentilin wrote:

Morris Kwan wrote:

Must I explicitly close the connection?

I guess it is not explicitly closed. You need to call
sql:setFeature($connection, 'default-pool-enabled', 'false') to close the
connection.




Oops, I missed that one. The SQL extension does not close connections automatically. You MUST
call sql:close() at the end of the Stylesheet. Disabling the default connection pool will only release
connections that are currently not in use.


Just a little FYI...
The XConnection class does not represent a single DB connection. It is really a query factory where
each query is associated to a DB connection. XConnection is a legacy class name that was kept around.


The sql:close() function will close all connections (i.e. queries) that were created with an XConnection.

The mechanism to close a specific query is currently broken, I need to write up a detailed JIRA bug

-JG




Reply via email to