Hi Nicola,

On Fri, 2020-12-11 at 16:16 +0100, Nicola Cisternino wrote:
> Hi all
> 
> I'm using Sling Datasource Bundle (org.apache.sling.datasource) and I
> configured two entries named (datasource.name property): *source1*
> and 
> *source2*.
> I can select single datasource using DS annotations:
> 
> @Reference(target = 
> "(&(objectclass=javax.sql.DataSource)(datasource.name=*source1*))")
> private DataSource dataSource;
> 
> But ... how can I select single datasource programmatically ?

How do you select the datasources programatically now? 

As a side note, I'd try to stick to declarative services as much as
possible as it makes things simpler to write and understand.

Thanks,
Robert

Reply via email to