use of com.adaptris.core.AllowsRetriesConnection in project interlok by adaptris.
the class AdapterComponentChecker method checkInitialise.
@Override
public void checkInitialise(String xml) throws CoreException {
AdaptrisMarshaller marshaller = DefaultMarshaller.getDefaultMarshaller();
AdaptrisComponent component = (AdaptrisComponent) marshaller.unmarshal(xml);
prepare(component);
if (component instanceof AllowsRetriesConnection) {
AllowsRetriesConnection retry = (AllowsRetriesConnection) component;
if (retry.connectionAttempts() == -1) {
retry.setConnectionAttempts(0);
}
}
try {
init(component);
} finally {
close(component);
}
}
use of com.adaptris.core.AllowsRetriesConnection in project interlok by adaptris.
the class ServiceUtil method cloneForTesting.
private static AdaptrisConnection cloneForTesting(AdaptrisConnection conn) throws CoreException {
if (conn == null) {
return null;
}
AdaptrisConnection cloned = conn.cloneForTesting();
if (cloned instanceof AllowsRetriesConnection) {
AllowsRetriesConnection retry = (AllowsRetriesConnection) cloned;
retry.setConnectionAttempts(0);
}
return cloned;
}
Aggregations