I am using Ibatis and spring framework and connection pooling is done at the websphere end which refreshes the connection for every database connection that is being fetched. After the connection is being fetched. A set connection is called and the schema is set using the execute command for every connection being fetched. Now, there are various connection schemas being used which cannot be hard-coded into the code. Apart from this there are hundreds of xml files and using ${schema} for every sql statement is a big code change.
The problem is that on every connection that is being fetched, the execute command is called to set the schema which leads to a considerable performance issue. Is there any way in which the schema can be set just once in the beginning for all the connections being fetched?