Atomikos Forum

AtomikosDataSourceBean - new connection SQL

Hi,

is there any possibility to configure the AtomikosDataSourceBean for executing some SQL commands every time new connection to DB is created?
We need to call this sequence:
BEGIN
  EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_NUMERIC_CHARACTERS = ''.,''';
  EXECUTE IMMEDIATE 'ALTER SESSION SET NLS_SORT = xczech';
END;

Formerly we were doing this in <new-connection-sql> tag in JBoss datasource configuration (<datasources><local-tx-datasource>..</datasources>) but I cannot find any appropriate property in AtomikosDataSourceBean. Setting these commands to "testQuery" property works but certainly isn't optimal.. Could you please suggest any better solution? Or is it possible to add a configuration property like this in future version..?

Thanks in advance.

Petra
Petra Tobolikova Send private email
Monday, August 11, 2008
 
 
Hi,

Thanks for the feedback.

Why do you want to test a connection only when it is created?

Guy
Guy Pardon Send private email
Monday, August 11, 2008
 
 
Hi,
I don't want to test a connection, I want those ALTER SESSION statements to be executed in order to have proper sorting for czech language, among others.. And I think it is not necessary to execute the statements every time a connection is borrowed from the pool. They can be executed just when a connection is created.

Petra
Petra Tobolikova Send private email
Tuesday, August 12, 2008
 
 
Thanks. Let us look into this for a future release. Do you want to sponsor and/or contribute for this?
Guy Pardon Send private email
Monday, September 01, 2008
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics