快精灵印艺坊 您身边的文印专家
广州名片 深圳名片 会员卡 贵宾卡 印刷 设计教程
产品展示 在线订购 会员中心 产品模板 设计指南 在线编辑
 首页 名片设计   CorelDRAW   Illustrator   AuotoCAD   Painter   其他软件   Photoshop   Fireworks   Flash  

 » 彩色名片
 » PVC卡
 » 彩色磁性卡
 » 彩页/画册
 » 个性印务
 » 彩色不干胶
 » 明信片
   » 明信片
   » 彩色书签
   » 门挂
 » 其他产品与服务
   » 创业锦囊
   » 办公用品
     » 信封、信纸
     » 便签纸、斜面纸砖
     » 无碳复印纸
   » 海报
   » 大篇幅印刷
     » KT板
     » 海报
     » 横幅

配置weblogic的connection pool和Data Source


os version:windwos2000 serverhostname:mytestdatabase:oracle 9.2.0.1port:1521table: test(a number(2))user:systempassword:oracleweblogic version: 7.0.4domain:mydomainserver:myserverport:7001WL_HOME:d:/bea/weblogic1.配置connection pool打檫weblogic治理控制台[http://mytest:7001/console]mydomain->services->jdbc->connection pools新增一connection poolname: OraThinpoolurl: jdbc:oracle:thin:@mytest:1521:technetDriver Classname: oracle.jdbc.driver.OracleDriverproperties:user=systempassword: oracletarget: myservertest table name: dual2.配置Data Source打檫weblogic治理控制台[http://mytest:7001/console]mydomain->services->jdbc->Data Source新增一Data Sourcename: OraThinDSJNDI Name: jndi_orathinDSPool Name: OraThinPooltarget: myserver3.?y??代瘁Context ctx = null;Hashtable ht = new Hashtable();ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");ht.put(Context.PROVIDER_URL,"t3://mytest:7001");try {ctx = new InitialContext(ht);javax.sql.DataSource ds = (javax.sql.DataSource) ctx.lookup ("jndi_orathinDS");java.sql.Connection conn = ds.getConnection();Statement stmt=conn.createStatement();String sql="select a from test";ResultSet rs=stmt.executeQuery(sql);while (rs.next()){int i=rs.getInt(1);System.out.println(i);}}catch(Exception e){e.printStackTrace();}rs.close();stmt.close();conn.close();4.附注?????斓年dbc???游恢?????在?h境??量classpath中出?F,本例使用的?????殂lasses12.zip 位於d:/bea/weblogic erver/lib?tclasspath=d:/bea/weblogic erver/lib/classes12.zip;%CLASSPATH%修改d:/bea/weblogic erver/bin tartWLS.cmd中的classpath後重新???喻eblogic即可




返回类别: 教程
上一教程: 老外在TSSJS2005都聊些什么?
下一教程: 关于扰乱器与反编译 (转载)

您可以阅读与"配置weblogic的connection pool和Data Source"相关的教程:
· TOMCAT中DATASOURCE的配置方式
· webshpere studio application developer 中 jndi 访问DATASOURCE DB.7.2
· 利用WEBLOGIC的POOL(连接池)连接数据库
· Weblogic 81 CA配置以及单向SSL配置
· 用定制标签库和配置文件实现对JSP页面元素的访问控制
    微笑服务 优质保证 索取样品