1 Reply Latest reply on Apr 14, 2008 12:32 AM by Pete Muir

    Custom actions after connection created and before connection returned to pool

    Marius K Newbie

      We are considering using Seam for new project (I'm quite new to Seam and Java EE).


      Due to legacy database (and security restrictions) there has to be two connections to a database (with different user name, for which I would create two separate data sources). One for user management, second is used to perform any application specific action (as selecting data, updating...), but before that one special SQL function must be called, and another when connection is no longer neccesary.


      I thought I could use Hibernate connection_provider (write my own class and supply connections, execute required SQL when required), but realized that I have no idea how can I access data that is stored in some Seam scope. (ConnectionProvider cannot be injected, as it is created by Hibernate static class ConnectionProviderFactory).


      Not sure if it is possible (and how) to do, what I need.


      Any suggestions/remarks would be appresiated


      Marius