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 2727import io .quarkus .deployment .builditem .nativeimage .JPMSExportBuildItem ;
2828import io .quarkus .deployment .builditem .nativeimage .NativeImageAllowIncompleteClasspathBuildItem ;
2929import io .quarkus .deployment .builditem .nativeimage .NativeImageConfigBuildItem ;
30+ import io .quarkus .deployment .builditem .nativeimage .NativeImageResourceBuildItem ;
3031import io .quarkus .deployment .builditem .nativeimage .ReflectiveClassBuildItem ;
3132import io .quarkus .deployment .builditem .nativeimage .ServiceProviderBuildItem ;
3233import io .quarkus .jdbc .db2 .runtime .DB2AgroalConnectionConfigurer ;
@@ -66,7 +67,8 @@ void configureAgroalConnection(BuildProducer<AdditionalBeanBuildItem> additional
6667 }
6768
6869 @ BuildStep
69- void registerForReflection (BuildProducer <ReflectiveClassBuildItem > reflectiveClass ) {
70+ void registerForReflection (BuildProducer <ReflectiveClassBuildItem > reflectiveClass ,
71+ BuildProducer <NativeImageResourceBuildItem > resource ) {
7072 //Not strictly necessary when using Agroal, as it also registers
7173 //any JDBC driver being configured explicitly through its configuration.
7274 //We register it for the sake of people not using Agroal,
@@ -88,6 +90,12 @@ void registerForReflection(BuildProducer<ReflectiveClassBuildItem> reflectiveCla
8890 T4Resources .class )
8991 .reason (getClass ().getName () + " DB2 JDBC driver classes" )
9092 .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" ));
9199 }
92100
93101 @ BuildStep
You can’t perform that action at this time.
0 commit comments