8 Replies Latest reply on Jun 11, 2013 3:05 AM by seenukarthi

    New-connection-sql Jboss

    tnas

      Hi,

       

      I'm trying to use the <new-connection-sql> tag in the Datasource to Oracle. I want to execute this query:

       

      SET ROLE RL_USER_SELECT IDENTIFIED BY RL_USER_SELECT, RL_ACCESS_CONSULT IDENTIFIED BY RL_ACCESS_CONSULT;

       

      before to return the connection to the user.

       

      The problem is that Jbos doesn't execute this query!  My datasource is:

       

      <datasources>

        <local-tx-datasource>

          <jndi-name>MyAppDs</jndi-name>

          <connection-url>jdbc:oracle:thin:@dbtest.org:1521:dadm</connection-url>

          <user-name>usr</user-name>

          <password>pass</password>

          <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>

          <min-pool-size>5</min-pool-size>

          <max-pool-size>15</max-pool-size>

          <idle-timeout-minutes>5</idle-timeout-minutes>

          <track-statements/>

          <prepared-statement-cache-size>100</prepared-statement-cache-size>

          <new-connection-sql>

            SET ROLE RL_USER_SELECT IDENTIFIED BY RL_USER_SELECT, RL_ACCESS_CONSULT IDENTIFIED BY RL_ACCESS_CONSULT;

          </new-connection-sql>

        </local-tx-datasource>

      </datasources>

       

      What am I doing wrong?

       

      Thanks.