톰캣 5.5에서 jndi 설정은 어떻게 하는것인지요?
Oracle, Mssql, Mysql은
server.xml, context.xml, web.xml에 세팅을 하면 DB접속이 가능합니다.
그러나 Unisql은 정보 찾기가 어렵습니다.
Unisql도 가능한지요
Oracle 경우
1. conf/server.xml
<GlobalNamingResources>
<!-- Test entry for demonstration purposes -->
<Environment name=\"simpleValue\" type=\"java.lang.Integer\" value=\"30\"/>
<!-- Editable user database that can also be used by
UserDatabaseRealm to authenticate users -->
<Resource name=\"UserDatabase\" auth=\"Container\"
type=\"org.apache.catalina.UserDatabase\"
description=\"User database that can be updated and saved\"
factory=\"org.apache.catalina.users.MemoryUserDatabaseFactory\"
pathname=\"conf/tomcat-users.xml\" />
<!-- Oracle Connection -->
<Resource name=\"jdbc/myoracle\"
auth=\"Container\"
type=\"oracle.jdbc.pool.OracleDataSource\"
driverClassName=\"oracle.jdbc.driver.OracleDriver\"
factory=\"oracle.jdbc.pool.OracleDataSourceFactory\"
url=\"jdbc:oracle:thin:@아이피:1521:SID이름\"
user=\"****\"
password=\"*****\"
maxActive=\"20\"
maxIdle=\"10\"
maxWait=\"-1\"/>
</GlobalNamingResources>
2. conf/context.xml
<Context>
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname=\"\" />
-->
<ResourceLink global=\"jdbc/myoracle\" name=\"jdbc/myoracle\" type=\"oracle.jdbc.pool.OracleDataSource\"/>
</Context>
3. webapps/ROOT/WEB-INF/web.xml
<!-- Oracle Connection -->
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/myoracle</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
오라클의 경우는 위와 같이 하면 연결이 잘되고 있습니다.
Unisql도 위에 처럼 설정이 가능한지요?
가능하면 자세한 설명 부탁드립니다.
|