新手,求教一个EJB的问题,弄了一晚上了 各位大侠救命```在线等
会话外观模式写的public Collection<Book> findAll()throws Exception
{
Collection<Book> rt=new ArrayList<Book>();
Context ctx = new InitialContext();
BookEntityHome localhome = (BookEntityHome)ctx.lookup("znn/BookEntityEJB");
BookEntity obj = (BookEntity) localhome.findAll();//findAll()返回Collection
Book book=new Book();
book.setId(obj.getBookID());
book.setName(obj.getBookName());
book.setPrice(obj.getBookPrice());
book.setAuthor(obj.getBookAuthor());
rt.add(book);
return rt;
}
出现异常,请问是哪里出错了
[[it] 本帖最后由 kenda525 于 2008-2-29 00:06 编辑 [/it]]