-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: EntityManagerFactory.isOpen == SessionFactory.isClosed ?
PostPosted: Thu Jul 07, 2005 10:16 am 
Expert
Expert

Joined: Sat Oct 25, 2003 8:49 am
Posts: 490
Location: Vrhnika, Slovenia
Hibernate version: 3.1

Is this OK in EntityManagerFactoryImpl.java?

Code:
   public boolean isOpen() {
      return sessionFactory.isClosed();
   }


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 07, 2005 12:10 pm 
Pro
Pro

Joined: Fri Nov 19, 2004 5:52 pm
Posts: 232
Location: Chicago, IL
Heh, I just noticed the same thing. As far as I know, that is a bug. For example, the following code prints false. According to the docs, isOpen() should return true until close() is called.

Code:
EntityManagerFactory emf = Persistence.createEntityManagerFactory("bb_bb60");
logger.info("emf.isOpen() == " + emf.isOpen());


[exec] Jul 7, 2005 11:04:40 AM edu.uchicago.at.blackboard.test.Test main
[exec] INFO: emf.isOpen() == false


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 10, 2005 12:35 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
hehe, we should stop coding drunk at night ;-)
Fixed, thanks

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.