From the manual, section 3.3:
Quote:
You may define your own plugin strategy for obtaining JDBC connections by implementing the interface org.hibernate.connection.ConnectionProvider. You may select a custom implementation by setting hibernate.connection.provider_class.
http://www.hibernate.org/hib_docs/v3/re ... ernatejdbc
Usually if you're using a DataSource, it comes from JNDI or you're using something like Spring to create it. If not, you can create a ConnectionProvider and do anything you want.
-Chris