ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Patrick.Higg...@cexp.com>
Subject RE: passing connection to ibatis
Date Fri, 22 Sep 2006 16:52:54 GMT
>> 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

That would only create the views when the connection is created, not on every request. If
it's a very rare case to use those views, then I can see not wanting to do this for every
connection. But keep in mind that your connections are probably going to live for a long time
and service many requests, so if it's likely that the same connection will access the views
at least twice, then you might as well create the views when creating a connection.

View raw message