From 54a90b20ed330063a6835e5bc06ca7c0f422b1cf Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 12 Dec 2024 19:48:21 +0100 Subject: [PATCH] Avoid logger serialization behind shared EntityManager proxy See gh-34084 --- .../org/springframework/orm/jpa/SharedEntityManagerCreator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java b/spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java index 603029ad4292..9dfb8c7d0eb4 100644 --- a/spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java +++ b/spring-orm/src/main/java/org/springframework/orm/jpa/SharedEntityManagerCreator.java @@ -186,7 +186,7 @@ public static EntityManager createSharedEntityManager(EntityManagerFactory emf, @SuppressWarnings("serial") private static class SharedEntityManagerInvocationHandler implements InvocationHandler, Serializable { - private final Log logger = LogFactory.getLog(getClass()); + private static final Log logger = LogFactory.getLog(SharedEntityManagerInvocationHandler.class); private final EntityManagerFactory targetFactory;