I noticed that org.apache.felix.scr is exported by one of the bundles in AEM
6.0 but not in AEM 6.3. There seems to be a bundle by name of org.apache.felix.scr in 6.3 also but it doesn't export the same package.
Is this expected? Or this is a bug with my copy of 6.3?
Should the org.apache.felix.scr jar be installed as an external dependency in 6.3 if it's being used by any custom bundle?
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
Apologies re-looked at your question, have a look at:ServiceComponentRuntime (http://javadox.com/org.osgi/osgi.cmpn/6.0.0/org/osgi/service/component/runtime/ServiceComponentRunti... )
It can do following things:
final Collection<ComponentDescriptionDTO> descs = scrService.getComponentDescriptionDTOs(bundle);
for(final ComponentDescriptionDTO d : descs)
{
if ( !scrService.isComponentEnabled(d))
{
disabled.add(d);
}
else
{
final Collection<ComponentConfigurationDTO> configs = scrService.getComponentConfigurationDTOs(d);
if ( configs.isEmpty() )
{
disabled.add(d);
}
else
{
configurations.addAll(configs);
}
}
}
org/apache/felix/webconsole/plugins/ds/internal/InfoProvider.java:89
Regards,
Peter
Views
Replies
Total Likes
Hello..any help on this?
Views
Replies
Total Likes
Hey Jake,
Happy New Year!
For 6.3 you should be moving to the OSGi Service annotations.
SCR is still there, but it's merely used for bundles that are not yet migrated to the OSGi annotations for your own code OSGi annotations should be the way forward.
Thanks,
Peter
Views
Replies
Total Likes
Thanks Peter.
I wasn't talking about the annotations but classes like org.apache.felix.scr.ScrService and org.apache.felix.scr.Component which do not appear to be present in 6.2 and 6.3 in the org.apache.felix.scr bundle.
Any way around this?
I'm using these classes to get the state of a Component (active / inactive).
Views
Replies
Total Likes
Hi,
Apologies re-looked at your question, have a look at:ServiceComponentRuntime (http://javadox.com/org.osgi/osgi.cmpn/6.0.0/org/osgi/service/component/runtime/ServiceComponentRunti... )
It can do following things:
final Collection<ComponentDescriptionDTO> descs = scrService.getComponentDescriptionDTOs(bundle);
for(final ComponentDescriptionDTO d : descs)
{
if ( !scrService.isComponentEnabled(d))
{
disabled.add(d);
}
else
{
final Collection<ComponentConfigurationDTO> configs = scrService.getComponentConfigurationDTOs(d);
if ( configs.isEmpty() )
{
disabled.add(d);
}
else
{
configurations.addAll(configs);
}
}
}
org/apache/felix/webconsole/plugins/ds/internal/InfoProvider.java:89
Regards,
Peter
Views
Replies
Total Likes
Views
Replies
Total Likes
Thank you for posting a detail response Peter!
Views
Replies
Total Likes
This is really great. Thanks a lot.
Views
Replies
Total Likes
Views
Likes
Replies