JTA « Transaction « JPA Q&A





1. Handle Transaction on differents EARs    stackoverflow.com

what is the best practice to handle multiple EARs and the same transaction, as far as we know we need to apply XA concepts in order transaction works correctly. but apparently ...

2. Implement custom JTA XAResource for using with hibernate    stackoverflow.com

I have two level access to database: the first with Hibernate, the second with JDBC. The JDBC level work with nontransactional tables (I use MyISAM for speed). I want make both ...

3. jta transcations    stackoverflow.com

I have a code for jta transcations as follows:

try{
  //start jta user transcation utx


//commit utx

}catch(Exception ex){
   try{
     //rollback utx
   }catch(Exception){
   ...

4. how do I access jacc.jar and jta.jar when using hibernate with maven?    stackoverflow.com

I'm trying to migrate an existing eclipse web project (wtp) to maven, using m2e. I'm therefore adding jars one by one to maven pom.xml (torture) when it comes to hibernate, maven automatically ...

5. Java Transaction Manager    stackoverflow.com

I am started with doing some researches for a transaction manager which could be used in JAVA, I stumbled upon JTA and hibernate as well as JOTM, however - when I ...

6. Hibernate search and JPA with JTA transaction    stackoverflow.com

I want to use the Hibernate Search full text search capatibilites. I have a simple JEE application. I annotated the entity classes and here is my persistence.xml:

<persistence-unit name="library">
    ...

7. How does JPA responds to scalability    stackoverflow.com

does anyone know if JPA is a good approach to a scalable environment? (i.e web application in a cluster, or several clusters), if not what is a good approach? Thanks edit: I changed ...

8. Make hibernate use JTA transaction in WAS 5.1    coderanch.com

Hibernate version: 2.1.3 Hi guys, I am concerning how to convert the hibernate-based applicaction between JDBC transaction and JTA transaction transparently. And I have explored the hibernate source code and found out that, if we use a JTA transaction, hibernate will lookup a UserTransaction first and check if there is already another JTATransaction existing. If so, hibernate will not create a ...

9. Hibernate and the need for JTA    coderanch.com

Hi all, I am maintaining / revamping an existing application. It now uses Hibernate 3, Spring 2 and a MySql database. During the switch to H3 I had some error messages that google did not help me solved. ("Unable to locate UserTransaction to check status; nested exception is org.hibernate.TransactionException: Unable to locate UserTransaction to check status") By removing Hibernate's JTA wiring ...





10. what is JTA in hibernate?    coderanch.com

11. how can i integrates jta with hibernate?    coderanch.com

If your domain objects are deployed in the AS and there is a JTA Transaction in progress, then when you call session.beginTransaction() it will join the JTA transaction automatically for you, nothing to do or see here. If there is not a JTA Transaction in progress when you call session.beginTransaction(), then Hibernate creates its own internal transaction. Basically, it is hidden ...

12. problem related to hibernate and JTA transaction    coderanch.com

IPRUHA weblogic weblogic org.hibernate.dialect.Oracle9iDialect true org.hibernate.hql.classic.ClassicQueryTranslatorFactory [B]weblogic.jndi.WLInitialContextFactory jta org.hibernate.transaction.WeblogicTransactionManagerLookup org.hibernate.transaction.JTATransactionFactory[/B] ...

13. Hibernate+JTA : Unable to locate current JTA transaction    coderanch.com

Hi, I have a problem when i want to use Hibernate with JTA in Container Managed Transactions(CMT) mode. I used Glassfishv2,Hibernate3.2,Mojarra1.2,MySQL5 When i tried to run the application i faced this error : "javax.servlet.ServletException: Cant instantiate class: com.dkr.azma.presentation.Login.. Unable to locate current JTA transaction " Here is my configuration file : org.hibernate.dialect.MySQLDialect com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/azma?characterEncoding=UTF-8 root ...

14. Setting JTA with JPA    coderanch.com

Hello Devaka, Many thanks for your reply, yet please I need more elaboration. I searched for how to set the JTA properly into my [persistence.xml], yet didn't reach to a solid answer. Do you recommend a source to read as to know how to set the [persistence.xml] properly? How does a JTA datasource differ from non jta datasource ? ( Is ...

15. Does OSIV work with JTA?    forum.hibernate.org

Author Message kbutler11 Post subject: Does OSIV work with JTA? Posted: Thu Dec 03, 2009 6:10 pm Newbie Joined: Fri Mar 27, 2009 4:29 pm Posts: 7 My conclusion has been that it does not, at least not conveniently. Here is why. Sorry for the long post. Data shown is from an app running with the OSIV servlet filter ...

16. Doubts using JTA (BMT) and Hibernate Transaction API    forum.hibernate.org

Hello, I'm writing to ask about some doubts that I have using JTA (BMT) and Hibernate Transaction API. According to Hibernate reference documentation (3.8.3 - Current Session context management with JTA) - "If there is no Hibernate Session associated with the current JTA transaction, one will be started and associated with that JTA transaction the first time you call 'sessionFactory.getCurrentSession()'" - ...





17. JTA Transcation    forum.hibernate.org

I am using Spring 2.0.6 and Hibernate 3.2.x on apache tomcat I am working on a JPA application; the application works fine when I use the JpaTransactionManager, however I am having problems using the JtaTransactionManager. When I try to change my persistance.xml to be transaction-type="JPA": I get the following error: Caused by: org.hibernate.HibernateException: ...

18. Hibernate and JTA within an API    forum.hibernate.org

I finally have an opportunity to use Hibernate in a heavy way after doing a brief cursory look at it a couple of years. I'm planning on using it in a product that makes it easy to setup an Intranet, a portal/CMS/Workflow type of thing with a bunch of other modules specific to Intranets. As part of this product, I want ...

19. jta.jar no longer optional in 2.1beta3b?    forum.hibernate.org

20. Consecutive JTA transactions    forum.hibernate.org

21. Does seqhilo work with JTA transactions?    forum.hibernate.org

Unfortunately, you can't use hilo when supplying your own Connection to Hibernate, or when Hibernate is using an application server datasource to obtain connections enlisted with JTA. Hibernate must be able to fetch the "hi" value in a new transaction. A standard approach in an EJB environment is to implement the hi/lo algorithm using a stateless session bean.

22. Is JTA now required in 2.1?    forum.hibernate.org

- processing one-to-one association property references - processing foreign key constraints - Using dialect: net.sf.hibernate.dialect.OracleDialect - Use outer join fetching: true - No connection properties specified - the user must supply JDBC connections - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) - Use scrollable result sets: true - JDBC 2 max batch size: ...

23. Having problem with JTA    forum.hibernate.org

I have some problem when using JTA of jboss Code: UserTransaction tx=null; try { tx =(UserTransaction)new InitialContext().lookup("java:comp/UserTransaction"); dao.addUser(user); tx.commit(); } catch (Exception ...

24. Unable to use JTA from within Hibernate    forum.hibernate.org

Newbie Joined: Sun Apr 11, 2004 9:38 am Posts: 12 I am facing exceptions when I try to use JTA from within Hibernate. My source code is as follows:- static { try { cfg = new Configuration(); cfg.setProperty("hibernate.dialect", "net.sf.hibernate.dialect.OracleDialect"); cfg.setProperty("hibernate.cglib.use_reflection_optimizer", "true"); cfg.setProperty( "hibernate.transaction.manager_lookup_class", "net.sf.hibernate.transaction.WeblogicTransactionManagerLookup"); cfg.setProperty( "hibernate.transaction.factory_class", "net.sf.hibernate.transaction.JTATransactionFactory"); } ------------------------ However, when the class loads I get the following exception stacktrace for ...

25. JTA problems    forum.hibernate.org

Hi, I am trying to implement a simple session bean that calls persistent POJO. I gave the following parameters in hibernate.properties: hibernate.connection.datasource VerdeDataSource hibernate.transaction.factory_class net.sf.hibernate.transaction.JTATransactionFactory hibernate.transaction.manager_lookup_class net.sf.hibernate.transaction.WeblogicTransactionManagerLookup hibernate.dialect net.sf.hibernate.dialect.MySQLDialect and yet I get an exception saying that the SchemaExporter is trying to perform Connection.commit even though I specificaly told it to use JTA. The excetption is: 19:55:43,093 ERROR SchemaExport:165 - schema ...

26. hbm2ddl auto export with JTA transaction    forum.hibernate.org

Hi all! New to Hibernate, trying to get it running with my project, however, when setting the Environment.HBM2DDL_auto (hibernate.hbm2ddl.auto) property to "create" (i.e. because of fast-changing tables I want to have auto-creation on deploy to server) I get a SQLException "Cannot commit during managed transaction"; It seems the hbm2ddl_auto commits after creating the tables, seems reasonable, but SybaseASA (the DB I'm ...

27. JTA Transaction configuration    forum.hibernate.org

Rolling Back a Container-Managed Transaction There are two ways to roll back a container-managed transaction. First, if a system exception is thrown, the container will automatically roll back the transaction. Second, by invoking the setRollbackOnly method of the EJBContext interface, the bean method instructs the container to roll back the transaction. If the bean throws an application exception, the rollback is ...

28. Use JTA transactions in WAS 5.1    forum.hibernate.org

Hibernate version: 2.1.3 Hi guys, I am concerning how to convert the hibernate-based applicaction between JDBC transaction and JTA transaction transparently. And I have explored the hibernate source code and found out that, if we use a JTA transaction, hibernate will lookup a UserTransaction first and check if there is already another JTATransaction existing. If so, hibernate will not create a ...

29. JTA transaction doesn't work for Hibernate higher than 2.1.1    forum.hibernate.org

Hibernate version: 2.1.7 Mapping documents: Use JOTM + Tomcat, specify the JTA transaction in hibernate.cfg.xml net.sf.hibernate.transaction.JTATransactionFactory net.sf.hibernate.transaction.JOTMTransactionManagerLookup Code between sessionFactory.openSession() and session.close(): HibernateUtil.beginTransaction(); try{ Session session = HibernateUtil.currentSession(); session.save(obj); HibernateUtil.commitTransaction(); }catch(Exception e){ HibernateUtil.rollbackTransaction(); } Full stack trace of any exception that occurs: java.lang.UnsupportedOperationException at org.enhydra.jdbc.core.CoreConnection.prepareStatement(CoreConnection.java:287) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at net.sf.hibernate.util.GetGeneratedKeysHelper.prepareStatement(GetGeneratedKeysHelper.java:39) at net.sf.hibernate.impl.BatcherImpl.getPreparedStatement(BatcherImpl.java:257) at ...

31. JTA, Hibernate and "unresolved LocalTransactionContainm    forum.hibernate.org

Author Message grunbaum Post subject: JTA, Hibernate and "unresolved LocalTransactionContainm Posted: Sun Jan 16, 2005 1:51 pm Newbie Joined: Fri Aug 13, 2004 5:08 am Posts: 3 Hibernate version 2.1.7 Hello all, I have implemented parts of an application in an websphere environment (wsad 5.1.1) using spring + hibernate. I have not until now have had the need for ...

32. JTA and Hibernate    forum.hibernate.org

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: Error: The error is: ...

38. Transaction by JTA    forum.hibernate.org

Are you running your code in a JBoss container? If you are, and you've told JBoss about JTA, then no, you don't need to use session.beginTransaction(). JBoss uses JTA for application transactions, so once you have those configured, you shouldn't need to use database transactions any more. I'm afraid I don't know how to configure JBoss to use JTA though. It's ...

39. JTA Transaction durable between HTTP client requests    forum.hibernate.org

Hello, This is the first time I am writting to this topic. I am using hibernate 3.0 with oracle 9i and 10g, running integrated with Spring on an Apache 5.0 web server. I need to keep a transaction open between client requests. I have a "wizard like" screen on my application that perform several writtes to the database. However, if the ...

40. JTA and SWING. How to?    forum.hibernate.org

41. Can we use iterate within JTA trasactions?    forum.hibernate.org

42. Unable to Locate current JTA Transaction    forum.hibernate.org

I'm trying to use Jboss 4.0.4 + Hibernate 3.2 cr2 + JTA and get this error when calling sf.getCurrentSession() .. "Unable to locate current JTA Transaction". When I use sf.openSession() it works fine for some reason, but I would like to use getCurrentSession() like the docs suggest. I'm not using EJBs/CMT in my app. Any idea what I'm doing wrong? I've ...

43. Some confusion when using jta    forum.hibernate.org

I used EJB3.0 to manage transaction over hibernate, I config the following ptoperties in config file, org.hibernate.transaction.CMTTransactionFactory org.hibernate.transaction.SunONETransactionManagerLookup 1) I know hibernate uses hibernate.transaction.manager_lookup_class to locate transaction manager in application server, my explanation of what hibernate does is hibernate uses transaction manager to locate a stated transaction in the context(maybe in the local thread) and synchronize hibernate transaction operation ...

44. Hibernate doesn't work with JTA    forum.hibernate.org

Hi Here's my persistence.xml file: Code: java:/OracleDS ...

45. Hibernate using JTA    forum.hibernate.org

hi all im new to hibernate and i am using JTA transaction. this is my hibernate.hbm.xml. com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/bank_ex root wijithaw 1 org.hibernate.dialect.MySQLDialect true org.hibernate.transaction.JTATransactionFactory jta org.hibernate.transaction.JNDITransactionManagerLookup java:comp/UserTransaction create

46. hibernate JTA configuration    forum.hibernate.org

hi I'm using BMT transaction. i changed my hibernate.hbm.xml file according to your reply bt now i'm getting this error. hibernate,hbm.xml com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/bank_ex root wijithaw 1 org.hibernate.dialect.MySQLDialect true org.hibernate.transaction.JTATransactionFactory org.hibernate.transaction.JBossTransactionManagerLookup jta create ...

47. Hibernate wiht JTA transaction    forum.hibernate.org

hi all. im devoloping a simple standalone hibernate application. I want to use jta transaction. here is my hibernate.cfg.xml com.mysql.jdbc.Driver jdbc:mysql://localhost:3306/test_jta root wijithaw 1 org.hibernate.dialect.MySQLDialect true org.hibernate.transaction.JBossTransactionManagerLookup org.hibernate.transaction.JTATransactionFactory java:comp/UserTransaction create ...

48. How to use JTA transations with standaloan application    forum.hibernate.org

hi all... i have not used jta transactions before. I want to use jta transaction wih hibernate in my standalone application . Still i couldnt configure it to handle jta transactions. i have some knowledge in hibernate. can any one explain me how to use JTA transactions with a standalone applications (is there any sotfware to install for use JTA transactions. ...

49. realted to hibernate and JTA configuration    forum.hibernate.org

50. Unable to locate current JTA transaction    forum.hibernate.org

Hi all, I'm having trouble with JTA Transactions. I'm using Weblogic 9.2 I searched the forums and went through some of the hibernate code and i know the reason for the exception (the exception itself tells you why) What i can't figure out is why it can't find the JTA Transaction. I don't need to do anything special on the weblogic ...

51. How can i use JTA with Hibernate?    forum.hibernate.org

52. hibernate unaware it is in JTA transactions?    forum.hibernate.org

53. Unable to locate current JTA transaction    forum.hibernate.org

Newbie Joined: Wed Jun 03, 2009 8:05 am Posts: 1 Hi, Please help me resolve the following. I am trying to use the CMT transaction to execute the Hibernate queries, but i am getting the following exception. The Hibernate version I am using is Hibernate Version 3.2.4 GA which comes along with jboss-soa-p.4.3.0. Code: [b]Exception Stack Trace[/b] 16:18:30,681 ERROR [STDERR] org.hibernate.HibernateException: ...

55. Hibernate, Maven & the jta.jar: a proposed fix    forum.hibernate.org

Hello there: I've used Hibernate in my Maven builds for quite some time now, and as most of you probably know, the jta.jar dependency included in the Hibernate pom.xml never fails to cause grief. My understanding is that Sun has some sort of license restriction on this jar, which prevents it from being publicly available on the central Maven repository. In ...