getallrecords.txt

来自「ejb的学习资料」· 文本 代码 · 共 15 行

TXT
15
字号
public Collection getAllRecords(){
    Vector vectUserInfos = new Vector();
    try {    
       Context ctx = new InitialContext();
       Object ref = ctx.lookup("CustomerHome");
       CustomerHome customerHome = (CustomerHome)
       PortableRemoteObject.narrow(ref,CustomerHome.class);
       Collection collection = customerHome.findAll();
       return collection;
    }  catch(Exception e) {
          e.printStackTrace();
       }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?