atomikos/transactions-essentials

Add support for connection-INIT-SQL property

AlGolUA opened this issue · 3 comments

This is a widely used requirement to use credentials other than the schema owner's credentials to connect to the database or call something right after connection. connection-INIT-SQL property, that can look like,
connection-INIT-SQL = BEGIN EXECUTE IMMEDIATE 'ALTER SESSION SET CURRENT_SCHEMA = MAIN'; END;
allows you to achieve this goal for Hikary pool. But it looks like the Atomikos library doesn't support anything like that.
For now we have to extend AtomikosDataSourceBean and its getConnection method by making required initialization and keeping hashCode of initialized connection in internal map (to avoid double initialization and to clear the map from old items).

Thanks. The requirement is not that widely used because we only had one request for it so far, this being the second maybe?

Looking for solution I have found just one question by the same topic on stackoverflow: Atomikos equivalent to Hikari connection-init-sql. In any case it could be a nice extention, but lets wait for voting.

Ah, if that's what you mean then I can tell you we have such a feature in our commercial distribution. There's a free trial if you are interested.