java 是否可以将 Hibernate 与 EJB3 一起使用?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16627850/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 23:30:50  来源:igfitidea点击:

Is it possible to use Hibernate with EJB3?

javahibernateejb

提问by diminuta

I can't find any example so I'm starting to doubt whether it is possible or not... But I was asked to build a webapp with both of them...

我找不到任何例子,所以我开始怀疑这是否可能......但我被要求用它们构建一个 webapp......

回答by Ramaraj Karuppusamy

Yes. Its possible.. Please check the below link http://www.techbits.de/2006/04/17/ejb3-persistence-with-hibernate

是的。它可能......请检查以下链接 http://www.techbits.de/2006/04/17/ejb3-persistence-with-hibernate

回答by WeMakeSoftware

In short - yes, it's possible.

简而言之 - 是的,这是可能的。

You can configure hibernate as a entity manager for EJB 3.0.

您可以将休眠配置为 EJB 3.0 的实体管理器。

The configuration takes place in persistence.xmlfile. Here is a link to documentation

配置发生在persistence.xml文件中。这是文档的链接