没有JavaEE 6可以使用JPA 2.0吗? [英] Can JPA 2.0 be used without JavaEE 6?

查看:162
本文介绍了没有JavaEE 6可以使用JPA 2.0吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 OpenJPA 2.1 (实现 JPA 2.0 )作为命令行实用程序。我正在使用 JPA 2.0 的新类。
我的编译目标是 Java SE 1.6

I am using OpenJPA 2.1 (which implements JPA 2.0) for a command line utility. I am using classes that are new for JPA 2.0. My compile target is Java SE 1.6

OpenJPA 2.1 附带所有 JPA 2.0 javax.persistence。* 接口/实现。

OpenJPA 2.1 comes with all JPA 2.0 javax.persistence.* interfaces/implementations.

我可以声称我的实用程序没有依赖性在 JavaEE 6

Can I claim that my utility has no dependence on JavaEE 6?

我的理解是 JavaEE 6 是标准的集合。因此,在任何其他随机标准集方面都没有区别。因此 JavaEE 6 取决于 JPA 2.0 ,但 JPA 2.0 不依赖于 JavaEE 6 ,对吗?

My understanding is that JavaEE 6 is a collection of standards. So it is no different in that respect from any other random set of standards. Hence JavaEE 6 depends on JPA 2.0, but JPA 2.0 does not depend on JavaEE 6, correct?

推荐答案

JPA 2.0是一个独立的标准,您可以在没有应用程序服务器的独立Java应用程序中使用它。事实上,很多人在 spring 中使用JPA不需要任何容器运行。

JPA 2.0 is a an independent standard, you can use it in a standalone Java application without application server. In fact many people are using JPA in spring - which does not require any container to run.

这篇关于没有JavaEE 6可以使用JPA 2.0吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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