请问weblogic+oracle连接池建好了,怎么连接数据库。
我是用JSP做的,谢谢。急 问题点数:0、回复次数:5Top
1 楼eworkers(eworkers)回复于 2003-07-01 22:05:00 得分 0
我是用dreamweaver写JSP,基本上不自己写代码,连ORACLE的代码是DW自动生成的,只要把ORACLE的驱动程序拷到DW目录下就行,缺点是好象看不到视图和预存过程……Top
2 楼eworkers(eworkers)回复于 2003-07-01 22:05:58 得分 0
BTW:你的WEB应用建了吗?Top
3 楼wsgws(gws)回复于 2003-07-02 09:09:11 得分 0
装好了,一直有问题。
<2002-7-2 上午08时57分12秒> <Error> <JDBC> <Error during Data Source creation: w
eblogic.common.ResourceException: DataSource(dataSourc) can't be created with no
n-existent Pool (connection or multi) (WebAppPool)>
<2002-7-2 上午08时57分12秒> <Error> <JDBC> <Error during Data Source creation: w
eblogic.common.ResourceException: DataSource(WebAppPool) can't be created with n
on-existent Pool (connection or multi) (WebAppPool)>
<2002-7-2 上午08时57分12秒> <Notice> <Management> <Application Poller not starte
d for production server.>Top
4 楼tcmy_168(超人)回复于 2003-07-02 12:33:31 得分 0
public static Connection getConnection(){
Connection conn=null;
try{
InitialContext ctx = new InitialContext();
javax.sql.DataSource ds = (DataSource) ctx.lookup("DataPoolName");//jndiname
conn=ds.getConnection();
return conn;
}catch(SQLException ex){
ex.printStackTrace();
}catch(Exception e){
e.printStackTrace();
}
return conn;
}Top
5 楼brendal(brendal)回复于 2004-03-19 08:25:15 得分 0
你在控制台里建数据源了吗?ctx.lookup()找的应该是jndi name,不是连接池Top




