好好看一看ejb的基础吧,因为你的entity bean是本地的,当然没法远程访问

解决方案 »

  1.   

    我的意思是如果SessionBean和EntityBean不是在同一台机器上的话, SessionBean中调用EntityBean肯定是只能通过Remote Interface吧?但是,这样的话,像上面的student.getClass() 这样就不能用了啊
    getClass()这个方法在JBuilder里面,CMR-Field-Property的选项只有 local 和none 啊
    如果我选local它这个方法只是复制到Local Interface中,而在Remote Interface中没有声明.问题就是,如果SessionBean和EntityBean不是在同一台机器上,而且又要用到Bean之间的关联关系,那要怎么做呢?另外 ps. Entity bean是本地的也可以远程访问吧?
      

  2.   

    通过cmp自己会帮你定好,至于不在同一台机器上可以多个remote,以前在同一台上就是localhome,这个同样做的
      

  3.   

    relation必须用local接口,是ejb2.0规范上写的
      

  4.   

    relation必须用local接口, 使用localinterface 必须是在同一个jvm里面才可以