-->
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.  [ 2 posts ] 
Author Message
 Post subject: Do i need to explicity close entity manager in a JTA env
PostPosted: Mon Jun 18, 2007 4:52 pm 
Regular
Regular

Joined: Wed May 02, 2007 2:42 pm
Posts: 101
Hey,

I have a stateless as a facade and my DAO is a pojo class.

I create the entity manger from the factory that bind to the JNDI.

I have the following attributes in the persistence.xml:
Code:
<persistence>
  <persistence-unit name="Demo">
    <jta-data-source>java:/DemoDS</jta-data-source>
    <properties>
      <property name="hibernate.ejb.naming_strategy" value="org.hibernate.cfg.DefaultComponentSafeNamingStrategy" />
      <property name="hibernate.transaction.factory_class" value="org.hibernate.ejb.transaction.JoinableCMTTransactionFactory"/>
      <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
    </properties>
  </persistence-unit>
</persistence>


Do i need to explicity close the entity manager ?

Can i debug this in order to be sure that there are no open connection left open in my application?

Thank you[/code]


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 18, 2007 6:52 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
It's the good citizen approach, you open it, you close it.

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 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.