PetStore中关于释放DB资源的一个问题

我刚刚开始看PetStore,看到CatalogOracleDAOImpl这个类
发现它里面的函数中在异常里面都没有处理资源的释放,比如:
public Category getCategory(String categoryID, Locale l)
{
System.out.println("CatalogDAOImpl.java getCategory");
Connection c = null;
PreparedStatement ps = null;
ResultSet rs = null;
Category ret = null;
try {
c = getDataSource().getConnection();
.......
}
catch (SQLException se) {
throw new CatalogDAOSysException("SQLException: "
+ se.getMessage());
}
}
这个函数中在异常的时候,并没有对Connection,PreparedStatement
等资源做关闭等处理,这是为什么????

我看的这个PetStroe是WebLogic7.0中sample目录下的。

看最新的petstore

weblogic的演示程序有些是有大的Bug