首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 软件管理 > 软件架构设计 >

解决部署EJB出现的错误:Local and Remote Interfaces cannot have duplicate interface for .

2012-07-02 
解决部署EJB出现的异常:Local and Remote Interfaces cannot have duplicate interface for ...部署EJB出

解决部署EJB出现的异常:Local and Remote Interfaces cannot have duplicate interface for ...

部署EJB出现的异常:Local and Remote Interfaces cannot have duplicate interface for ...

在编写EJB实现类是,如果同时在一个实现类里声明远程接口与本地接口时,需要指定其接口的类型:

?

例如:

package com.ejb.jboss.dao.impl;import javax.ejb.Local;import javax.ejb.Remote;import javax.ejb.Stateless;import com.ejb.jboss.bean.User;import com.ejb.jboss.dao.UserManager;@Stateless@Remote(UserDAO.class)@Local(UserDAO.class)public class UserManagerBean implements UserManager {public void addUser(User user) {System.out.println("保存");}}

热点排行