Hibernate version: 2.14
I am currently binding my session factory to JNDI using a Struts plugin. Then, I pull the SessionFactory out of context each time I need to open a session from the session factory.
My question is this: If I bind the SessionFactory to JNDI, don't I lose the benefits of the L2 cache because the only time the sessionfactory is bound to JNDI is when the application starts up?
It seems to me that I could rebind the session factory after each database access but that seems to negate the purpose.
Could someone please clarify this for me?
I have read many forum posts, Hibernate in Action(meap), Hibernate: A developers notebook, TFM.
I thank you for your insights.
Joe W
_________________ Joe W
|