[
https://issues.apache.org/jira/browse/TOMEE-2048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Svetlin Zarev reopened TOMEE-2048:
----------------------------------
Thanks, that was awesomely fast ! But it must have a nested
InvalidTransactionException, not a Remote Exception:
{code}
try {
return super.intercept(ic);
} catch (final RemoteException re) {
throw new TransactionalException(re.getMessage(), re);
}
{code}
>From the spec: If called inside a transaction context, a
>TransactionalException with a nested InvalidTransactionException must be thrown
> JTA 1.2 compliance: TxNever called from within transaction must throw
> TransactionalException
> --------------------------------------------------------------------------------------------
>
> Key: TOMEE-2048
> URL: https://issues.apache.org/jira/browse/TOMEE-2048
> Project: TomEE
> Issue Type: Bug
> Reporter: Svetlin Zarev
> Assignee: Romain Manni-Bucau
> Fix For: 7.0.4
>
>
> JTA 1.2 spec mandates that if a managed bean with TxType.NEVER is called from
> within a transaction, A TransactionalException with nested
> InvalidTransactionException must be thrown.
> JTA 1.2 spec, section 3.7:
> {code}
> TxType.NEVER: If called outside a transaction context, managed bean method
> execution must then continue outside a transaction context.
> If called inside a transaction context, a TransactionalException with a
> nested InvalidTransactionException must be thrown.
> {code}
> But instead, TomEE throws
> {code}
> 11:58:36.337 [http-nio-8080-exec-7] ERROR java.lang.Throwable -
> java.rmi.RemoteException: Transactions not supported
> 11:58:36.339 [http-nio-8080-exec-7] ERROR java.lang.Throwable - at
> org.apache.openejb.core.transaction.TxNever.<init>(TxNever.java:47)
> 11:58:36.342 [http-nio-8080-exec-7] ERROR java.lang.Throwable - at
> org.apache.openejb.cdi.transactional.NeverInterceptor.getPolicy(NeverInterceptor.java:41)
> 11:58:36.345 [http-nio-8080-exec-7] ERROR java.lang.Throwable - at
> org.apache.openejb.cdi.transactional.InterceptorBase.intercept(InterceptorBase.java:66)
> 11:58:36.348 [http-nio-8080-exec-7] ERROR java.lang.Throwable - at
> org.apache.openejb.cdi.transactional.NeverInterceptor.intercept(NeverInterceptor.java:36)
> 11:58:36.352 [http-nio-8080-exec-7] ERROR java.lang.Throwable - at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 11:58:36.355 [http-nio-8080-exec-7] ERROR java.lang.Throwable - at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 11:58:36.358 [http-nio-8080-exec-7] ERROR java.lang.Throwable - at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 11:58:36.361 [http-nio-8080-exec-7] ERROR java.lang.Throwable - at
> java.lang.reflect.Method.invoke(Method.java:606)
> 11:58:36.380 [http-nio-8080-exec-7] ERROR java.lang.Throwable - at
> org.apache.webbeans.component.InterceptorBean.intercept(InterceptorBean.java:136)
> 11:58:36.385 [http-nio-8080-exec-7] ERROR java.lang.Throwable - at
> org.apache.webbeans.intercept.InterceptorInvocationContext.proceed(InterceptorInvocationContext.java:63)
> 11:58:36.390 [http-nio-8080-exec-7] ERROR java.lang.Throwable - at
> org.apache.webbeans.intercept.DefaultInterceptorHandler.invoke(DefaultInterceptorHandler.java:139)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)