Custom Transport Handlers in AEM 6 | Community
Skip to main content
Peter_Puzanovs
Community Advisor
Community Advisor
October 16, 2015
Solved

Custom Transport Handlers in AEM 6

  • October 16, 2015
  • 12 replies
  • 8316 views

Hi,

System has custom transport handler that handles content transportation to the external system. This code was working on 5.5. Stopped working on the AEM 6.

It's created by implements TransportHandler

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

The problem we are facing at the moment is that public boolean canHandle(AgentConfig agentConfig) { method is not being invoked during the replication. Instead the default Transport handler is being invoked.

How can do I force CQ to use our custom TransportHandler implementation instead of the standard one ?

By running debug log level on com.day.cq.replication.impl.transport

We can see that ServiceTracker, has bound TransporHandler.

We can also see that the invoked class is still com.day.cq.replication.impl.transport.Http

Thanks,

Peter

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 JustinEd3

Hi,

This is a bug. Please file a DayCare issue referencing GRANITE-6117.

Alternatively (or as a short-term workaround), you can specify an alternate protocol in the URL. For example, if your URL was mycustom://localhost:4503/bin/receive?sling:authRequestLogin=1 (instead of http://localhost:4503/bin/receive?sling:authRequestLogin=1), your transport handler would always have the opportunity to handle the replication.

Regards,

Justin

12 replies

Level 4
August 22, 2016

My bad.For testing I was returning the canhandle() as true only.That was the root cause of the problem. Once I started it conditionally , it started working.

Thanks & regards

Sumit

Adobe Employee
August 22, 2016

Hi Summit,

Isn't that at WARNING level? Rather than an exception in the error.log file?Please post the top of the stack trace

Regards,

Opkar