Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "EclipseLink/Development/JPA-RS"

(EclipseLink JPA-RS Development)
(Planned Features/Bugs)
Line 16: Line 16:
 
! Target Release
 
! Target Release
 
|-
 
|-
| {{bug|387313}} || PUT/POST ||Cannot create an entity containing reference (1-to-1) to another entity, using JPA-RS with static PU  || Fixed || ?
+
| {{bug|387313}} || PUT/POST ||Cannot create an entity containing reference (1-to-1) to another entity, using JPA-RS with static PU  || Fixed || 2.4.1
 
|-
 
|-
| {{bug|387636}} || POST ||Swallowed exception in PersistenceContext::updateOrAddAttribute || Fixed || ?  
+
| {{bug|387636}} || POST ||Swallowed exception in PersistenceContext::updateOrAddAttribute || Fixed || 2.4.1  
  
 
|}
 
|}

Revision as of 08:43, 19 September 2012

EclipseLink JPA-RS Development

The EclipseLink 2.4.0 release introduced JPA-RS allowing developers to easily expose persistence units over REST (JAX-RS). The intent was to allow clients (HTML5/JS, Mobile, JavaSE/JavaFX) to easily access persistent data over REST with JSON or XML. This page tracks the ongoing feature development of JPA-RS including planned features for upcoming releases as well as a back-log of future enhancements. The details of each item will be tracked within its bug and associated wiki pages or documents.

See the API in Development here.

Planned Features/Bugs

Bug Issue Description Status Target Release
bug 387313 PUT/POST Cannot create an entity containing reference (1-to-1) to another entity, using JPA-RS with static PU Fixed 2.4.1
bug 387636 POST Swallowed exception in PersistenceContext::updateOrAddAttribute Fixed 2.4.1

Proposed Features

Bug Issue Description
 ? Config File Add an optional XML configuration which when provided controls which persistence units are made available through JPA_RS and what operations within each persistence unit are made available. This configuration file will also control extended functionality where any existing or custom JPA-RS operation can have a custom handler specified or a handler can be specified to intercept all operations or all unsupported requests.
bug 387218 Pagination Support pagination (count, first, max, getNext<N>) using URI query parameters.
 ? Partial Entities Add support for clients being able to request partial entities and graphs that will reduce the payload size or reduce the number of requests required to retrieve and to pass back an entity graph.
 ? Detailed error response Add support for clients being able to get more information in an error response. Please note that this is an addition to the HTTP error/status code that is currently being returned in response. The JPA-RS would return an error message in the body of the response that would contain an (EclipseLink specific) error code and description. As an example, an error response would look like :

{

 "code":"1245",
 "description":"invalid query"

}


With the existing implementation, you will get following error response if you try to read a non-existing entity, even if you want the response back in JSON format. I think returning error in the format suggested above will make the error handling easier.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>GlassFish Server Open Source Edition 3.1.2 - Error report</title><style type="text/css"></style> </head><body>

HTTP Status 404 - Not Found


type Status report

messageNot Found

descriptionThe requested resource (Not Found) is not available.


GlassFish Server Open Source Edition 3.1.2

</body></html>
 ? Parsing response containing links Add support for clients being able to easily parse/retrieve links from rest responses.


Back to the top