I was going through the JavaDocs and in the documentation of the SessionFactoryImpl class, the following is mentioned:
Quote:
Concrete implementation of the SessionFactory interface. Has the following responsibilites
caches configuration settings (immutably)
caches "compiled" mappings ie. EntityPersisters and CollectionPersisters (immutable)
caches "compiled" queries (memory sensitive cache)
manages PreparedStatements
delegates JDBC Connection management to the ConnectionProvider
factory for instances of SessionImpl
This class must appear immutable to clients, even if it does all kinds of caching and pooling under the covers. It is crucial that the class is not only thread safe, but also highly concurrent. Synchronization must be used extremely sparingly.
I feel that the statement in bold could be the answer to my question, but is the improvement in performance because of this negligible or noticeable?