Tomcat에서 DBCP 사용


Tomcat에서 DBCP 사용

- Context.xml의 <Context> 태그 안에 아래 내용 추가 <Resource name=”jdbc/postgres” auth=”Container” //postgres는 임의의 이름 type=”javax.sql.DataSource”<?xml:namespace prefix = o /> username=”test” password=”test” factory=”org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory” driverClassName=”org.postgresql.Driver” url=”jdbc:postgresql://192.168.10.241:5432/postgres” //postgres는 임의의 이름 maxActive=”8” maxIdle=”4” //숫자는 상황에 맞게 removeAbandoned=”true”/> - Web.xml의 <web-app>안에 아래 내용 추가 <resource-ref> <description>postgre...


#context.xml #dbcp #tomcat #web.xml #톰캣

원문링크 : Tomcat에서 DBCP 사용