Skip to content

Commit 27acfb2

Browse files
committed
[#2150] Avoid creation of logger at runtime
Quarkus doesn't like it when running in native mode
1 parent e768bb2 commit 27acfb2

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
}
@@ -60,7 +62,7 @@ default void prepare(MappingModelCreationProcess mappingModelCreationProcess, Jd
6062
tableCreatedStage.complete( null );
6163
}
6264
else {
63-
make( Log.class, lookup() ).debugf( "Creating global-temp ID table : %s", getTemporaryTable().getTableExpression() );
65+
LOG.debugf( "Creating global-temp ID table : %s", getTemporaryTable().getTableExpression() );
6466

6567
connectionStage()
6668
.thenCompose( this::createTable )
@@ -98,7 +100,7 @@ private CompletionStage<Void> releaseConnection(ReactiveConnection connection) {
98100

99101
private static void logConnectionClosedError(Throwable t) {
100102
if ( t != null ) {
101-
make( Log.class, lookup() ).debugf( "Ignoring error closing the connection: %s", t.getMessage() );
103+
LOG.debugf( "Ignoring error closing the connection: %s", t.getMessage() );
102104
}
103105
}
104106

@@ -146,7 +148,7 @@ default void release(
146148
setDropIdTables( false );
147149

148150
final TemporaryTable temporaryTable = getTemporaryTable();
149-
make( Log.class, lookup() ).debugf( "Dropping global-tempk ID table : %s", temporaryTable.getTableExpression() );
151+
LOG.debugf( "Dropping global-temp ID table : %s", temporaryTable.getTableExpression() );
150152

151153
connectionStage()
152154
.thenCompose( this::dropTable )

0 commit comments

Comments
 (0)