开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜