Only close session if not null
Classpath for vaguely-modern Hibernate demos.