[gatein-issues] [JBoss JIRA] (GTNPORTAL-3257) REST MOP Import doesn't detect errors on commit
Nicolas Filotto (JIRA)
jira-events at lists.jboss.org
Tue Dec 3 07:42:06 EST 2013
[ https://issues.jboss.org/browse/GTNPORTAL-3257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928165#comment-12928165 ]
Nicolas Filotto commented on GTNPORTAL-3257:
--------------------------------------------
This issue cannot be fixed as expected so we will simply add an error message in the log file instead. Please refer to https://jira.exoplatform.org/browse/WS-284 and https://jira.exoplatform.org/browse/WS-285 for more details
> REST MOP Import doesn't detect errors on commit
> -----------------------------------------------
>
> Key: GTNPORTAL-3257
> URL: https://issues.jboss.org/browse/GTNPORTAL-3257
> Project: GateIn Portal
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: REST API
> Affects Versions: 3.6.0.Final
> Reporter: Toshiya Kobayashi
>
> When you call REST MOP Import:
> {noformat}
> curl -v -u root:gtn -X PUT -H 'Content-type: application/zip' --upload-file portal_classic_2013-06-10_15-16-53.zip http://localhost:8080/rest/private/managed-components/mop?importMode=overwrite
> {noformat}
> It returns 200 OK even if it fails on JCR commit (for example, cache replication timeout).
> Because JCR commit happens in RequestLifeCycle.end() after requestHandler.handleRequest() which flushes http response.
> https://github.com/exoplatform/ws/blob/master/exo.ws.rest.core/src/main/java/org/exoplatform/services/rest/servlet/RestServlet.java
> {code:java}
> protected void onService(ExoContainer container, HttpServletRequest httpRequest, HttpServletResponse httpResponse)
> throws IOException, ServletException
> {
> ...
> try
> {
> EnvironmentContext.setCurrent(env);
> ServletContainerRequest request = new ServletContainerRequest(httpRequest);
> ContainerResponse response = new ContainerResponse(new ServletContainerResponseWriter(httpResponse));
> requestHandler.handleRequest(request, response);
> }
> ...
> finally
> {
> EnvironmentContext.setCurrent(null);
> RequestLifeCycle.end();
> }
> }
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the gatein-issues
mailing list