You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using QueuingTransactionReceiptProcessor in a Spring Boot, a crash (an exception thrown) during the singleton beans initialization phase leaves the Spring Boot application hanging.
Steps to reproduce
In a SpringBoot Application using web3j, in a bean constructor call:
Create a QueuingTransactionReceiptProcessor: transactionReceiptProcessor = new QueuingTransactionReceiptProcessor(this.readWeb3j, callback, txManagerPollAttempts, txManagerPollSleepDuration);
Throw an exception afterwards.
Expected behavior
The resources will be released and the Spring-boot application will exit.
Actual behavior
The resources are not released and the Spring boot application stays hanging, waiting all the hreads to quit. The reason is that the shutdown().
The cause is that the shutdown hook is set up only after the singleton beans are created and in this case the bean creation fails.
Environment
Web3j version: 4.12.3
Java : 21
Operating System: Ubuntu 22
Additional context
The text was updated successfully, but these errors were encountered:
Bug description
When using QueuingTransactionReceiptProcessor in a Spring Boot, a crash (an exception thrown) during the singleton beans initialization phase leaves the Spring Boot application hanging.
Steps to reproduce
In a SpringBoot Application using web3j, in a bean constructor call:
transactionReceiptProcessor = new QueuingTransactionReceiptProcessor(this.readWeb3j, callback, txManagerPollAttempts, txManagerPollSleepDuration);
Expected behavior
The resources will be released and the Spring-boot application will exit.
Actual behavior
The resources are not released and the Spring boot application stays hanging, waiting all the hreads to quit. The reason is that the shutdown().
The cause is that the shutdown hook is set up only after the singleton beans are created and in this case the bean creation fails.
Environment
Additional context
The text was updated successfully, but these errors were encountered: