File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
extensions/jdbc/jdbc-db2/deployment/src/main/java/io/quarkus/jdbc/db2/deployment Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 27
27
import io .quarkus .deployment .builditem .nativeimage .JPMSExportBuildItem ;
28
28
import io .quarkus .deployment .builditem .nativeimage .NativeImageAllowIncompleteClasspathBuildItem ;
29
29
import io .quarkus .deployment .builditem .nativeimage .NativeImageConfigBuildItem ;
30
+ import io .quarkus .deployment .builditem .nativeimage .NativeImageResourceBuildItem ;
30
31
import io .quarkus .deployment .builditem .nativeimage .ReflectiveClassBuildItem ;
31
32
import io .quarkus .deployment .builditem .nativeimage .ServiceProviderBuildItem ;
32
33
import io .quarkus .jdbc .db2 .runtime .DB2AgroalConnectionConfigurer ;
@@ -66,7 +67,8 @@ void configureAgroalConnection(BuildProducer<AdditionalBeanBuildItem> additional
66
67
}
67
68
68
69
@ BuildStep
69
- void registerForReflection (BuildProducer <ReflectiveClassBuildItem > reflectiveClass ) {
70
+ void registerForReflection (BuildProducer <ReflectiveClassBuildItem > reflectiveClass ,
71
+ BuildProducer <NativeImageResourceBuildItem > resource ) {
70
72
//Not strictly necessary when using Agroal, as it also registers
71
73
//any JDBC driver being configured explicitly through its configuration.
72
74
//We register it for the sake of people not using Agroal,
@@ -88,6 +90,12 @@ void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveCla
88
90
T4Resources .class )
89
91
.reason (getClass ().getName () + " DB2 JDBC driver classes" )
90
92
.build ());
93
+
94
+ reflectiveClass .produce (ReflectiveClassBuildItem .builder ("com.ibm.pdq.cmx.client.DataSourceFactory" )
95
+ .reason (getClass ().getName () + " accessed reflectively by DB2 JDBC driver" )
96
+ .build ());
97
+
98
+ resource .produce (new NativeImageResourceBuildItem ("pdq.properties" ));
91
99
}
92
100
93
101
@ BuildStep
You can’t perform that action at this time.
0 commit comments