DAo - Connection Pooling


EJB design: DAo - Connection Pooling

  1. DAo - Connection Pooling (3 messages)

    If the connection code is written in DAO. How will the app server do the connection pooling

    Threaded Messages (3)

  2. In DAO we just fetch the connection. App. Server is responsible for creating & closing the connections etc.,
  3. DAo - Connection Pooling[ Go to top ]

    The connection pool is managed through the DataSource, not through the EJB class. So long as you retrieve the connection from the DataSource, pooling will work, whether you are calling the DataSource from your EJB class or from another class (such as a DAO).
  4. DAO, DataSource[ Go to top ]

    If you want to take advantage of the connection pooling provided by the application server, you will need to:
    1) lookup the javax.sql.DataSource object via JNDI
    2) invoke DataSource.getConnection()

    Example code: