299 questions
Best practices
0
votes
2
replies
91
views
Spring Microservice or Spring Modulith .... When?
I am working on a new application and I have a question related to the microservice vs modulith.
I have related functionalities and am thinking to have them into a single modlith rather than having a ...
Best practices
0
votes
4
replies
149
views
Replace parallelStream() with Executor
in this answer notes that
parallelStream uses the fork/join common pool which is an Executor, [..]
Thus, when I want to replace a piece of code, using parallelStream(), what is the best practice to ...
0
votes
1
answer
100
views
oracle.jdbc.driver.OracleConnection from JBOSS EAP 8 datasource
My application packaged as an EAR file is deployed on JBOSS EAP 8.
We have a requirement to send an array(oracle.sql.ARRAY) of oracle.sql.STRUCT objects to a stored procedure. oracle.jdbc.driver....
0
votes
0
answers
72
views
JMS destination lookup error on JBOSS EAP 8
I have a queue - TestQueue created on JBOSS EAP 8 and my application (EAR) has a MDB which publishes messages to this queue.
standalone.xml
<subsystem xmlns="urn:jboss:domain:messaging-...
2
votes
1
answer
172
views
Not able to control number of Virtual Threads
I have following java code. Here I am trying to control number of Virtual threads learned and inspired by this SO thread. But still I see a separate and uncontrolled number of thread IDs for each file ...
1
vote
1
answer
82
views
How to map JDBI SQL query result to Map<Long, List<Interest>> using annotations?
I'm using JDBI v3 and need to execute a query that returns events with their associated interests. I want to map the result directly to Map<Long, List<Interest>> where the key is the event ...
0
votes
1
answer
173
views
The purpose of an if statement condition, it is java21-ConcurrentHashMap-transfer method code:2463Line
I am using Java 21.
The following code is from the source code of class java.util.concurrent.ConcurrentHashMap.
// Method: transfer , line: 2463
if (i < 0 || i >= n || i + n >= nextn) {
...
1
vote
0
answers
180
views
BouncyCastle BKS Keystore fails to load on Oracle JDK 21 but works on OpenJDK 21
I am facing an issue when loading a BKS (BouncyCastle) keystore in a Spring-based application running on Oracle JDK 21. The same code works without any issues on OpenJDK 21.
Environment details:
OS: ...
3
votes
2
answers
541
views
"Deadlock" caused by virtual threads in JDK21
public class Test {
private static final Object lock = new Object();
public static void main(String[] args) {
try (var executor = Executors.newVirtualThreadPerTaskExecutor()) {
...
2
votes
1
answer
230
views
RequestDispatcher forward(request,response) works in Tomcat 10 but not in Tomcat 11
I'm in the process of doing a technology upgrade for a Spring mvc app. I'm currently using Java 21, Spring 6, and Thymeleaf 3. I've tested the application thoroughly, running it on Tomcat 10. The app ...
9
votes
2
answers
9k
views
Why is openjdk:21 now missing from Docker Hub? [duplicate]
Apparently the OpenJDK distribution for Java 21 is missing from Docker Hub. What happened? I'm certain OpenJDK 21 images existed in these paths before, as I've checked other successful deployments I ...
0
votes
1
answer
194
views
Change default success URL in Spring Security using Vaadin 24
Has anyone been able to change the default success URL after login in Vaadin 24, where we are supposed to handle the filter as follows:
public SecurityFilterChain securityFilterChain(@NonNull ...
8
votes
2
answers
615
views
Why does the Java collator for the Hungarian locale mix E and É?
I want to order a huge list of countries, and I have noticed that, for example, E and É are treated as equals. But in the Hungarian grammar, E comes before É, so a rule should be added, 'E < É'.
...
3
votes
1
answer
598
views
ExecutorService configuration with virtual threads
In a service I have 2 executorServices for different tasks:
get user transactions (50-100 threads, queue 300)
get user family (10-50 threads, queue 100)
It was easy to monitoring threads and adding ...
1
vote
1
answer
87
views
Do not load parent controller if child controller exists
I use Spring Boot 3.3.4 and Java 21.
I have several Spring Boot web application that use the same common library :
App1
App2
App3
Common
In this common library, I have a @RestController used to ...