Skip to content
Advertisement

Spring Retryable – Async context

Have an issue with @Retryable in the Async context, I have a service call which is returning a SocketTimeOut exception. This I would have expected to retry 3 times, I do have @EnableRetry, however I am seeing something I little strange in the logs, a sleep interruptedException. Here is part of the stack trace. Caused by: java.lang.InterruptedException: sleep interrupted at

Cannot connect to Wildfly

I have just installed Wildfly and I tried to connect it : But gives me follow error : Failed to connect to the controller: The controller is not available at localhost:9990: java.net.ConnectException: WFLYPRT0053: Could not connect to remote+http://localhost:9990. The connection failed: WFLYPRT0053: Could not connect to remote+http://localhost:9990. The connection failed: Connection refused: no further information I tried a lot of

Java strange class cast exception

Could anyone help me understand why in 1 situation I do not have ClassCastException? At least String::trim is not a MagicFunction. Answer So, method references (like String::trim) are a bit weird; unlike most expressions in Java, they don’t really have a type of their own. Something like this: won’t even compile, because it doesn’t give the compiler enough information about

Why does ManagedChannelBuilder not have TLS parameters for making TLS connections to the server?

In this example https://github.com/grpc/grpc-java/blob/master/interop-testing/src/test/java/io/grpc/testing/integration/TlsTest.java you see that the TLS client connection has various TLS parameters such as But my app has thus far used https://github.com/grpc/grpc-java/blob/master/core/src/main/java/io/grpc/ManagedChannelBuilder.java which by default seems to support TLS. The only parameter it takes is “usePlaintext” which can turn off TLS. Note: I have installed OpenSSL on the machine, as recommended by https://grpc.io/docs/guides/auth.html This page does state:

Prevent and Detect Deletion of an Open File

My Java program opens a file and slowly writes to the file. When the operation is completed, the program closes the file and moves the file to its final resting place in another directory. The problem is that as the operation is running, another thread in the same Java program deletes the file. Windows will not allow the deletion of

Deserializing a list of ints with Spring WebClient

I’m trying to communicate with a Rest service that returns a simple JSON array of ints, e.g. I have the following code to make the call via WebClient: However, Spring returns me an empty Flux. If I replace the bodyToFlux call with a bodyToMono<List<Int>>, then Spring is able to deserialize the response as expected. The drawback being that I have

Opening a new window on a button click in java

I’m just starting with using interfaces in java, I’m okay with having just one window and that doing what i need. But i now want to link two windows together e.g. Frame 1 opens. user chooses button1 (enter data). Frame 2 opens so user can enter the data. Code for Frame 1: Code for Frame 2: Basically I would like

Advertisement