Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

How to override service ?

Avatar

Level 1

Hi all,

We use Content Sync for page exporting and faced with the problem that PageExporter fails when exported page requires session.

Therefore i desided to override com.day.cq.contentsync.handler.util.RequestResponseFactory to provide fake request with session object.

But simple declaration:

@Component(immediate = true, metatype = true) @Service(RequestResponseFactory.class) public class RequestResponseFactoryImpl implements RequestResponseFactory { ... }

of course, not have any effect.

So how can i tell AEM to take my service instead of already installed com.day.cq.contentsync.impl.handler.util.RequestResponseFactoryImpl ?

1 Accepted Solution

Avatar

Correct answer by
Level 10
1 Reply

Avatar

Correct answer by
Level 10