Closed glassfishrobot closed 11 years ago
@glassfishrobot Commented paul_parkinson said: svn commit -m "fixes and features for JIRA #20247 and #20154" Sending appserver/transaction/internal-api/src/main/java/com/sun/enterprise/transaction/api/JavaEETransactionManager.java Sending appserver/transaction/jta/src/main/java/com/sun/enterprise/transaction/JavaEETransactionManagerSimplified.java Sending appserver/transaction/jta/src/main/java/com/sun/enterprise/transaction/UserTransactionImpl.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorBase.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorMandatory.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorNever.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorNotSupported.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorRequired.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorRequiresNew.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorSupports.java Transmitting file data .......... Committed revision 61342.
@glassfishrobot Commented mvatkina said: There are several problems with the solution:
a) a BMT EJB will be denied UTx access if called from a transactional CDI bean
b) no module outside transaction should depend on the 'jta' module
@glassfishrobot Commented paul_parkinson said: Hi Marina, inline...
There are several problems with the solution: Please let me know if there are others if you mean more than the two you mention here.
a) a BMT EJB will be denied UTx access if called from a transactional CDI bean Yes, that is actually the appropriate behavior as EJB/CMT and CDI/@Transactional do not coordinate with each other according to spec (the user would need to call outside an @Tranactional scope or from within TxType NOT_SUPPORTED or NEVER). I believe you and I did discuss this case with Bill and Linda already but we can discuss this offline more if you like.
b) no module outside transaction should depend on the 'jta' module I don't think there is any such dependency in these changes/solution. I actually need to make changes to the solution regardless as you know and there won't be any jta dependencies in the new changes/solution either.
@glassfishrobot Commented mvatkina said:
a) a BMT EJB will be denied UTx access if called from a transactional CDI bean Yes, that is actually the appropriate behavior as EJB/CMT and CDI/@Transactional do not coordinate with each other according to spec (the user would need to call outside an @Tranactional scope or from within TxType NOT_SUPPORTED or NEVER). I believe you and I did discuss this case with Bill and Linda already but we can discuss this offline more if you like.
CDI/@Transactional should not break the rules in the EJB spec. And the latter says that the container suspends the transaction when invoking BMT bean:
"When a client invokes a business method via one of the enterprise bean’s client views, the container suspends any transaction that may be associated with the client request"
@glassfishrobot Commented paul_parkinson said: svn commit -m "#20154 need to throw IllegalStateException if UserTransaction is used from @Transactional method (re)work" Sending appserver/transaction/internal-api/src/main/java/com/sun/enterprise/transaction/api/JavaEETransactionManager.java Sending appserver/transaction/jta/src/main/java/com/sun/enterprise/transaction/JavaEETransactionManagerSimplified.java Sending appserver/transaction/jta/src/main/java/com/sun/enterprise/transaction/UserTransactionImpl.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorBase.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorMandatory.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorNever.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorNotSupported.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorRequired.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorRequiresNew.java Sending appserver/web/weld-integration/src/main/java/org/glassfish/cdi/transaction/TransactionalInterceptorSupports.java Sending nucleus/common/glassfish-api/src/main/java/org/glassfish/api/invocation/ComponentInvocation.java Transmitting file data ........... Committed revision 61423.
@glassfishrobot Commented Was assigned to paul_parkinson
@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-20154
@glassfishrobot Commented Reported by paul_parkinson
@glassfishrobot Commented Marked as fixed on Sunday, April 14th 2013, 5:52:45 pm
Need to implement this bit from JTA 1.2 spec:
"If an attempt is made to call any method of the UserTransaction interface from within the scope of a bean or method annotated with @Transactional and a Transactional.TxType other than NOT_SUPPORTED or NEVER, an IllegalStateException must be thrown."
Affected Versions
[4.0_dev]