最好做成ejb的resource reference
解决方案 »
- 错误提示: Exception in thread "Thread-0" java.lang.NullPointerException ??
- 在windows下运行正常。在linux下报错。。
- 问题出在哪...?
- Struts2根据分页数分页,分页数怎么传递
- JAVA字符编码的问题,高分,非常急迫!
- 如何查看EJB里的SQL语句
- 关于struts的问题
- BMP中一些自带的方法都需要实现吗?
- 为什么我布署到weblogic7.0的web程序在局域网上不能访问呢?
- 各位帮忙-给我点初学J2EE的建议
- 关于“jbuilder7+weblogic7详细配置文档”
- 请高手解决,关于部署Entity Bean的时候遇到的问题?
private String dbName =
"java:comp/env/jdbc/SavingsAccountDB";
2 Obtain the DataSource associated with the logical name.
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup(dbName);
3 Get the Connection from the DataSource.
Connection con = ds.getConnection();
private String dbName =
"java:comp/env/jdbc/SavingsAccountDB";
2 Obtain the DataSource associated with the logical name.
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup(dbName);
3 Get the Connection from the DataSource.
Connection con = ds.getConnection();
在Deploytool中做这个resouce ref 吗?
是不是要将oracle的驱动放在ejb中的lib里面呢?
我已经作了一个但是连接不上啊