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.  [ 1 post ] 
Author Message
 Post subject: JTA and Hibernate
PostPosted: Mon Mar 14, 2005 6:32 pm 
Regular
Regular

Joined: Tue Jan 11, 2005 8:55 pm
Posts: 53
Hi,

I'm using Hibernate v2.1.7 with Weblogic, and is it required (or any advantage) to use JTA with weblogic? I have my datasource setup in database, but I did not specify a transaction factory. Here is currently how my Hibernate.cfg.xml is setup:



Code:
<!DOCTYPE hibernate-configuration PUBLIC
   "-//Hibernate/Hibernate Configuration DTD//EN"
   "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>


   <!-- a SessionFactory instance listed as /jndi/name -->
   <session-factory>


      <!-- Bind the SesssionFactory to JNDI -->

      <!-- JNDI DataSource Connection -->
          <property name="connection.datasource">myDataSource</property>
          
       <!-- Miscellaneous Properties -->
          <property name="dialect">net.sf.hibernate.dialect.Oracle9Dialect</property>

         <!-- Print SQL to stdout. -->
         <property name="show_sql">true</property>

   
      <!-- mapping files -->

   
     </session-factory>

</hibernate-configuration>


When I run some tests, my data is inserted into the database, but I continue to get this error:



Code:
SEVERE: Could not toggle autocommit
net.sf.hibernate.HibernateException: Session is closed
   at net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3327)
   at net.sf.hibernate.transaction.JDBCTransaction.toggleAutoCommit(JDBCTransaction.java:104)
   at net.sf.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.java:95)


I'm confused - can someone please help? Is it better/required to specify the JTATransactionFactory?


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

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.