jta

Exception Error: Unable to create requested service [org.hibernate.service.jta.platform.spi.JtaPlatform]

烂漫一生 提交于 2019-12-14 03:53:37
问题 I have spent days trying to resolve this issue, but to no avail. I have already seen the post Unable to create requested service [org.hibernate.service.jta.platform.spi.JtaPlatform], which has the same title, but has not helped in resolving this issue. In addition, the original poster did not respond to requests for additional information. I am using Eclipse (Kepler) on Windows 64bit, Java EE Spring application with Tomcat 7.0 and Hibernate. I had previously gotten Hibernate working correctly

Application-Managed entityManager work, but Container-Managed Entity Manager doesn't. Why?

橙三吉。 提交于 2019-12-14 03:04:57
问题 I develop client-server application with JavaEE. I have a stateless bean AuthenticateEJB . It works fine, database entry refreshs when I use Application-Managed Entity Manager (package and import statements omitted for simplifying): @PersistenceUnit(unitName = "horses_unit") EntityManager em; user.setToken("PapaToken"); EntityManagerFactory emf = Persistence.createEntityManagerFactory("horses_unit"); EntityManager em = emf.createEntityManager(); EntityTransaction tx = em.getTransaction(); tx

Transaction setTimeOut ignored in JTA environment

元气小坏坏 提交于 2019-12-13 18:14:13
问题 We have a problem setting transaction timeout on specific operations, overriding the general timeout in an application with Hibernate 4.2.1 and Jboss 7AS, since we find values set with "setTimeOut" are ignored. We have a JTA non-CMT persistence unit like this: <persistence-unit name="ourName" transaction-type="JTA"> <provider>org.hibernate.ejb.HibernatePersistence</provider> <jta-data-source>java:/datasources/ourDataSourceName</jta-data-source> <properties> <property name="hibernate

unit testing code which uses JPA & JTA

牧云@^-^@ 提交于 2019-12-13 15:34:29
问题 I use 2 separate database, so i have to use JTA to handle distributed transactions.So either either both db have to commit or both rollback. I use open JPA and JTA.Now to unit test the code using junit ? I get the following error when i try to run my code which handles distributed transcations.I had posted similar question on this site and someone asked me to refer http://knol.google.com/k/how-to-unit-test-enterprise-java-beans-ejb# But i dint understand any thing from there. <openjpa-1.2.1

Why does not commit transaction of Requires_New?

元气小坏坏 提交于 2019-12-13 12:40:20
问题 I have a problem. I am working on java application server(sap netweaver) with I am using ejb 3.0 So I want to database insert one by one. Because I have too much data and i have to divide data. So I made try test code and it did work but it did not work as I want. I want to create a new transaction for each part and of course at the end method(transaction) should be commit. Sample code is below; package com.transaction.jobs; import javax.ejb.Local; /** * * @author muratdemir */ @Local public

tomee - how to use RESOURCE_LOCAL datasource

吃可爱长大的小学妹 提交于 2019-12-13 04:28:47
问题 I have some classes (ejb, webservices, mdb, etc..) that can use JTA. For some classes I need RESOURCE_LOCAL (can't be injected). However I can't get tomee to reference the jndi name of RESOURCE_LOCAL . How do you setup tomee and RESOURCE_LOCAL ? I can't seem to find one good example online, I would prefer not to put any usernames and passwords in my persistence.xml file. tomee.xml has this: <Resource id="MYDS" type="DataSource"> JdbcDriver com.mysql.jdbc.Driver JdbcUrl jdbc:mysql://127.0.0.1

Java EntityManager null with @PersistenceContext

元气小坏坏 提交于 2019-12-13 03:51:01
问题 I'm using Wildfly 10, Jersey, and injecting dependencies with @Inject. I have DAO and Service interfaces with their implementations declared in a CustomBinder. The injections work well, but the EntityManager is injected null with the @PersistenceContext annotation. I'm using MySQL and the datasource test-connection is working. API Rest class @Path("/account") public class CuentaServiceRS { @Inject private ICuentaService cuentaService; @GET @Produces(MediaType.APPLICATION_JSON) public Cuenta

Drools flow persistence - No active JTA transaction on joinTransaction call

 ̄綄美尐妖づ 提交于 2019-12-13 02:28:20
问题 I've been trying to configure persistence to work with drools flow on JBOSS 6.0.0.Final by following the documentation Drools-Flow-Persistence but I keep getting a exception as below (although hibernate DOES create the database schema): java.lang.RuntimeException: Could not commit session 2011-04-14 23:16:53,716 ERROR [STDERR] (http-0.0.0.0-8000-1) at org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:292) 2011-04-14 23:16:53,716 ERROR [STDERR]

Where are Websphere AS transaction manager logs?

时间秒杀一切 提交于 2019-12-13 01:55:21
问题 Does Websphere Application Server (7.0, preferably) have a log for transaction manager? I'd like to see how and when transactions are started for my application's threads, whether and when they commit or rollback, etc. 回答1: I would suggest to set logging for the package com.ibm.wsspi.uow (maybe com.ibm.websphere.uow and com.ibm.websphere.jtaextensions too) to FINEST (somewhere in your WebSphere administrative console). This should give you plenty information about what's going on. Maybe the

Spring @Transactional - javax.persistence.TransactionRequiredException

纵然是瞬间 提交于 2019-12-12 20:41:16
问题 In the following schema Controller -> Service -> DAO I'm trying to make Service operations @Transactional in my UserService.fooFunction() i call Entity e = dao.find(key) e.setProperty(something) dao.update(e) in dao.update(e) at the end there is em.flush() //EntityManager obtained by @PersistenceContext annotation (injected by spring IoC) Calling flush() throws a persistenceException: javax.persistence.TransactionRequiredException No externally managed transaction is currently active for this