1 2 Previous Next 15 Replies Latest reply on Feb 11, 2012 4:04 PM by mihovil

    Connection pooling to datasource - AS7.1, connections are not released

    mihovil

      Hi,

      We have problem that connection pool (set by default to 20) is drained - we are left without connections, because they are not released anywhere...

       

      In persistance.xml, we have defined jta data source:

       

      <persistence-unit name="LarisModel" transaction-type="JTA">

        <jta-data-source>java:/LarisDS</jta-data-source>

       

      We access this datasource in EJB via:

       

      @PersistenceContext(unitName="LarisModel")

          private EntityManager em;

       

      .. defined in jboss standalone.xml.

       

      This works but problem is that connection is not released to available pool of connections when log out from application.

       

      Our log out is done like this:

       

      FacesContext.getCurrentInstance().getExternalContext().invalidateSession();

       

      and then redirected to login form.

       

      Thanks

      Mihovil

        1 2 Previous Next