[jboss-user] [EJB/JBoss] - some newbie quesions about transaction.
liuliu
do-not-reply at jboss.com
Fri Aug 22 12:17:39 EDT 2008
hi everyone,
I have some questions about transaction
1 If the db(informix 7) does not support transaction, the session bean's TransactionAttribute must to be not_support?If not, it is required by default. i got a RollbackException.
2 when I test the same method with DefautDS(hypersonic) of JBoss, if TransactionAttribute is not_support, i got exception below, Is it normal?
Exception in thread "main" javax.persistence.TransactionRequiredException: EntityManager must be access within a transaction
| at org.jboss.ejb3.entity.ManagedEntityManagerFactory.verifyInTx(ManagedEntityManagerFactory.java:150)
| at org.jboss.ejb3.entity.TransactionScopedEntityManager.persist(TransactionScopedEntityManager.java:181)
| ......
|
3 how can i use these 2 DataSources in one method? I created 2 EntityManager, but there is always an exception because of transaction.
thanks in advance
liu
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4172031#4172031
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4172031
More information about the jboss-user
mailing list