This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
futureHandle = asyncMethod(); | |
result = futureHandle.get(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public ListenableFuture<FileSystemItem> createFile(String fileName, boolean overwrite, byte[] content) { | |
// ... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements a common retry policy for async operations | |
* @param fn Async method to retry if necessary | |
* @return Result of the function invoked | |
*/ | |
private <T> ListenableFuture<T> invoke(Function<SharePointFacade, ListenableFuture<T>> fn) { | |
// Define an executor with Retry | |
RetryExecutor retryExecutor | |
= new AsyncRetryExecutor(this.scheduledExecutor) | |
.retryOn(AuthenticationExpiredException.class, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableJms | |
public class JmsTransactionConfig { | |
private static final Logger LOGGER = LoggerFactory.getLogger(JmsTransactionConfig.class); | |
@Value("${app.jms.jndi-provider-url}") | |
private String jndiProviderUrl; | |
@Value("${app.jms.jndi-name}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.github.gist.adelinor.cameljmscalculator.messaging.config; | |
import static org.junit.Assert.assertFalse; | |
import static org.junit.Assert.assertNotNull; | |
import static org.junit.Assert.assertTrue; | |
import javax.jms.Message; | |
import org.junit.Ignore; | |
import org.junit.Test; |