实体类的会话Bean错误消息:"EJB远程接口取决于JPA实体类..." [英] Session Bean for Entity Classes error message: "EJB Remote Interface depends on JPA Entity classes ..."

查看:166
本文介绍了实体类的会话Bean错误消息:"EJB远程接口取决于JPA实体类..."的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在NetBeans 7.1中创建了一个新的EnterpriseApplication(EA).在EJBModule中添加了一些JPA实体.现在,我想在EnterpriseApplication中添加一些Remote SessionBean.

I have created a new EnterpriseApplication (EA) in NetBeans 7.1. Added some JPA entities in the EJBModule. Now I want to add some Remote SessionBeans in the EnterpriseApplication.

然后右键单击EJBModule,为实体类选择Session Bean.然后选择需要会话Bean的实体.在第3步"窗口中,我选中远程接口"复选框,然后从组合框中选择类库项目".

Then right clicked on the EJBModule, selected Session Bean for Entity Classes. Then selected the Entities for which Session Bean is required. In the Step 3 window, i select the Remote interface check box and select the Class Library Project from the combo box.

那是当我收到一条错误消息,指出"EJBRemote接口取决于JPA实体类.如果JPA实体位于"myejb"中,则无法访问

That is when i get an Error message stating "EJBRemote Interface depends on JPA Entity Classes. JPA Entities are inaccessible if they are located in the "myejb"

这是NetBeans 7.1中的bug还是我缺少什么?

Is this a bug in NetBeans 7.1 or am i missing something?

推荐答案

您应该在类库项目中创建实体类,将项目包含在EJBModule项目依赖项中,然后在EJBModule项目中为实体类创建会话bean. .远程接口将在类库"项目中创建.

You should create the entity classes in the Class Library Project, include the project in the EJBModule project dependencies and then create the session beans for entity classes in the EJBModule project. The remote interfaces will be created in the Class Library project.

这篇关于实体类的会话Bean错误消息:"EJB远程接口取决于JPA实体类..."的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆