ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eugeny N Dzhurinsky <b...@redwerk.com>
Subject Re: passing connection to ibatis
Date Fri, 22 Sep 2006 09:35:45 GMT
On Thu, Sep 21, 2006 at 10:31:02AM -0600, Patrick.Higgins@cexp.com wrote:
> You're only going to want to create temporary tables when the connection is
> created, not at the beginning of every transaction.
> 
> Depending on what kind of connection pool you're using, you may be able to
> use their connection lifecycle event handler to do this rather than rely on
> iBATIS to expose this functionality, which it probably can't do for most
> external pools, anyway (unless it wraps their mechanisms, but that assumes
> the API each connection pool exposes would be directly mappable onto the API
> that iBATIS would choose, which would probably not be true for many of
> them).
> 
> If you're using DBCP, you might be able to your own implementation of
> org.apache.commons.dbcp.ConnectionFactory that creates the temporary tables
> before returning the connection from the createConnection() method.

That might work in case if I need to create those tables/views for each
request for database, which isn't my case. I need to create such views only in
certain cases and don't create them in other cases. If it would be possible to
pass a connection to iBATIS somehow - that would definitely solve my problem

-- 
Eugene N Dzhurinsky

Mime
View raw message