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 |
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. |
|
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. |
|
So just to be sure: I can statically cache the GraphQLConfiguration? |
|
Thanks! |
Hi Eduard,
Not sure when this would apply tbh. Are you creating multiple servlets or something? Shouldn't be a problem though.