Java ejb3-persistence.jar 源码

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/307848/
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-08-11 12:57:17  来源:igfitidea点击:

ejb3-persistence.jar source

javajpaopen-sourcepersistence

提问by Randy Stegbauer

Well, I must be brain-damaged, because I can't find the java source for Sun's persistence.jar or JBoss's ejb3-persistence.jar JPA package. They areopen-source aren't they?

好吧,我一定是脑残了,因为我找不到Sun的persistence.jar或JBoss的ejb3-persistence.jar JPA包的java源。他们开源的,不是吗?

I looked all over the java.sun.com site as well as the GlassFish wiki, but came up empty.

我查看了 java.sun.com 站点以及 GlassFish wiki,但发现是空的。

I'd like a src.zip or folder like Sun delivers with Java JDKs.

我想要一个 src.zip 或像 Sun 随 Java JDK 一起提供的文件夹。

Of course, I reallydon't haveto have it, but I think it's fun to browse the source once in a while. And it helps me to debug my code sometimes.

当然,我真的没有必要拥有它,但我认为偶尔浏览一下源代码很有趣。有时它可以帮助我调试我的代码。

回答by dljava

The ejb3-persistence.jar contains the JPA API (javax.persistance.*) implementation which specified as part of the EJB 3.0 JSR 220 specification (the upcoming specification for JPA is JSR 317 which is now separate from EJB 3.1 spec)

ejb3-persistence.jar 包含 JPA API (javax.persistance.*) 实现,该实现指定为 EJB 3.0 JSR 220 规范的一部分(即将推出的 JPA 规范是 JSR 317,它现在​​与 EJB 3.1 规范分开)

The reference implementation is the one included with the Glassfish, I believe the one used in JBoss is the Hibernate implementation so you should be able to find the source code there. You are free to use the one whose license satisfies your need (if you need to redistribute) although I believe they are all redistributable. For an Apache style license I recommend the one used by the Apache OpenEJB.org project (provided by the Apache Geronimo project).

参考实现是包含在 Glassfish 中的实现,我相信 JBoss 中使用的实现是 Hibernate 实现,因此您应该能够在那里找到源代码。您可以自由使用许可证满足您需要的许可证(如果您需要重新分发),尽管我相信它们都是可重新分发的。对于 Apache 风格的许可证,我推荐 Apache OpenEJB.org 项目(由 Apache Geronimo 项目提供)使用的许可证。

You can browse the source here: http://svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-jpa_3.0_spec/src/main/java/javax/persistence/

您可以在此处浏览源代码:http: //svn.apache.org/repos/asf/geronimo/specs/trunk/geronimo-jpa_3.0_spec/src/main/java/javax/persistence/

回答by Somatik

I just did a search on http://www.mvnrepository.comfor persistence api

我刚刚在http://www.mvnrepository.com 上搜索了持久性 api

http://mirrors.ibiblio.org/pub/mirrors/maven2/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar

http://mirrors.ibiblio.org/pub/mirrors/maven2/javax/persistence/persistence-api/1.0/persistence-api-1.0-sources.jar

also available in the java.net maven 1 repository http://download.java.net/maven/1/javax.persistence/java-sources/

也可以在 java.net maven 1 存储库 http://download.java.net/maven/1/javax.persistence/java-sources/ 中找到

for the implementations see hibernate entity manager, openjpa, eclipse toplink, glassfish persistence, ...

有关实现,请参阅 hibernate 实体管理器、openjpa、eclipse toplink、glassfish 持久性,...

回答by Taufiq

If all you're looking for is something to attach in eclipse, an SVN checkout should be all that you need, though I realise that this isn't exactly the answer you're looking for. The source for the JPA API for jboss can be found in http://anonsvn.jboss.org/repos/hibernate/jpa-api/- check out the tag for the version of hibernate included with your version of jboss and you can attach the resulting folder as you would a zip file with the source.

如果您正在寻找的只是在 eclipse 中附加的东西,那么 SVN checkout 应该就是您所需要的,尽管我意识到这并不是您正在寻找的答案。jboss 的 JPA API 的源代码可以在http://anonsvn.jboss.org/repos/hibernate/jpa-api/ 中找到- 查看你的 jboss 版本中包含的 hibernate 版本的标签,你可以附加生成的文件夹就像带有源的 zip 文件一样。

回答by feegloo