[
https://issues.apache.org/jira/browse/STANBOL-1131?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rupert Westenthaler updated STANBOL-1131:
-----------------------------------------
Description:
Since the introduction of a OSGI enabled CoreContainer with STANBOL-1081, cores
added by ManagedSolrServers are registered twice as OSGI service:
In details the following happens:
(1) the core is registered - by the OSGI enabled CoreContainer - as part of the
SolrCore registration
(2) the SolrServerAdapter registers the SolrCore a 2nd time after the
registration to the CoreContainer completes and
(3) the first ServiceRegistration is unregistered
Because of that other components having a ServiceListener (e.g. a
ServiceTracker) on SolrCores will receive multiple events. In case of a
ServiceTracker the following events will be received:
* at (1) an addService that the SolrCore is now available
* at (3) an removeService that the SolrCore is no longer available
* immediately followed by an addService event for the service registered at (2)
While components that correctly implement ServiceListener (or use a
ServiceTracker) should not encounter problems with this behavior, this will
still cause multiple exections of initialization code.
As fix the code causing (2) need to be commented.
was:
Since the introduction of a OSGI enabled CoreContainer with STANBOL-???, cores
added by ManagedSolrServers are registered twice as OSGI service:
In details the following happens:
(1) the core is registered - by the OSGI enabled CoreContainer - as part of the
SolrCore registration
(2) the SolrServerAdapter registers the SolrCore a 2nd time after the
registration to the CoreContainer completes and
(3) the first ServiceRegistration is unregistered
Because of that other components having a ServiceListener (e.g. a
ServiceTracker) on SolrCores will receive multiple events. In case of a
ServiceTracker the following events will be received:
* at (1) an addService that the SolrCore is now available
* at (3) an removeService that the SolrCore is no longer available
* immediately followed by an addService event for the service registered at (2)
While components that correctly implement ServiceListener (or use a
ServiceTracker) should not encounter problems with this behavior, this will
still cause multiple exections of initialization code.
As fix the code causing (2) need to be commented.
> SolrServerAdapter does register new SolrCores twice as OSGI services
> --------------------------------------------------------------------
>
> Key: STANBOL-1131
> URL: https://issues.apache.org/jira/browse/STANBOL-1131
> Project: Stanbol
> Issue Type: Bug
> Components: Commons
> Reporter: Rupert Westenthaler
> Assignee: Rupert Westenthaler
> Priority: Minor
>
> Since the introduction of a OSGI enabled CoreContainer with STANBOL-1081,
> cores added by ManagedSolrServers are registered twice as OSGI service:
> In details the following happens:
> (1) the core is registered - by the OSGI enabled CoreContainer - as part of
> the SolrCore registration
> (2) the SolrServerAdapter registers the SolrCore a 2nd time after the
> registration to the CoreContainer completes and
> (3) the first ServiceRegistration is unregistered
> Because of that other components having a ServiceListener (e.g. a
> ServiceTracker) on SolrCores will receive multiple events. In case of a
> ServiceTracker the following events will be received:
> * at (1) an addService that the SolrCore is now available
> * at (3) an removeService that the SolrCore is no longer available
> * immediately followed by an addService event for the service registered at
> (2)
> While components that correctly implement ServiceListener (or use a
> ServiceTracker) should not encounter problems with this behavior, this will
> still cause multiple exections of initialization code.
> As fix the code causing (2) need to be commented.
--
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