/** * Constructs a new {@code RequestSendFailedException} instance with an initial cause. If a non-{@code null} cause * is specified, its message is used to initialize the message of this {@code RequestSendFailedException}; otherwise * the message is left blank ({@code null}). * * @param cause the cause */ public RequestSendFailedException(final Throwable cause) { super(); initCause(cause); }
/** * Constructs a new {@code RequestSendFailedException} instance with an initial message and cause. * * @param message the message * @param cause the cause * @param canBeRetried the value of the can-be-retried flag */ public RequestSendFailedException(final String message, final Throwable cause, final boolean canBeRetried) { super(message); initCause(cause); this.canBeRetried = canBeRetried; }
/** * Constructs a new {@code RequestSendFailedException} instance with an initial message and cause. * * @param msg the message * @param cause the cause */ public RequestSendFailedException(final String msg, final Throwable cause) { super(msg); initCause(cause); }
/** * Constructs a new {@code RequestSendFailedException} instance with an initial cause. If a non-{@code null} cause * is specified, its message is used to initialize the message of this {@code RequestSendFailedException}; otherwise * the message is left blank ({@code null}). * * @param cause the cause * @param canBeRetried the value of the can-be-retried flag */ public RequestSendFailedException(final Throwable cause, final boolean canBeRetried) { super(); initCause(cause); this.canBeRetried = canBeRetried; }
protected SessionID createSession(final EJBReceiverSessionCreationContext context) throws Exception { final StatelessEJBLocator<?> statelessLocator = context.getClientInvocationContext().getLocator().asStateless(); final AuthenticationContext authenticationContext = context.getAuthenticationContext(); try { IoFuture<ConnectionPeerIdentity> futureConnection = getConnection(context.getClientInvocationContext(), context.getClientInvocationContext().getDestination(), authenticationContext); final ConnectionPeerIdentity identity = futureConnection.getInterruptibly(); final EJBClientChannel ejbClientChannel = getClientChannel(identity.getConnection()); final StatefulEJBLocator<?> result = ejbClientChannel.openSession(statelessLocator, identity, context.getClientInvocationContext()); return result.getSessionId(); } catch (IOException e) { final RequestSendFailedException failed = new RequestSendFailedException("Failed to create stateful EJB: " + e.getMessage(), true); failed.initCause(e); throw failed; } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new CreateException("Stateful EJB creation interrupted"); } }
/** * Constructs a new {@code RequestSendFailedException} instance with an initial cause. If a non-{@code null} cause * is specified, its message is used to initialize the message of this {@code RequestSendFailedException}; otherwise * the message is left blank ({@code null}). * * @param cause the cause */ public RequestSendFailedException(final Throwable cause) { super(); initCause(cause); }
/** * Constructs a new {@code RequestSendFailedException} instance with an initial cause. If a non-{@code null} cause * is specified, its message is used to initialize the message of this {@code RequestSendFailedException}; otherwise * the message is left blank ({@code null}). * * @param cause the cause * @param canBeRetried the value of the can-be-retried flag */ public RequestSendFailedException(final Throwable cause, final boolean canBeRetried) { super(); initCause(cause); this.canBeRetried = canBeRetried; }
/** * Constructs a new {@code RequestSendFailedException} instance with an initial message and cause. * * @param message the message * @param cause the cause * @param canBeRetried the value of the can-be-retried flag */ public RequestSendFailedException(final String message, final Throwable cause, final boolean canBeRetried) { super(message); initCause(cause); this.canBeRetried = canBeRetried; }
/** * Constructs a new {@code RequestSendFailedException} instance with an initial cause. If a non-{@code null} cause * is specified, its message is used to initialize the message of this {@code RequestSendFailedException}; otherwise * the message is left blank ({@code null}). * * @param cause the cause */ public RequestSendFailedException(final Throwable cause) { super(); initCause(cause); }
/** * Constructs a new {@code RequestSendFailedException} instance with an initial message and cause. * * @param msg the message * @param cause the cause */ public RequestSendFailedException(final String msg, final Throwable cause) { super(msg); initCause(cause); }
/** * Constructs a new {@code RequestSendFailedException} instance with an initial cause. If a non-{@code null} cause * is specified, its message is used to initialize the message of this {@code RequestSendFailedException}; otherwise * the message is left blank ({@code null}). * * @param cause the cause * @param canBeRetried the value of the can-be-retried flag */ public RequestSendFailedException(final Throwable cause, final boolean canBeRetried) { super(); initCause(cause); this.canBeRetried = canBeRetried; }
/** * Constructs a new {@code RequestSendFailedException} instance with an initial message and cause. * * @param message the message * @param cause the cause * @param canBeRetried the value of the can-be-retried flag */ public RequestSendFailedException(final String message, final Throwable cause, final boolean canBeRetried) { super(message); initCause(cause); this.canBeRetried = canBeRetried; }
/** * Constructs a new {@code RequestSendFailedException} instance with an initial message and cause. * * @param msg the message * @param cause the cause */ public RequestSendFailedException(final String msg, final Throwable cause) { super(msg); initCause(cause); }
protected SessionID createSession(final EJBReceiverSessionCreationContext context) throws Exception { final StatelessEJBLocator<?> statelessLocator = context.getClientInvocationContext().getLocator().asStateless(); final AuthenticationContext authenticationContext = context.getAuthenticationContext(); try { IoFuture<ConnectionPeerIdentity> futureConnection = getConnection(context.getClientInvocationContext(), context.getClientInvocationContext().getDestination(), authenticationContext); final ConnectionPeerIdentity identity = futureConnection.getInterruptibly(); final EJBClientChannel ejbClientChannel = getClientChannel(identity.getConnection()); final StatefulEJBLocator<?> result = ejbClientChannel.openSession(statelessLocator, identity, context.getClientInvocationContext()); return result.getSessionId(); } catch (IOException e) { final RequestSendFailedException failed = new RequestSendFailedException("Failed to create stateful EJB: " + e.getMessage(), true); failed.initCause(e); throw failed; } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new CreateException("Stateful EJB creation interrupted"); } }
protected SessionID createSession(final EJBReceiverSessionCreationContext context) throws Exception { final StatelessEJBLocator<?> statelessLocator = context.getClientInvocationContext().getLocator().asStateless(); final AuthenticationContext authenticationContext = context.getAuthenticationContext(); try { IoFuture<ConnectionPeerIdentity> futureConnection = getConnection(context.getClientInvocationContext(), context.getClientInvocationContext().getDestination(), authenticationContext); final ConnectionPeerIdentity identity = futureConnection.getInterruptibly(); final EJBClientChannel ejbClientChannel = getClientChannel(identity.getConnection()); final StatefulEJBLocator<?> result = ejbClientChannel.openSession(statelessLocator, identity, context.getClientInvocationContext()); return result.getSessionId(); } catch (IOException e) { final RequestSendFailedException failed = new RequestSendFailedException("Failed to create stateful EJB: " + e.getMessage(), true); failed.initCause(e); throw failed; } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new CreateException("Stateful EJB creation interrupted"); } }