Hi All,

For our project we need to write a custom retry handler for jclouds during
PUT Operation.. We want to override default BackoffLimitedRetryHandler.

I want to know whether it is possible to write custom retry handler for PUT
operation or not.

Our Code snippet goes as below.

modules = ImmutableSet.<Module> builder()
.addAll(modules)
.add(new AbstractModule()
{
@Override
public void configure()
{
bind(HttpRetryHandler.class).annotatedWith(Redirection.class).to(<our
custom class>.class);
}
})
.build();

<our custom class> implements HttpRetryHandler,IOExceptionRetryHandler
similar to

http://grepcode.com/file/repo1.maven.org/maven2/org.
jclouds/jclouds-core/1.5.1/org/jclouds/http/handlers/
BackoffLimitedRetryHandler.java

But even after failure, our custom retry handler never called, instead
jclouds still makes call to   BackoffLimitedRetryHandler

2016-09-12@07:38:51.812 E            [mcstore-01          ]
koffLimitedRetryHandler:logError - Cannot retry after server error, command
has exceeded retry limit 5: [method=org.jclouds.openstack.
swift.SwiftKeystoneClient.public abstract java.lang.String
org.jclouds.openstack.swift.CommonSwiftClient.putObject(
java.lang.String,org.jclouds.openstack.swift.domain.SwiftObject)[multinode,

Notes:

a. If I change bind(HttpRetryHandler.class).annotatedWith(Redirection.
class).to(ICStoreRetryHandler.class);  to bind(HttpRetryHandler.class).
annotatedWith(ClientEroor.class).to(ICStoreRetryHandler.class);  got error
stating
HttpRetryHandler already registered with ClientError and can not be binded
again at

https://github.com/jclouds/jclouds/blob/master/apis/
openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/config/
KeystoneAuthenticationModule.java

b. Even tried  bind(HttpRetryHandler.class).to(ICStoreRetryHandler.class)
and still custom handler not executed.

Need your help to resolve this issue.

Reply via email to