Example usage for org.springframework.data.gemfire.listener GemfireListenerExecutionFailedException GemfireListenerExecutionFailedException

List of usage examples for org.springframework.data.gemfire.listener GemfireListenerExecutionFailedException GemfireListenerExecutionFailedException

Introduction

In this page you can find the example usage for org.springframework.data.gemfire.listener GemfireListenerExecutionFailedException GemfireListenerExecutionFailedException.

Prototype

public GemfireListenerExecutionFailedException(String message, Throwable cause) 

Source Link

Document

Constructs a new GemfireListenerExecutionFailedException instance.

Usage

From source file:org.springframework.data.gemfire.listener.adapter.ContinuousQueryListenerAdapter.java

/**
 * Invoke the specified listener method.
 * @param event the event arguments to be passed in
 * @param methodName the method to invoke
 * @see #getListenerMethodName/*from w w w .java 2s  .  c o m*/
 */
protected void invokeListenerMethod(CqEvent event, String methodName) {
    try {
        invoker.invoke(event);
    } catch (InvocationTargetException ex) {
        Throwable targetEx = ex.getTargetException();
        if (targetEx instanceof DataAccessException) {
            throw (DataAccessException) targetEx;
        } else {
            throw new GemfireListenerExecutionFailedException(
                    "Listener method '" + methodName + "' threw exception", targetEx);
        }
    } catch (Throwable ex) {
        throw new GemfireListenerExecutionFailedException("Failed to invoke target method '" + methodName, ex);
    }
}