A similar post was answered at hibernate.org:
JNDI and Hibernate Session Question Well, it's a great idea to bind a Hibernate Session to you
JNDI (
Java Naming and Directory Interface) server. This way, rather than having to maintain the Session yourself, the JNDI server will, and that resource can then be accessed by any resource that has access and the rights to do a JNDI lookup.
Here you can see it in a sample hibernate.cfg.xml file.
This was loosely stolen from Chapter 3 of the Hibernate documentation. Look it up for more details:
Free Hibernate Documentation for People to Use to Learn Things About Hibernate [ July 08, 2008: Message edited by: Cameron Wallace McKenzie ]