Is this call part of an EJB invocation where EJB uses container-managed
transactions (CMT)? If yes, UserTransaction is not allowed to be called from
such EJB.
thanks,
-marina
glassfish_at_javadesktop.org wrote:
> I've enabled Spring JTA so that it can participate in an existing transaction. Upon my first hit to one of my EJB's I received the exception below from GlassFish. Do I need to configure the TransactionManager to allow it to be used outside of the EJB container?
>
> Caused by: java.lang.IllegalStateException: Operation not allowed.
> at com.sun.enterprise.distributedtx.UserTransactionImpl.checkUserTransactionMethodAccess(UserTransactionImpl.java:135)
> at com.sun.enterprise.distributedtx.UserTransactionImpl.getStatus(UserTransactionImpl.java:262)
> at org.springframework.transaction.jta.JtaTransactionManager.isExistingTransaction(JtaTransactionManager.java:820)
> at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:354)
> at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:263)
> at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:101)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> at com.sybase.it.quoting.advice.MethodTimingInterceptor.invoke(MethodTimingInterceptor.java:33)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
> at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
> at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
> at $Proxy151.listGroups(Unknown Source)
> at com.sybase.it.product.impl.ProductBroker.listGroupsForMonth(ProductBroker.java:78)
> [Message sent by forum member 'cmathrusse' (cmathrusse)]
>
> http://forums.java.net/jive/thread.jspa?messageID=290156
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>