JDBC Connection Pool

1) Application Server configuration for DB Connection Pool Management.
2) Configure container
3) Configure EJB application that uses db connections from pool area.

1) Search for a property called
Weblogic JDBC Connection Pool Management

2) Container config
open weblogic-ejb-jar.xml




jdbc/demoPool

weblogic.jdbc.jts.demoPool


shop

open ejb-jar.xml
----------------------

jdbc/demoPool
javax.sql.DataSource
Container


3) EJB
---------
Context ctxt=new InitialContext();

Object o=ctxt.lookup("jdbc/demoPool");

javax.sql.DataSource ds=(javax.sql.DataSource)o;

con=ds.getConnection();

stmt=con.createStatement();

No comments: