Skip to content

Commit 72cac02

Browse files
committed
[#2150] Avoid creation of logger at runtime
Quarkus doesn't like it when running in native mode
1 parent 0f76dbb commit 72cac02

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

hibernate-reactive-core/src/main/java/org/hibernate/reactive/query/sqm/mutation/internal/temptable/ReactiveGlobalTemporaryTableStrategy.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
public interface ReactiveGlobalTemporaryTableStrategy {
2929

30+
Log LOG = make( Log.class, lookup() );
31+
3032
static String sessionIdentifier(SharedSessionContractImplementor session) {
3133
return session.getSessionIdentifier().toString();
3234
}
@@ -64,7 +66,7 @@ default void prepare(MappingModelCreationProcess mappingModelCreationProcess, Jd
6466
tableCreatedStage.complete( null );
6567
}
6668
else {
67-
make( Log.class, lookup() ).debugf( "Creating global-temp ID table : %s", getTemporaryTable().getTableExpression() );
69+
LOG.debugf( "Creating global-temp ID table : %s", getTemporaryTable().getTableExpression() );
6870

6971
connectionStage()
7072
.thenCompose( this::createTable )
@@ -102,7 +104,7 @@ private CompletionStage<Void> releaseConnection(ReactiveConnection connection) {
102104

103105
private static void logConnectionClosedError(Throwable t) {
104106
if ( t != null ) {
105-
make( Log.class, lookup() ).debugf( "Ignoring error closing the connection: %s", t.getMessage() );
107+
LOG.debugf( "Ignoring error closing the connection: %s", t.getMessage() );
106108
}
107109
}
108110

@@ -150,7 +152,7 @@ default void release(
150152
setDropIdTables( false );
151153

152154
final TemporaryTable temporaryTable = getTemporaryTable();
153-
make( Log.class, lookup() ).debugf( "Dropping global-tempk ID table : %s", temporaryTable.getTableExpression() );
155+
LOG.debugf( "Dropping global-temp ID table : %s", temporaryTable.getTableExpression() );
154156

155157
connectionStage()
156158
.thenCompose( this::dropTable )

0 commit comments

Comments
 (0)