is GraphQLConfiguration threadsafe? #380
-
Dear all, For frysker.nl I use graphql-java-kickstart. I would like to know if i can statically cache GraphQLConfiguration and use it from different threads. Regards, Eduard |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 2 replies
-
Hi Eduard, Not sure when this would apply tbh. Are you creating multiple servlets or something? Shouldn't be a problem though. |
Beta Was this translation helpful? Give feedback.
-
As far as I know servlet containers operate using a pool of servlets, so multiple instances. Quote: The web container manages the lifecycle of servlets (it is responsible for creating and managing instances of servlets). The Java EE specification does not guarantee that there will be only one instance of your servlet class, so you should not write your servlets in a way that depend on this. |
Beta Was this translation helpful? Give feedback.
-
So just to be sure: I can statically cache the GraphQLConfiguration? |
Beta Was this translation helpful? Give feedback.
Hi Eduard,
Not sure when this would apply tbh. Are you creating multiple servlets or something? Shouldn't be a problem though.