Spring, iBatis and multiple Oracle tablespaces
I have a problem with managing multiple Oracle tablespaces (with Spring and iBatis). I have one administration tablespace that stores information about other tablespaces (like their name). Right after a user logs in, selects a tablespace to work with. I store this information in session. The user can only work with one tablespace in a time. These "work-tablespaces" share a common structure, so I try to hide the schema name prefix from my DAO classes.
Earlier I tried to use $substitution$ syntax of iBatis, but I didn't like the HashMap I had to use as parameter in every query. Now I'm trying to issue an ALTER SESSION SET CURRENT_SCHEMA command, but I'm afraid of its impact on caching, and I couldn't find an elegant solution to run this command before every query.
I read something about SqlMapClientCallback interface, but I don't know how to wire its implementation to my SqlMapClientTemplate and wether the doInSqlMapClient method of SqlMapClientCallbackImpl would run before or after the queries.
Could you point me to the right direction how to manage these tablespaces?
Thanks in advance.