Migrating Apache Felix SCR to OSGI Declarative Services

183 Views Asked by At

I'm Migrating from Apache Felix SCR Annotations to OSGI Declarative Services and here is my Problem.

Before I had: SCR annotation Implementation

@Component (ds = true, immediate = true, metatype = false, policy = ConfigurationPolicy.OPTIONAL)
@Service (SampleService.class)
public class SampleServiceImpl implements SampleService
{
 ..
 ..
}

Now I have : DS annotation Implementation

@Component (configurationPolicy = ConfigurationPolicy.OPTIONAL, immediate = true, service = SampleService.class)
public class SampleServiceImpl implements SampleService
{
 ..
 ..
}

In DS annotation Implementation How i have to map ds and metatype params?

Else it is fine to ignore ds and metatype params?

1

There are 1 best solutions below

2
On BEST ANSWER

ds=true as well as metatype=false are the defaults anyway. You can safely ignore them in your case.