JAVA開発メモ
のバックアップの現在との差分(No.5)
 

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



  #freeze


  
  //#article
  


  ~




  >~



  >~


  >~







  #comment
  


  ~



  


  ~








  >~



  >~

  


  ~









  


  ~









  


  ~

  >~


  >~




  


  ~

  >~







  >~



      <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");
  >~






  >~



  >~

  >~


  >~


  >~


  >~


  >~

  


  ~

  >~
  >http://page11.auctions.yahoo.co.jp/jp/auction/n30813829~
  


  ~








  ><action ~







  ></action> ~
  >~
  >~

  >public class IMasterAc extends LookupDispatchAction { ~
  >~








  >~






  >~


  >~


  >~

  >~






  >~










  >~

  >~
  >}~
  


  ~




  >~


  >~

  


  ~



  


  ~




  

  


  ~

  
  **sas

  ~


  
  


  ~





  >~
  >OS:Win2000~
  >JDK:1.4.2~
  >Oracle:8i~
  >Tomcat5~
  >Eclipse3~
  
  >javax.naming.NoInitialContextException: Need to specify class name in~
  >environment or system property, or as an applet parameter, or in an ~
  >application resource file:  java.naming.factory.initial~
  >at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:640)~
  >at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)~
  >at javax.naming.InitialContext.getURLOrDefaultInitCtx(InitialContext.java:280)~
  >at javax.naming.InitialContext.lookup(InitialContext.java:347)~
  >at test.Pooling.main(Pooling.java:27)~
  >Exception in thread "main" ~
  >~

   <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>
   <Resource name="jdbc/myoracle" auth="Container" type="javax.sql.DataSource"/>
      <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.29

HTML convert time to 0.056 sec.