JAVA開発メモ
のバックアップ(No.15)
 

[トップ|一覧|単語検索|最終更新|バックアップ|ヘルプ]


<Resource name="jdbc/myDB" type="javax.sql.DataSource" password="*****" driverClassName="oracle.jdbc.driver.OracleDriver" maxIdle="2" maxWait="5000" username="hogehoge" url="jdbc:oracle:thin:@127.0.0.1:1521:orcl" maxActive="4"/> <resource-ref> <description>Oracle Datasource example</description> <res-ref-name>jdbc/myDB</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> Context ctx = new InitialContext(); DataSource ds = (DataSource)ctx.lookup("java:/comp/env/jdbc/myDB"); <GlobalNamingResources> <Resource name="jdbc/myoracle" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/myoracle"> <parameter> <name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter> <parameter> <name>driverClassName</name> <value>oracle.jdbc.driver.OracleDriver</value> </parameter> <parameter> <name>driverType</name> <value>thin</value> </parameter> <parameter> <name>url</name> <value>jdbc:oracle:thin:@localhost:1521:ORCL</value> </parameter> <parameter> <name>username</name> <value>scott</value> </parameter> <parameter> <name>password</name> <value>tiger</value> </parameter> <parameter> <name>maxActive</name> <value>20</value> </parameter> <parameter> <name>maxIdle</name> <value>10</value> </parameter> <parameter> <name>maxWait</name> <value>-1</value> </parameter> </ResourceParams> .... </GlobalNamingResources> <resource-ref> <description>Oracle Datasource example</description> <res-ref-name>jdbc/myoracle</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> <Context path...> ... <ResourceLink name="jdbc/myoracle" global="jdbc/myoracle" type="javax.sql.DataSource"/> </Context> pdfFontName="HeiseiKakuGo-W5" pdfEncoding="UniJIS-UCS2-H" isPdfEmbedded="false" pdfFontName="HeiseiMin-W3" pdfEncoding="UniJIS-UCS2-HW-H" isPdfEmbedded="false"
トップ 一覧 検索 最終更新 バックアップ   ヘルプ   最終更新のRSS

Modified by MT22(Moriwaki Takashi)

"PukiWiki" 1.3.7 Copyright © 2001,2002,2003 PukiWiki Developers Team. License is GNU/GPL.
Based on "PukiWiki" 1.3 by sng
Powered by PHP 7.4.28

HTML convert time to 0.090 sec.