File tree Expand file tree Collapse file tree 5 files changed +78
-2
lines changed
java21/io/ebean/datasource/pool
java/io/ebean/datasource/pool Expand file tree Collapse file tree 5 files changed +78
-2
lines changed Original file line number Diff line number Diff line change 1313 strategy :
1414 fail-fast : false
1515 matrix :
16- java_version : [11 ]
16+ java_version : [21 ]
1717 os : [ubuntu-latest]
1818
1919 steps :
Original file line number Diff line number Diff line change 9292
9393 </dependencies >
9494
95+ <build >
96+ <plugins >
97+
98+ <plugin > <!-- Multi-Release with 21 -->
99+ <groupId >org.apache.maven.plugins</groupId >
100+ <artifactId >maven-jar-plugin</artifactId >
101+ <version >3.3.0</version >
102+ <configuration >
103+ <archive >
104+ <manifestEntries >
105+ <Multi-Release >true</Multi-Release >
106+ </manifestEntries >
107+ </archive >
108+ </configuration >
109+ </plugin >
110+
111+ <plugin >
112+ <groupId >org.apache.maven.plugins</groupId >
113+ <artifactId >maven-compiler-plugin</artifactId >
114+ <version >3.14.0</version >
115+ <executions >
116+ <!-- Compile for base version Java 11 -->
117+ <execution >
118+ <id >base</id >
119+ <goals >
120+ <goal >compile</goal >
121+ </goals >
122+ <configuration >
123+ <release >11</release >
124+ <compileSourceRoots >
125+ <compileSourceRoot >${project.basedir} /src/main/java</compileSourceRoot >
126+ </compileSourceRoots >
127+ </configuration >
128+ </execution >
129+ <!-- Compile for Java 21 -->
130+ <execution >
131+ <id >java21</id >
132+ <goals >
133+ <goal >compile</goal >
134+ </goals >
135+ <configuration >
136+ <release >21</release >
137+ <compileSourceRoots >
138+ <compileSourceRoot >${project.basedir} /src/main/java21</compileSourceRoot >
139+ </compileSourceRoots >
140+ <outputDirectory >${project.build.outputDirectory} /META-INF/versions/21</outputDirectory >
141+ </configuration >
142+ </execution >
143+ </executions >
144+ </plugin >
145+
146+ </plugins >
147+ </build >
148+
95149</project >
Original file line number Diff line number Diff line change @@ -769,7 +769,7 @@ private void startExecutor() {
769769 executorLock .lock ();
770770 try {
771771 if (executor == null ) {
772- executor = Executors . newSingleThreadExecutor ();
772+ executor = ExecutorFactory . newExecutor ();
773773 }
774774 } finally {
775775 executorLock .unlock ();
Original file line number Diff line number Diff line change 1+ package io .ebean .datasource .pool ;
2+
3+ import java .util .concurrent .ExecutorService ;
4+ import java .util .concurrent .Executors ;
5+
6+ final class ExecutorFactory {
7+
8+ static ExecutorService newExecutor () {
9+ return Executors .newSingleThreadExecutor ();
10+ }
11+ }
Original file line number Diff line number Diff line change 1+ package io .ebean .datasource .pool ;
2+
3+ import java .util .concurrent .ExecutorService ;
4+ import java .util .concurrent .Executors ;
5+
6+ final class ExecutorFactory {
7+
8+ static ExecutorService newExecutor () {
9+ return Executors .newVirtualThreadPerTaskExecutor ();
10+ }
11+ }
You can’t perform that action at this time.
0 commit comments