Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
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