[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - JPA in database with no transaction support

fobos do-not-reply at jboss.com
Mon Jul 9 10:03:54 EDT 2007


Hi all, i have a mapped Entity JPA tables to database with no transaction support and when a have a SSB with eg:

anonymous wrote : List method x(){
  | 1-  x = em.persist(obj);
  | 2-  y = em.find(obj.class,key);
  | 3-  z = em.createNamedQuery(queryXX).getResultList();
  | System.out.println(x+y+z);// at this line all ok
  |   return z;
  | }

the lines 1,2,3 and 4 run perfect print objects in console, but when in a Backing Bean for JSF i access this SSB and call this method throws the folowing exception:

anonymous wrote : java.lang.RuntimeException: javax.transaction.RollbackException: [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] [com.arjuna.ats.internal.jta.transaction.arjunacore.commitwhenaborted] Can't commit because the transaction is in aborted state
  | 	org.jboss.aspects.tx.TxPolicy.handleEndTransactionException(TxPolicy.java:198)

The problem is in a SSB ? JPA Implementation ? JSF ?

The registry in line "1- x = em.persist(obj);" is persisted in database and some operations is ok print in console, but when a return a object to JSF  backing bean the error is throw.

JPA works with databases can´t work with transactions ??

Please helps, i using a Informix database with no transaction support.
Thanks.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061985#4061985

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061985




More information about the jboss-user mailing list