优点&缺点:Hibernate与EJB 3 [英] Pros & Cons: Hibernate vs. EJB 3
问题描述
我发现这个
一个>后,但它并没有真正解决我的问题。如果我对这两种技术没有特别的联系,那么我会选择哪一种呢?或者是否有我想同时使用的情况?谢谢,
Zack
编辑:回复评论:我对EJB3不太了解。我只是想知道这对我的公司是否可行。如果EJB3与Hibernate没有可比性,请解释原因。JPA提供了Hibernate功能的一个子集,但EJB3提供了Hibernate无法解决的其他服务(例如Web服务,EJB,定时服务)。 与Hibernate相比,JPA提供了以下优势: Hibernate提供以下好处: 您可以使用JPA在EJB中编写应用程序,使用Hibernate特有的功能。或者,如果您不关心标准化和供应商锁定,只需使用普通的Hibernate进行持久化即可。实际上,你不太可能在Hibernate和其他提供商之间切换,但确实发生了。 What are the advantages and disadvantages of Hibernate & EJB3 relative to each other? I found this post, but it didn't really address my question. If I don't have any particular tie to either technology, what would cause me to pick one over the other? Or are there situations where I would want to use both? Thanks,
Zack edit: in response to comments: I don't know much about EJB3. I'm just trying to learn if it's something that would be viable for my company. If EJB3 isn't comparable to Hibernate, please explain why. JPA provides a subset of Hibernate functionality, but EJB3 provides other services that Hibernate does not address (e.g. Web services, EJBs, Timer service) JPA offers the following benefits compared to Hibernate: Hibernate offers the following benefits: What you can do is write your application in EJB using JPA and then when necessary use Hibernate-specific features. Or just use plain Hibernate for persistence if you don't care about standardization and vendor lock-in. Realistically, it's unlikely you will switch between Hibernate and another provider, but it does happen. 这篇关于优点&缺点:Hibernate与EJB 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
$ b