Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
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:
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.
But instead, TomEE throws
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)