Skip to content

Internal heartbeat Timer, use Virtual Thread for Java 21 #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rbygrave
Copy link
Member

Using Multi-Version jar, use Virtual Thread instead of Timer for executing the heartbeat test

Using Multi-Version jar, use Virtual Thread instead of Timer for executing the heartbeat test
Copy link
Collaborator

@rPraml rPraml left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that.

I have one question, though: The Maven build now requires Java 21. How can we test against Java 17?

@@ -1,11 +1,61 @@
package io.ebean.datasource.pool;

import io.ebean.datasource.pool.ConnectionPool.Heartbeat;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool: I didn't know this method until now:
Rolands note: Classes will be located in META-INF/versions/21
https://docs.oracle.com/javase/10/docs/specs/jar/jar.html#multi-release-jar-files

@rbygrave
Copy link
Member Author

The Maven build now requires Java 21. How can we test against Java 17?

Technically it BUILDs needing the Java 21 compiler ... the surefire tests run using the classes from target/classes ... so all the tests are actually testing the Java 11 compiled ExecutorFactory.

What I need to do is add another test module in order to test the Java 21 code.

@rPraml
Copy link
Collaborator

rPraml commented Apr 25, 2025

Testing java 11 executorFactory with java 21 would be OK for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants