다음은 Web Server 및 MySQL 4.0용으로 연결 풀을 설정하는 예입니다.
samplePool
com.mysql.jdbc.jdbc2.optional.MysqlDatacSource
mySQL 서버의 이름
mySQL 서버가 실행 중인 포트 번호
데이터베이스 비밀번호의 사용자 이름
해당 사용자의 비밀번호
데이터베이스의 이름
주 – 다음 단계에서 설명하는 데이터 소스 클래스 및 JDBC 드라이버 클래스를 포함하는 jar 파일을 응용 프로그램 클래스 경로에 추가해야 합니다.
jdbc/samplePool
samplePool
on
<resource-ref>
<res-ref-name>jdbc/mySQL</res-ref-name>
<jndi-name>jdbc/samplePool</jndi-name>
</resource-ref><resource-ref>
<description>mySQL Database</description>
<res-ref-name>jdbc/mySQL</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>