Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Is it possible to disable OOTB service component? AEM 6.5

Avatar

Avatar
Validate 1
Level 2
skmAem
Level 2

Likes

14 likes

Total Posts

34 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 2
skmAem
Level 2

Likes

14 likes

Total Posts

34 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile
skmAem
Level 2

10-08-2020

We want to allow our users (non admins) to download expired assets. There is an OOTB assetdownloadserviceImpl (java) that prevents them from doing so since it checks if an asset is expired or not. I have changed this behavior and implemented custom assetdownloadservice. Now the problem is there are two service implementations for the same service and the OOTB service implementation is getting priority over the custom one. I tried to set the service.ranking property to Integer=10000 for the custom implementation to see if that would help, but no luck. If I manually disable the OOTB service component through OSGI system console, my custom implementation gets called.

 

So my question is, is it possible to give priority to custom implementation in any other way than the service.ranking, if not, is it possible to disable the OOTB implementation using configuration or programmatically?

 

Thanks for any help and pointers in advance!!

-SKM

Replies

Avatar

Avatar
Give Back 3
Level 4
SundeepKatepally
Level 4

Likes

76 likes

Total Posts

76 posts

Correct Reply

21 solutions
Top badges earned
Give Back 3
Boost 10
Boost 25
Boost 50
Affirm 10
View profile

Avatar
Give Back 3
Level 4
SundeepKatepally
Level 4

Likes

76 likes

Total Posts

76 posts

Correct Reply

21 solutions
Top badges earned
Give Back 3
Boost 10
Boost 25
Boost 50
Affirm 10
View profile
SundeepKatepally
Level 4

10-08-2020

You should not  disabled OOTB component. Lets say , if you disabled you will get below issues.

1) OOTB bundles which has dependency on the OOTB bundle that has this class will not resolve.

 

Avatar

Avatar
Validate 1
Level 2
skmAem
Level 2

Likes

14 likes

Total Posts

34 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile

Avatar
Validate 1
Level 2
skmAem
Level 2

Likes

14 likes

Total Posts

34 posts

Correct Reply

1 solution
Top badges earned
Validate 1
Ignite 1
Give Back
Boost 5
Boost 3
View profile
skmAem
Level 2

11-08-2020

Hi @SundeepKatepally , I also want to avoid disabling the OOTB service implementation but I am perplexed as to why my implementation is not getting executed. Here is my implementation declaration:

 

 

@Component(
        service= AssetDownloadService.class,
        immediate=true,
        property={
                Constants.SERVICE_DESCRIPTION + "=Asset Download Service",
                Constants.SERVICE_RANKING + ":Integer=10000"
        }
)
public class AssetDownloadServiceNewImpl implements AssetDownloadService {}

 

Screen Shot 2020-08-11 at 8.43.51 AM.png

 

Other option I could think of is to overlay downloadassetservlet to call custom service and register the servlet on a custom selector instead of assetdownload selector that way overlay of UI would use the new selector. But I feel this is all unnecessary and the higher service ranking should have done the trick.

Any other pointers from anyone?

Thanks,

SKM