minimal hibernate stuff to get connection