我的session bean:
@Stateless
@Remote
@Local
public class UserManagerBean implements UserManager {
@Override
public void saveUser(User user) {
System.out.println("user[name="+user.getName()+"]已被保存");
user.setId(1);
}
}我部署到jboss时出现以下异常:
javax.ejb.EJBException: Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean
at org.jboss.ejb3.SessionContainer.checkForDuplicateLocalAndRemoteInterfaces(SessionContainer.java:134)
.....如果去掉Local接口,就可以部署上,并能实现remote调用,
请问是什么原因??
谢谢!!!!!

解决方案 »

  1.   

    Local and Remote Interfaces cannot have duplicate interface for bean UserManagerBean 
    一个接口不能同时是local和remote的通常情况下,分开定义。@Stateless
    public class NewSessionBean implements NewSessionRemote, NewSessionLocal {
        
        // Add business logic below. (Right-click in editor and choose
        // "Insert Code > Add Business Method" or "Web Service > Add Operation")
     
    }
      

  2.   

    http://www.cnblogs.com/jackyrong/archive/2008/07/27/1252645.html
    这里有解答
      

  3.   

    http://www.cnblogs.com/jackyrong/archive/2008/07/27/1252645.html 
    这里有解答
    我也是这个问题。