2 Replies Latest reply on May 17, 2010 12:15 PM by skassam

    Need to execute a SQL statement immediately after a connection to DB is established

    skassam

      JBoss 5

      SQL Anywhere 10

       

      I would like to use the connection pooling feature in JBoss and setup a datasource.

       

      I need to execute a SQL statement immediately after a connection to the database is made.

       

      If I setup a datasource in JBoss how can I execute a statement right after JBoss makes the database connection?

       

      Details of why if it matters:

      Our database requires that an authentication statement (independent of db user authentication) is executed immediately after a connection is established. If this authentication statement is not executed my access to the db within this connection will be limited to read only.

       

      TIA.