[ 
https://issues.apache.org/jira/browse/SLING-4925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14658242#comment-14658242
 ] 

Robert Munteanu edited comment on SLING-4925 at 8/5/15 1:53 PM:
----------------------------------------------------------------

I think that what happens is that the OsgiInstaller and JcrInstaller are 
stepping on each other's toes, and that's an effect of the JcrInstaller having 
a dependency on the SlingRepository service.

On 'regular' startup, when the config is not yet created, the created 
configuration is picked up by the OsgiInstaller and processed as is. Obviously, 
the JcrInstaller did not have the time to register the config as an installable 
resource with the OsgiInstaller as it was not yet installed.

When the bundle is restarted, the JCR installer quickly picks up the existing 
configurations - they were written in the repository - and registers them with 
the OSGi installer and they are no longer marked as deleted.

What's also interesting is that when the o.a.s.installer.configuration.factory 
bundle is moved to a later start level, it logs nothing related to the 
SlingServerRepository config, probably since it was already processed and 
there's nothing to do.

At this point I think this is a special case due to the special nature of the 
SlingServerRepository component - it does provide the repository after all, and 
not worth pursuing at the moment. I will investigate what needs to be done for 
the o.a.s.jcr.jackrabbit.server bundle to store its config in provisioning 
model.

_edit_: SlingRepositoryServer -> SlingServerRepository


was (Author: rombert):
I think that what happens is that the OsgiInstaller and JcrInstaller are 
stepping on each other's toes, and that's an effect of the JcrInstaller having 
a dependency on the SlingRepository service.

On 'regular' startup, when the config is not yet created, the created 
configuration is picked up by the OsgiInstaller and processed as is. Obviously, 
the JcrInstaller did not have the time to register the config as an installable 
resource with the OsgiInstaller as it was not yet installed.

When the bundle is restarted, the JCR installer quickly picks up the existing 
configurations - they were written in the repository - and registers them with 
the OSGi installer and they are no longer marked as deleted.

What's also interesting is that when the o.a.s.installer.configuration.factory 
bundle is moved to a later start level, it logs nothing related to the 
SlingServerRepository config, probably since it was already processed and 
there's nothing to do.

At this point I think this is a special case due to the special nature of the 
SlingRepositoryServer component - it does provide the repository after all, and 
not worth pursuing at the moment. I will investigate what needs to be done for 
the o.a.s.jcr.jackrabbit.server bundle to store its config in provisioning 
model.

> Installer kills SlingServerRepository config if 
> o.a.s.installer.factory.configuration starts at boot
> ----------------------------------------------------------------------------------------------------
>
>                 Key: SLING-4925
>                 URL: https://issues.apache.org/jira/browse/SLING-4925
>             Project: Sling
>          Issue Type: Bug
>            Reporter: Bertrand Delacretaz
>            Assignee: Robert Munteanu
>
> In revision 1693392 [~rombert] moved the 
> o.a.s.installer.factory.configuration bundle to the :boot section (start 
> level 1), and this prevents the Jackrabbit SlingRepository from running.
> Below is the logs which show that the installer wrongly deletes the 
> repository configuration, probably due to interference with the config 
> writeback under 
> {{/apps/sling/install.org.apache.sling.jcr.jackrabbit.server.SlingServerRepository-<pid>}}.
>  If I set a breakpoint in the {{ConfigRemoveTask}} and set its cfg variable 
> to null to prevent it from removing the config, all is well.
> Log excerpts:
> $ egrep 'verifyConfig|SlingServer.*REGISTERED|Deleted.*SlingServer|Repository
> has been' sling/logs/error.log
> 04.08.2015 16:36:32.198 *INFO* [OsgiInstallerImpl]
> org.apache.sling.jcr.jackrabbit.server.impl.Activator
> verifyConfiguration: Created configuration
> org.apache.sling.jcr.jackrabbit.server.SlingServerRepository.98b4bd1c-11f8-49e7-a5ed-684abf3acfc6
> for org.apache.sling.jcr.jackrabbit.server.SlingServerRepository
> 04.08.2015 16:36:37.482 *INFO* [OsgiInstallerImpl]
> org.apache.sling.jcr.jackrabbit.server Service
> [org.apache.sling.jcr.jackrabbit.server.SlingServerRepository.98b4bd1c-11f8-49e7-a5ed-684abf3acfc6,229,
> [org.apache.sling.jcr.api.SlingRepository, javax.jcr.Repository,
> org.apache.jackrabbit.api.management.RepositoryManager]] ServiceEvent
> REGISTERED
> 04.08.2015 16:36:38.783 *INFO* [CM Event Dispatcher (Fire
> ConfigurationEvent:
> pid=org.apache.sling.jcr.jackrabbit.server.SlingServerRepository.98b4bd1c-11f8-49e7-a5ed-684abf3acfc6)]
> org.apache.jackrabbit.core.RepositoryImpl Repository has been shutdown
> 04.08.2015 16:45:25.610 *INFO* [OsgiInstallerImpl]
> org.apache.sling.audit.osgi.installer Deleted configuration
> org.apache.sling.jcr.jackrabbit.server.SlingServerRepository.org.apache.sling.jcr.jackrabbit.server.SlingServerRepository.98b4bd1c-11f8-49e7-a5ed-684abf3acfc6
> from resource 
> TaskResource(url=jcrinstall:/apps/sling/install/org.apache.sling.jcr.jackrabbit.server.SlingServerRepository-98b4bd1c-11f8-49e7-a5ed-684abf3acfc6.config,
> entity=config:org.apache.sling.jcr.jackrabbit.server.SlingServerRepository.org.apache.sling.jcr.jackrabbit.server.SlingServerRepository.98b4bd1c-11f8-49e7-a5ed-684abf3acfc6,
> state=UNINSTALL,
> attributes=[service.factoryPid=org.apache.sling.jcr.jackrabbit.server.SlingServerRepository,
> installation.hint=launchpad:resources/install.jackrabbit/15/org.apache.sling.jcr.jackrabbit.server-2.2.1-SNAPSHOT.jar,
> resource.uri.hint=org.apache.sling.jcr.jackrabbit.server.SlingServerRepository-98b4bd1c-11f8-49e7-a5ed-684abf3acfc6,
> service.pid=org.apache.sling.jcr.jackrabbit.server.SlingServerRepository.98b4bd1c-11f8-49e7-a5ed-684abf3acfc6],
> digest=588c513978ea07a8a9091048913e231e)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to