1. before calling session.gettransaction, do I have to ensure one exists? stackoverflow.combefore calling session.gettransaction, do I have to ensure one exists? if so, how do I check if there is a current uncommitted transaction in the session? |
2. When calling JPA's remove() : "A JTA EntityManager cannot use getTransaction()" stackoverflow.comI've been using StackOverflow for a while, but this is my first question here. I am new to JPA, I created a "Role" entity, I would like to do CRUD operations ... |
3. Hibernate: Whether session.get() needs session.getTransaction().commit()? stackoverflow.comThe Code is:
|
4. EJBException when calling entityManager.getTransaction() stackoverflow.comThis is probably something trivial, but I'd love some help. I get:
|
5. entityManager.getTransaction().rollback() detaches entities? stackoverflow.comI have the following piece of code:
This throws an IllegalArgumentException on the fourth line saying "Entity not managed". If I change ... |
6. Is there a difference between getTransaction().begin()/.commit() and joinTransaction() with JPA2/EclipseLink? stackoverflow.comI'm using JPA2 with annotations and EclipseLink and I'm wondering if there is a difference between
and
and which one should I generally ... |
7. em.getTransaction.begin() vs @Transactional forum.hibernate.orgAll, I have a question regarding using the @Transactional annotation vs having to wrap my EntityManager.persist(entity) inside of a EntityManager.getTransaction().begin() and then EntityManager.commit(); For instance, given the following method: Code: public class someDao { EntityManager em; @Transactional(readOnly=false) public void persist(Object entity) { ... |
8. Invalid session.getTransaction()? forum.hibernate.orgWhy would that be easier? You call beginTransaction() to get a Transaction object and start a transaction at the same time. It does not make much sense to return null or return a Transaction object that isn't already active. The latter might have some uses, we are discussing the asymetry in the API right now. However, "null" is not an option. ... |
9. getTransaction() error in the Hibernate Tutorial forum.hibernate.orgHi there, I am following the first tutorial that comes with Hibernate, I get the following error while compiling the code from EventManager.java file. D:\HiberExam\src\events\EventManager.java:33: cannot find symbol symbol : method getTransaction() location: interface org.hibernate.Session session.getTransaction().commit(); ^ 1 error Now I am not sure how to fix this as the code I am using is also available online. I would appreciate ... |
10. Java.lang.NoSuchMethodError at session.getTransaction() call forum.hibernate.orgHi , I am making a simple demo application using JBoss and Hibernate3 Somewhere in my application i have a code like this...... ////////////////////////// session = HibernateUtil.getSessionFactory().openSession(); Transaction tx = session.getTransaction() ;//Java.lang.NoSuchMethodError ///////////////////////////////// The problem is that my application crashes at runtime at the statement Transaction tx = session.getTransaction() ; The stack trace gives following message , java.lang.NoSuchMethodError: org.hibernate.Session.getTransaction()Lorg/hibernate/Transaction; Have read ... |
11. HelpError: A JTA EntityManager can not use getTransaction () forum.hibernate.orgjava.lang.IllegalStateException: A JTA EntityManager cannot use getTransaction() at org.hibernate.ejb.AbstractEntityManagerImpl.getTransaction(AbstractEntityManagerImpl.java:324) at org.springframework.orm.jpa.DefaultJpaDialect.beginTransaction(DefaultJpaDialect.java:70) at org.springframework.orm.jpa.vendor.HibernateJpaDialect.beginTransaction(HibernateJpaDialect.java:53) at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:330) at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:369) at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:340) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:102) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:625) at com.aam2.mailingplatform.repository.IPDao$$EnhancerByCGLIB$$4af933d7.getAll( |