[ 
http://jira.dspace.org/jira/browse/DS-383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=11013#action_11013
 ] 

Mark Diggory commented on DS-383:
---------------------------------

Robin, I agree.

The behavior should be that all aspects never call "commit" or "complete" 
during their execution.  The assumption was that all exceptions would be caught 
by the Servlet/Filter.  Since they are not, we are in a position of needing to 
correct the failure behavior.

We don't need a "aspect" for managing this closing. We need the behavior to be 
independent of aspect and part of the implementation.

Perhaps the better approach would be to inspect the code and try to identify 
what the call stack looks like when such exceptions would occur and assure that 
we have an appropriate process in place to propagate those events to the end of 
the request/response cycle in a maner in which the context can be rolled back.

In the dspace-service framework, The transactional window in a webapplication 
is the Servlet Request/Response cycle.  Perhaps it would be ideal to actually 
utilize to for its purpose in this case.

1.) Properly Abort the Request in the dspace-services framework.
2.) Create a RequestListener that will reference and abort || complete the 
existing context at the end of the transactional cycle.

I think this would also be another one of those excellent "stepping stones" 
that assist us in migrating the path to 2.0

Mark





> Auto commit functionality not working correctly in XMLUI
> --------------------------------------------------------
>
>                 Key: DS-383
>                 URL: http://jira.dspace.org/jira/browse/DS-383
>             Project: DSpace 1.x
>          Issue Type: Bug
>          Components: XMLUI
>    Affects Versions: 1.5.2
>            Reporter: Robin Taylor
>            Assignee: Mark Diggory
>
> My understanding is that Dspace provides transactional processing by setting 
> the database connection to auto-commit=false and doing a 'commit' once all 
> processing has completed successfully. However, Manakin has a filter called  
> DSpaceCocoonServletFilter which contains the following code that runs after 
> the request has been passed on for further processing...
>    // Close out the DSpace context no matter what.
>         ContextUtil.closeContext(realRequest);
> This appears to run, commiting changes to the database, even if an Exception 
> is thrown in the main code.
> The code needs to be more intelligent and only do a commit to the database 
> where appropriate. The current catch-all approach causes problems in the 
> event of a failure and also prevents any sort of multiple items upload, eg 
> from a reference manager.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.dspace.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Dspace-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-devel

Reply via email to