How to create a project in WebLogic Workshop (version 10.3) with support for JPA entity beans?
如何在支持JPA实体bean的WebLogic Workshop(版本10.3)中创建项目?
I am trying create a separate EJB and EJBClient projects in Workshop and EJB3 session beans work just fine, but I am having problems with JPA entity beans.
我正在尝试在Workshop和EJB3会话bean中创建一个单独的EJB和EJBClient项目工作得很好,但我遇到了JPA实体bean的问题。
It seems that when creating a new project you can add support for JPA and BEA Kodo if you are creating a web project, but for some reason you can't add JPA support to a EJB project.
在创建新项目时,如果要创建Web项目,则可以添加对JPA和BEA Kodo的支持,但由于某种原因,您无法向EJB项目添加JPA支持。
I do want to separate my EJB3/entity bean stuff and Web stuff to separate projects. How can I do that?
我确实希望将我的EJB3 /实体bean内容和Web内容分离到单独的项目中。我怎样才能做到这一点?
Should I just add Kodo/JPA .jar to my EJB project? Or should I make a separate Dynamic webproject and treat that as a EJB project.
我应该只将Kodo / JPA .jar添加到我的EJB项目中吗?或者我应该创建一个单独的动态webproject并将其视为EJB项目。
Working example projects would be nice ;)
工作示例项目会很好;)
2 个解决方案
#1
1
http://jaiswaltraining.com/ejb3/weblogic/ch2.php provides some step by step examples of EJB3, Entity Beans with JPA, datasource creation, and everything in Eclipse.
http://jaiswaltraining.com/ejb3/weblogic/ch2.php提供了EJB3,带有JPA的实体Bean,数据源创建以及Eclipse中的所有内容的一些分步示例。
#2
0
Simplest thing seems to be to just add the JPA libraries to EJB project and be done with it. It seems that Workshop has no specific support for JPA in EJB projects. Not that it is needed.
最简单的事情似乎是将JPA库添加到EJB项目中并完成它。似乎Workshop在EJB项目中没有对JPA的特定支持。不是说它是必需的。
#1
1
http://jaiswaltraining.com/ejb3/weblogic/ch2.php provides some step by step examples of EJB3, Entity Beans with JPA, datasource creation, and everything in Eclipse.
http://jaiswaltraining.com/ejb3/weblogic/ch2.php提供了EJB3,带有JPA的实体Bean,数据源创建以及Eclipse中的所有内容的一些分步示例。
#2
0
Simplest thing seems to be to just add the JPA libraries to EJB project and be done with it. It seems that Workshop has no specific support for JPA in EJB projects. Not that it is needed.
最简单的事情似乎是将JPA库添加到EJB项目中并完成它。似乎Workshop在EJB项目中没有对JPA的特定支持。不是说它是必需的。