You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, we are using this library in a Spring Boot application and discovered that DefaultGraphQLJpaQueryConfiguration produces non-threadsafe EntityManager instance and we experienced possible non-threadsafe access to the session exception under load.
Hi, we are using this library in a Spring Boot application and discovered that
DefaultGraphQLJpaQueryConfiguration
produces non-threadsafe EntityManager instance and we experiencedpossible non-threadsafe access to the session
exception under load.Specifically, in https://github.com/introproventures/graphql-jpa-query/blob/master/graphql-jpa-query-boot-starter/src/main/java/com/introproventures/graphql/jpa/query/boot/autoconfigure/GraphQLJpaQueryAutoConfiguration.java#L62 :
Here
entityManagerFactory.createEntityManager()
returns Hibernate'sSessionImpl
which is not threadsafe.Replacing it with Spring-provided EntityManager bean solved the issue:
The text was updated successfully, but these errors were encountered: