【发布时间】:2012-09-28 10:02:26
【问题描述】:
我有@Local接口
@Local
public interface IRepo
{
还有两个实现,但是只有1个 bean实现
@Stateless(name = "RepoBean")
public class RepoBean implements IRepo
{
秒
public class SimpleRepo implements ILogRepositoryIRepo
{
并使用
将其注入我的 Web 服务 @EJB(name = "RepoBean")
private IRepo repository;
它在jboss 和WebLogic 上运行良好。但是在GlassFish 3.1.1 我得到错误(部署时)
Cannot resolve reference Local ejb-ref name=RepoBean,Local 3.x interface =com.company.IRepo,ejb-link=null,lookup=,mappedName=,jndi-name=,refType=Session because there are 2 ejbs in the application with interface com.company.IRepo.
但我只有 1 个 ejb 实现。
有任何想法吗?也许我可以使用一些部署描述符或其他东西。EJB 3.0, Java EE 5
【问题讨论】:
标签: java jakarta-ee glassfish ejb-3.0