[高分请教] WebLogic Server 6.0下使用DataSource操作mysql database的问题?
我使用DriverManager可以正常的连接到mysql上,但当我使用DataSource时却出现了问题,WebLogic Server 操作台上的显示为:(examples-dataSource-demoPool是我使用的DataSource的名字)
Init Error: javax.naming.NameNotFoundException: Unable to resolve examples-dataSource-demoPool. Resolved: '' Unresolved:'examples-dataSource-demoPool' ; remaining name ''
我使用的jdbc driver是mm.mysql, connection pool的设置是:
Name: POLITEPool
URL: jdbc:mysql://localhost/POLITE
Driver Classname: org.gjt.mm.mysql.Driver
Properties(key=value):
user=username
password=password
请问问题到底出在什么地方?
我的Servlet source code中是这样调用DataSource的:
Context ctx = new InitialContext();
DataSource ds = (DataSourcec)ctx.lookup("examples-dataSource-demoPool");
ds.getConnection();