-
1. Re: 'You cannot commit during a managed transaction' issue
jaikiran Apr 21, 2011 3:23 AM (in response to mcatalin23)What you need is bean managed transactions, which can be achieved by setting @javax.ejb.TransactionManagement(TransactionManagementType.BEAN) on the bean implementation class or using the following in the ejb-jar.xml:
<session> <ejb-name>...</ejb-name> ... <transaction-type>Bean</transaction-type> ....
By the way, I would recommend that you try the latest AS 6.1.0 SNAPSHOT http://community.jboss.org/thread/161386 since there was a bug (with a workaround) https://issues.jboss.org/browse/EJBTHREE-2238 in 6.0.0.Final related to Bean managed transactions.
-
2. 'You cannot commit during a managed transaction' issue
mcatalin23 Apr 21, 2011 3:40 AM (in response to jaikiran)My deployment descriptor looks like this:
...
<session>
<ejb-name>MyBeanClass</ejb-name>
<business-remote>....MyBeanInterface</business-remote>
<local-bean/>
<ejb-class>....MyBeanClass</ejb-class>
<session-type>Stateless</session-type>
</session>
...
I will add
<transaction-type>Bean</transaction-type>
Should I understand that Container is the default value for transaction type?
-
3. 'You cannot commit during a managed transaction' issue
jaikiran Apr 21, 2011 3:41 AM (in response to mcatalin23)1 of 1 people found this helpfulCatalin Moga wrote:
Should I understand that Container is the default value for transaction type?
Yes, that's correct.