Hi All
We're really having a hard time trying to figure out if our code is really threadsafe. We have a web app that contains spring-injected services that use a dao layer to get to the database via Hibernate. We injected the services into INSTANCE variables in the servlet - so every request that comes in becomes a thread that uses those same service objects. The service object contains a dao object that is used to access the database via hibernate (oracle in this case).
So, for example, the contactService is an instance variable in the this servlet
this call is made from the servlet to the service
in the ContactService class we use a dao class:
and make this call:
in the ContactDao class is the method:
From what I understand the org.hibernate.Query is not threadsafe. So is it possible our code is not threadsafe because each thread started by the servlet container is using the same service and dao objects?
Thanks for any help.
Amy