weblogic连接池的问题,怎么解决?

ywsws 2001-09-27 03:18:14
我在jsp页面里直接连接sybase数据库没有问题:
Properties props = new Properties();
props.put("user","objuser");
props.put("password","user2000");

Driver myDriver = (Driver) Class.forName
("com.sybase.jdbc.SybDriver").newInstance();

Connection conn = myDriver.connect
("jdbc:sybase:Tds:10.92.128.71:5500/BDW_SERVER", props);

Statement stmt = conn.createStatement();

stmt.execute("select * from an_olt");
ResultSet rs = stmt.getResultSet();

while (rs.next()) {
out.print(rs.getString(1) + " - " +
rs.getString(2)+"<br>");
}

stmt.close();
conn.close();
运行没有问题,但是我建一个connection pool:
weblogic.jdbc.connectionPool.sybasePool= url=jdbc:sybase:Tds:10.92.128.71:5500, driver=com.sybase.jdbc.SybDriver, initialCapacity=1, maxCapacity=10, capacityIncrement=1, props=user=objuser;password=user2000;
然后连接这个pool:
try{
Connection conn=null;
Statement stmt=null;
Driver myDriver=(Driver) Class.forName("weblogic.jdbc.pool.Driver").newInstance();
conn=myDriver.connect("jdbc:weblogic:pool:sybasePool",null);
stmt=conn.createStatement();
}
catch(Exception e){
out.println(e);
}

weblogic报错:
java.sql.SQLException: Connection Pool sybasePool does not exist

请问是什么原因?我用的weblogic6.1是从bea的网站down下来的,还望各位大虾赐教,谢谢!
...全文
78 点赞 收藏 4
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
skt985 2002-01-11
41955关注! :)
回复
gogoboys 2001-11-09
when you start your weblogic you can see the course of createing connection pool(just like "create connection pool ...") if you can not see this there must be someting wrong with your weblogic.properties(5.1sp2)
回复
max9702 2001-11-08
你在控制台中是怎么设置的??好像不对?
回复
greed 2001-09-28
hao
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2001-09-27 03:18
社区公告
暂无公告