[
http://jira.amdatu.org/jira/browse/AMDATU-507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12290#comment-12290
]
Jan Willem Janssen commented on AMDATU-507:
-------------------------------------------
There are several ways of making the install/uninstall/update methods perform
their work "atomically".
One could be that you create a Executors#singleThreadExecutor and create a new
Runnable task for it for each install/uninstall/update method. The executor has
an unbound queue with order-of-execution guarantees, so all tasks will be
processed in order. One last thing you might want to do is to create individual
sessions for your resource processor to ensure no other external
service-consumer is calling it as well...
BTW: according to the spec you need to rollback the resource processor if an
exception occurs...
> Code review: fileinstall.autoconf
> ---------------------------------
>
> Key: AMDATU-507
> URL: http://jira.amdatu.org/jira/browse/AMDATU-507
> Project: Amdatu
> Issue Type: Improvement
> Components: Amdatu Core
> Reporter: Jan Willem Janssen
> Assignee: Jan Willem Janssen
> Labels: code_review
> Fix For: Sprint 2
>
>
> My code review:
> * redundant service-lifecycle methods (start/stop);
> * the install/uninstall/update methods are using synchronized blocks icw
> framework calls; possible deadlocks!
> * the install/uninstall/update methods want to perform an atomic block, which
> should be implemented in a different way (see Felix'
> AutoConfResourceProcessor for example);
> * possible resource leaks: new FileInputStreams are created, but never closed
> properly;
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
http://jira.amdatu.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
Amdatu-developers mailing list
[email protected]
http://lists.amdatu.org/mailman/listinfo/amdatu-developers