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

Chetan Mehrotra commented on OAK-2972:
--------------------------------------

bq. 1) make bindBlobDataSource a NOP when customBlobDataSource = false

Thats tricky. As bind might be called before activate so you would not have 
access to the OSGi config to check if customBlobDataSource has been actually 
set or not

bq. 2) change the default @Reference/target for blobDataSource to something else
Thats one option

bq. make registerNodeStore a NOP when the node store is already registered
That can be done but we should still avoid such situation

bq. 4) remove support for customBloBDataSource until we have cleaned up the code
That looks best to me. When I originally added that I overlooked the fact that 
both DataSource have same target. If we remove {{customBlobDataSource}} then 
user can still change the target for blobDataSource and activate would still 
wait for both reference to be not null before proceeding

So I would prefer #4


> DocumentNodeStore gets initialized multiple time with RDB persistence
> ---------------------------------------------------------------------
>
>                 Key: OAK-2972
>                 URL: https://issues.apache.org/jira/browse/OAK-2972
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: rdbmk
>    Affects Versions: 1.2.2, 1.3.0, 1.0.14
>            Reporter: Chetan Mehrotra
>            Assignee: Julian Reschke
>              Labels: osgi
>             Fix For: 1.3.1, 1.2.3, 1.0.15
>
>
> Depending on startup sequence it can happen that {{DocumentNodeStore}} gets 
> initialized multiple times. 
> So far with Mongo {{DocumentNodeStoreService}}  was only dependent on one 
> external reference of {{BlobStore}}. However with RDB there are two more 
> external reference for {{DataSource}} one for nodes and other for blobs. 
> SCR (Felix Service Component Runtime) would invoke both {{bindDataSource}} 
> and {{bindBlobDataSource}} and currently there is no check to avoid re 
> initialization. 



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

Reply via email to