Loading resources from classpath is silly.  Classpath is silly.
Expose SessionFactory constructor