>> 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.

Reply via email to