Unable to create a session object
I use the code:
Session session =
new Configuration().
configure(cfgurl).
buildSessionFactory().
openSession();
to create a session. The cfgUrl is of type URL and points to the hibernate.cfg.xml
file of another project. The prob开发者_JAVA技巧lem is that it is hanging and unable to proceed further. Why is this hanging?
Usually the SessionFactory is created once and kept in a static variable. I'm not sure that this is the cause of the hanging though.
精彩评论