How to override service ? | Community
Skip to main content
Only_Stas
October 16, 2015
Solved

How to override service ?

  • October 16, 2015
  • 1 reply
  • 830 views

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 ?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015