sessionfactory « DAO « JPA Q&A

1. Hibernate Sessionfactory in DAO

2. SFSB > SessionFactory > DAO

I don't know what SessionFactory does but if you open and close the session explicitly in the SFSB then, no problem. The Thread local session pattern is not that useful in a type-3 IoC pattern (constuctor use). An instance variable: The session ahs to be opened AND closed properly, this is important