[ 
http://jira.amdatu.org/jira/browse/AMDATU-558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12661#comment-12661
 ] 

Marcel Offermans commented on AMDATU-558:
-----------------------------------------

Let me start by explaining in a bit more detail what normally happens during a 
session (when initiated by deployment admin, as explained in the flow chart in 
114.8 of the spec):

First of all, each session reads and processes a deployment package as a 
stream, so the order in which things appear in that package is relevant and 
partially specified in figure 114.5. The important part is that bundles appear 
before resources.

The flow chart then continues with:

# Installing or updating all bundles.
# Starting the customizers (ie. the resource processors).
# Processing the resources.
# Dropping stale resources.
# Uninstalling stale bundles.
# Invoking 'prepare' on all resources.
# Invoking 'commit' on all resources.
# Starting all bundles.

Note that formally the spec states that for each install or update of a 
deployment package, all bundles should first be stopped. Because this feels 
like "stopping the world" the Felix implementation has a property to not do 
that (and by default we encourage people to use that with ACE).

This process also shows a couple of "mismatches" when comparing it to the way 
FileInstall works. FileInstall does not have the notion of a session, nor does 
it order the updates (bundles first, then resources). So with our "plugin" for 
FileInstall, we can only simulate part of this process and there will always be 
differences that can bite us.

Therefore, the proposal I have is to replace FileInstall with a "directory 
scanner" that creates deployment packages on the fly and feed these to a 
management agent. By doing that, we ensure we use the same mechanism to install 
and update bundles, regardless of our use of ACE. Writing such a scanner should 
not take more than a day.

The other alternative would be to fix the issues you (Bram) mention:

1) I would prefer to create a plugin for FileInstall that allows us to use the 
same bundle locations that real deployment packages would use. That way we can 
reuse the exact same XML files in both cases.

2) The session does not end after commit. Commit is invoked on all resource 
processors and then all bundles are started. Only when that is done, will 
deployment admin end the session (and send a "completed" event). We need to 
simulate that behaviour and accept that we have to create a session for each 
individual resource (instead of one global session).

3) Does that somehow end in an infinite loop. I don't quite see it yet, but if 
you can write an integration test to demonstrate this scenario, we can discuss 
potential solutions.


                
> Replace tenantconf deployment with Felix autoconf snapshot
> ----------------------------------------------------------
>
>                 Key: AMDATU-558
>                 URL: http://jira.amdatu.org/jira/browse/AMDATU-558
>             Project: Amdatu
>          Issue Type: Task
>          Components: Amdatu Core
>            Reporter: Bram de Kruijff
>             Fix For: Sprint 5
>
>
> AMDATU-498 generalized the tenantconf enhancemente to standard Apache Felix 
> autoconf/metatype. However, these changes have not yet been integrated into 
> the platform build. 
> TODO;
> * take snapshot of Felix autoconf/metatype
> * integrate in release / kitchensink
> * move tenantconf to attic
> * update documentation

--
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

Reply via email to