@Override public void handleSchedulingError( Throwable t ) { // if the connection is closing, don't output any logs if ( !willClose() ) { String message; Neo4jError error; if ( ExceptionUtils.hasCause( t, RejectedExecutionException.class ) ) { error = Neo4jError.from( Status.Request.NoThreadsAvailable, Status.Request.NoThreadsAvailable.code().description() ); message = String.format( "Unable to schedule bolt session '%s' for execution since there are no available threads to " + "serve it at the moment. You can retry at a later time or consider increasing max thread pool size for bolt connector(s).", id() ); } else { error = Neo4jError.fatalFrom( t ); message = String.format( "Unexpected error during scheduling of bolt session '%s'.", id() ); } log.error( message, t ); userLog.error( message ); machine.markFailed( error ); } // this will ensure that the scheduled job will be executed on this thread (fork-join pool) // and it will either send a failure response to the client or close the connection and its // related resources (if closing) processNextBatch( 1, true ); }
@Override public void handleSchedulingError( Throwable t ) { // if the connection is closing, don't output any logs if ( !willClose() ) { String message; Neo4jError error; if ( ExceptionUtils.hasCause( t, RejectedExecutionException.class ) ) { error = Neo4jError.from( Status.Request.NoThreadsAvailable, Status.Request.NoThreadsAvailable.code().description() ); message = String.format( "Unable to schedule bolt session '%s' for execution since there are no available threads to " + "serve it at the moment. You can retry at a later time or consider increasing max thread pool size for bolt connector(s).", id() ); } else { error = Neo4jError.fatalFrom( t ); message = String.format( "Unexpected error during scheduling of bolt session '%s'.", id() ); } log.error( message, t ); userLog.error( message ); machine.markFailed( error ); } // this will ensure that the scheduled job will be executed on this thread (fork-join pool) // and it will either send a failure response to the client or close the connection and its // related resources (if closing) processNextBatch( 1, true ); }
closeFailureMessage() + ": " + statusCode.description(), e );
public AuthenticationException( Status status ) { this( status, status.code().description(), null ); }
private Neo4jError( Status status, Throwable cause, boolean fatal ) { this( status, status.code().description(), cause, fatal ); }
protected TransactionTerminatedException( Status status, String additionalInfo ) { super( "The transaction has been terminated. Retry your operation in a new transaction, " + "and you should see a successful result. " + status.code().description() + " " + additionalInfo ); this.status = status; }
@Override public String getTitle() { return status.code().description(); }
closeFailureMessage() + ": " + statusCode.description(), e );
public AuthenticationException( Status status ) { this( status, status.code().description(), null ); }
private Neo4jError( Status status, Throwable cause, boolean fatal ) { this( status, status.code().description(), cause, fatal ); }
@Override public String getTitle() { return status.code().description(); }
protected TransactionTerminatedException( Status status, String additionalInfo ) { super( "The transaction has been terminated. Retry your operation in a new transaction, " + "and you should see a successful result. " + status.code().description() + " " + additionalInfo ); this.status = status; }