DB 연결 Connectino Pool은 데이터에 대한 요청이 발생하면 재사용 되는 것으로 DB의 수행 능력을 향상시키기 위해 사용
이전에 공부했던 DB Connection은 필요할 때마다 생성해서 사용했는데 Connection Pool은 미리 만들어서 필요할 때 대여 해주고 연산이 끝나면 다시 반환하는 과정 진행
Connection Pool에서 하나의 연결이 생성되어 Pool에 배치되면 새로운 Connection이 만들어지지 않도록 재사용하지만, 만약 모든 연결이 사용 중이면 새로운 연결이 만들어져 Pool에 추가
Connection pool을 통해 DB연결을 위해 기다리는 시간을 축소해줌
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--><!-- The contents of this file will be loaded for each web application --><Context>
<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
<Resource
auth = "Container"
driverClassName = "oracel.jdbc.driver.OracleDriver"
url = "jdbc:oracle:thin:@localhost:1521:xe"
username = "아이디"
password = "비밀번호"
name = "jdbc/myOracle"
type = "javax.sql.DataSource"
maxActive = "8"
maxWait = "1000"
/>
</Context>