English 中文(简体)
是否有一家基于REST的JPA供应商?
原标题:Is there a REST-based JPA provider?

一个共同的要求是通过REST访问JPA数据源。我想要的是相反的情况,即JPA提供商通过将HTTP请求发送到再更新的持久性服务,这样做的好处是,任何针对JPA API的应用程序都可以很容易地在传统的JPA提供商(如Hibernate)和以REST为基础的JPA提供商之间转换,而不需要修改代码。

因此,我的问题是,是否有现有的以REST为基础的JPA供应商,如果不是,这样做是否可行?

最佳回答

Datanucleaus对RESTful json API实施JPA。然而,您的REST API必须恪守其公约:http://www.datanucleus.org/products/accessplatfor_3_0/json/support.html

他们的S3和GoogleStorage延长了json API。

在我最初的回答中 将错误产品联系起来

问题回答

首先,JPA是真正设计 用于关系数据库...

第二,没有关于再生性的标准,因此JPA-REST的提供者将具体用于再生性再生性再生性应用。

可以 执行一些使用 < a href=> http://wiki. eclipse.org/Introduction_to_EIS_Projects_(ELUG)" rel="nofollow" >EclipseLink-EIS 的东西。 您只需创建 JCA_ RestAdapter 执行即可 。

如果您是说“ 可靠持久性服务” 时指的是一个 NOSQL 数据库, 那么也许就是其中之一。 其中一些 NoSQL DB 提供了基于 REST 的界面, 一些 JPA 提供商正在开始支持 NSQL DB 。 见 < a href=> http://wiki. eclipseLink/EclipseLink/ FAQ/ NoSQL" rel= “nofol” > http://wiki. eclipseLink/ FAQ/ NoSQL < /a > 。

诚实地说,你最好只是执行DAO模式, 并抽取你的 CROUD(L) 操作。 这正是 DAO 的目的所在 。

例如,看看“JEST”:

https://www.ibm.com/developmenterworks/my Developmenterworks/blogs/pinaki/entry/rest_and_jpa_working_ongong71?lang=en" rel=en"rel=nofollow">https://www.ibm.com/developersworks/my Developersworks/blogs/pinaki/entry/rest_and_jpa_working_ong71?lang=en

REST is not an API (Application Programming Interface). It is an architectural style that prescribes not to have an API to access the facilities of a service.

.

On the opposite end of the stateless spectrum lies the principle of JEE Application Servers -- where the server maintains state of everything and there exists one (or multiple) API for everything. Such server-centric, stateful, API-oriented principles of JEE led to several roadblocks.

.

I found REST principles concise and elegant. I also find Java Persistence API (JPA) providers have done a great job in standardizing and rationalizing the classic object-relational impedance mismatch. JPA is often misconstrued as a mere replacement of JDBC -- but it is much more than JDBC and even more than Object-Relational Mapping (ORM). JPA is be a robust way to view and update relational data as an object graph. Also core JPA notions such as detached transaction or customizable closure or persistent identity are seemed to neatly aligned with REST principles.

进一步链接:





相关问题
Allow RESTful DELETE method in asp.net mvc?

im currently setting up asp.net to accept DELETE http verb in the application. However, when i send "DELETE /posts/delete/1" i always get a 405 Method not allow error. I tried to take a look at ...

Most appropriate API for URL shortening service

I ve just finished an online service for shortening URLs (in php5 with Zend Framework); you can enter an URL and you get an short URL (like tinyurl and such sites). I m thinking about the API for ...

Use HTTPClient or HttpUrlConnection? [closed]

We re implementing a REST client on JRE 1.4. Seems two good options for a client REST framework are HttpClient and HttpUrlConnection. Is there a reason to use HttpClient over the JRE s ...

Why can t I find the truststore for an SSL handshake?

I m using the Spring RESTTemplate on the client side to make calls to a REST endpoint. The client in this case is a Spring app and Tomcat is the servlet container. I m running into issues making a ...

Which Http redirects status code to use?

friendfeed.com uses 302. bit.ly uses 301. I had decided to use 303. Do they behave differently in terms of support by browsers ?

Three Step Buyonline The RESTful way

We are re-developing our buyonline functionality and we are doing it the RESTful way. The process is a three step one and the customer is asked to enter data at each step. Let s say the three URL s ...

热门标签