custom transport handler | Community
Skip to main content
aem_dev1
New Participant
October 16, 2015
Solved

custom transport handler

  • October 16, 2015
  • 8 replies
  • 1871 views

Hi,

I have created custom transport handler in AEM 6.0 by implementing Transporthandler


@Component(immediate = true, metatype = false)
@Service(TransportHandler.class)

When i replicate something, my custom transport handler is not invoked. How can do I force CQ to use our custom TransportHandler implementation instead of the standard one ?

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

You are essentially writing a new service for AEM.  You have to tell AEM to use this service. YOu can use service ranking:

Service Ranking
OSGi Framework Service Ranking value is used to indicate the order used for calling this service. This is an int value where higher values designate higher precedence. 
Default value is 0.

https://docs.adobe.com/docs/en/cq/5-6-1/deploying/osgi_configuration_settings.html

8 replies

smacdonald2008
New Participant
October 16, 2015

See this older community thread:

https://forums.adobe.com/thread/1169810

Employee
October 16, 2015

Can you post your full source code?

If you follow the link provided by Scott, you will see a link to https://forums.adobe.com/message/4785913 which explains how to implement this. 

Regards,

Opkar

edubey
New Participant
October 16, 2015

here is the article that talks about custom handler:

http://www.tothenew.com/blog/custom-transport-handler-in-cq5aem/

have you implemented those two methods?

aem_dev1
aem_dev1Author
New Participant
October 16, 2015

I have implemented both the methods, but still my custom class is not invoked

smacdonald2008
New Participant
October 16, 2015

Did you configure AEM to use your custom one? 

aem_dev1
aem_dev1Author
New Participant
October 16, 2015

What configurations we need to in AEM to use custom transport handler? Documentation didnt say anything about it. Even i cannot provide ranking.

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 16, 2015

You are essentially writing a new service for AEM.  You have to tell AEM to use this service. YOu can use service ranking:

Service Ranking
OSGi Framework Service Ranking value is used to indicate the order used for calling this service. This is an int value where higher values designate higher precedence. 
Default value is 0.

https://docs.adobe.com/docs/en/cq/5-6-1/deploying/osgi_configuration_settings.html

aem_dev1
aem_dev1Author
New Participant
October 16, 2015

Hi Scott,

As suggested, added the service ranking(1000) for my custom transport handler, but still no luck. It is not being called. OOTB transport handler is called(com.day.cq.replication.impl.transport.Http). even OOTB doesnt have service ranking.