[JBoss JIRA] (JBTM-1711) @CompensationScoped fails in CompensationHandler et al
by Paul Robinson (JIRA)
[ https://issues.jboss.org/browse/JBTM-1711?focusedWorklogId=12429522&page=... ]
Paul Robinson logged work on JBTM-1711:
---------------------------------------
Author: Paul Robinson
Created on: 02/Aug/13 8:22 AM
Start Date: 02/Aug/13 8:21 AM
Worklog Time Spent: 1 day
Issue Time Tracking
-------------------
Remaining Estimate: 0 minutes (was: 2 days)
Time Spent: 1 day
Worklog Id: (was: 12429522)
> @CompensationScoped fails in CompensationHandler et al
> ------------------------------------------------------
>
> Key: JBTM-1711
> URL: https://issues.jboss.org/browse/JBTM-1711
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: TXFramework
> Reporter: Paul Robinson
> Assignee: Paul Robinson
> Priority: Critical
> Fix For: 5.0.0.M4
>
> Original Estimate: 2 days
> Time Spent: 1 day
> Remaining Estimate: 0 minutes
>
> Beans annotated with @CompensationScoped are injected correctly in the application. However, the scope fails to be created for CompensationHandler, ConfirmationHandler and TransactionLoggedHandler implementations. This is because they are invoked by XTS, not the application and thus Weld is not active on the thread.
> The solution is to create the instance of the handlers using the BeanManager (this ensures Weld is active) and then set the ThreadContextClassLoader to the same as the one used by the application. This ensures that the application's Weld context is used when the handler is invoked.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (JBTM-1711) @CompensationScoped fails in CompensationHandler et al
by Paul Robinson (JIRA)
[ https://issues.jboss.org/browse/JBTM-1711?page=com.atlassian.jira.plugin.... ]
Paul Robinson commented on JBTM-1711:
-------------------------------------
Yes it was. Ta.
> @CompensationScoped fails in CompensationHandler et al
> ------------------------------------------------------
>
> Key: JBTM-1711
> URL: https://issues.jboss.org/browse/JBTM-1711
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: TXFramework
> Reporter: Paul Robinson
> Assignee: Paul Robinson
> Priority: Critical
> Fix For: 5.0.0.M4
>
> Original Estimate: 2 days
> Time Spent: 1 day
> Remaining Estimate: 0 minutes
>
> Beans annotated with @CompensationScoped are injected correctly in the application. However, the scope fails to be created for CompensationHandler, ConfirmationHandler and TransactionLoggedHandler implementations. This is because they are invoked by XTS, not the application and thus Weld is not active on the thread.
> The solution is to create the instance of the handlers using the BeanManager (this ensures Weld is active) and then set the ThreadContextClassLoader to the same as the one used by the application. This ensures that the application's Weld context is used when the handler is invoked.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (JBTM-1711) @CompensationScoped fails in CompensationHandler et al
by Paul Robinson (JIRA)
[ https://issues.jboss.org/browse/JBTM-1711?page=com.atlassian.jira.plugin.... ]
Paul Robinson updated JBTM-1711:
--------------------------------
Description:
Beans annotated with @CompensationScoped are injected correctly in the application. However, the scope fails to be created for CompensationHandler, ConfirmationHandler and TransactionLoggedHandler implementations. This is because they are invoked by XTS, not the application and thus Weld is not active on the thread.
The solution is to create the instance of the handlers using the BeanManager (this ensures Weld is active) and then set the ThreadContextClassLoader to the same as the one used by the application. This ensures that the application's Weld context is used when the handler is invoked.
was:More details to come. Nag me if you still see this after a reasonable amount of time.
> @CompensationScoped fails in CompensationHandler et al
> ------------------------------------------------------
>
> Key: JBTM-1711
> URL: https://issues.jboss.org/browse/JBTM-1711
> Project: JBoss Transaction Manager
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: TXFramework
> Reporter: Paul Robinson
> Assignee: Paul Robinson
> Priority: Critical
> Fix For: 5.0.0.M4
>
> Original Estimate: 2 days
> Remaining Estimate: 2 days
>
> Beans annotated with @CompensationScoped are injected correctly in the application. However, the scope fails to be created for CompensationHandler, ConfirmationHandler and TransactionLoggedHandler implementations. This is because they are invoked by XTS, not the application and thus Weld is not active on the thread.
> The solution is to create the instance of the handlers using the BeanManager (this ensures Weld is active) and then set the ThreadContextClassLoader to the same as the one used by the application. This ensures that the application's Weld context is used when the handler is invoked.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months
[JBoss JIRA] (JBTM-1641) EAP 6.1 CNFE org.jboss.tm.TxManager (from Module org.jboss.jboss-transaction-spi:main)
by Michael Musgrove (JIRA)
[ https://issues.jboss.org/browse/JBTM-1641?page=com.atlassian.jira.plugin.... ]
Michael Musgrove edited comment on JBTM-1641 at 8/1/13 11:58 AM:
-----------------------------------------------------------------
I was unable to duplicate the problem on jboss-as-8.0.0.Alpha1-SNAPSHOT. I was able to duplicate it on EAP.
I agree that printing the stacktrace in this instance is excessively verbose. We are in the process of reworking the transactions SPI and as part of that work I will rationalise the debug logging, however we may not make the changes in time for wildfly 8 release.
I have added a link from JBTM-1699 (Changes to the transaction SPI) to make sure we don't loose sight of this JIRA.
Would you object to me closing this issue "as will not fix".
was (Author: mmusgrov):
I was unable to duplicate the problem on jboss-as-8.0.0.Alpha1-SNAPSHOT. That said I agree that printing the stacktrace in this instance is excessively verbose. We are in the process of reworking the transactions SPI and as part of that work I will rationalise the debug logging, however we may not make the changes in time for wildfly 8 release.
I have added a link from JBTM-1699 (Changes to the transaction SPI) to make sure we don't loose sight of this JIRA.
Would you object to me closing this issue "as will not fix".
> EAP 6.1 CNFE org.jboss.tm.TxManager (from Module org.jboss.jboss-transaction-spi:main)
> --------------------------------------------------------------------------------------
>
> Key: JBTM-1641
> URL: https://issues.jboss.org/browse/JBTM-1641
> Project: JBoss Transaction Manager
> Issue Type: Enhancement
> Security Level: Public(Everyone can see)
> Components: Application Server Integration
> Affects Versions: 4.17.3
> Reporter: Darryl Miles
> Assignee: Michael Musgrove
> Priority: Minor
> Fix For: 5.0.0.M4
>
> Original Estimate: 2 days
> Remaining Estimate: 2 days
>
> When enabling additional logging to system DEBUG on startup of standalone-full.xml it is possible to see:
> 07:15:40,780 DEBUG [org.jboss.tm.TransactionManagerLocator] (MSC service thread 1-2) Unable to lookup: java:/TransactionManager: javax.naming.NameNotFoundException: Error looking up TransactionManager, service service jboss.naming.context.java.TransactionManager is not started
> at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:132) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
> at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:80) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:197) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
> at org.jboss.as.naming.InitialContext.lookup(InitialContext.java:120) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:183) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
> at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:179) [jboss-as-naming-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
> at javax.naming.InitialContext.lookup(InitialContext.java:411) [rt.jar:1.7.0_17]
> at org.jboss.tm.TransactionManagerLocator.tryJNDI(TransactionManagerLocator.java:150) [jboss-transaction-spi-7.0.0.Final.jar:7.0.0.Final]
> at org.jboss.tm.TransactionManagerLocator.locate(TransactionManagerLocator.java:131) [jboss-transaction-spi-7.0.0.Final.jar:7.0.0.Final]
> at org.jboss.tm.TransactionManagerLocator.locateTransactionManager(TransactionManagerLocator.java:94) [jboss-transaction-spi-7.0.0.Final.jar:7.0.0.Final]
> at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.<init>(ServerVMClientUserTransaction.java:93) [jboss-transaction-spi-7.0.0.Final.jar:7.0.0.Final]
> at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.<clinit>(ServerVMClientUserTransaction.java:60) [jboss-transaction-spi-7.0.0.Final.jar:7.0.0.Final]
> at org.jboss.as.txn.service.ArjunaTransactionManagerService.start(ArjunaTransactionManagerService.java:115) [jboss-as-transactions-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
> at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
> 07:15:40,786 DEBUG [org.jboss.tm.TransactionManagerLocator] (MSC service thread 1-2) Unable to instantiate legacy transaction manager: java.lang.ClassNotFoundException: org.jboss.tm.TxManager from [Module "org.jboss.jboss-transaction-spi:main" from local module loader @634f6b14 (finder: local module finder @72ff20fb (roots: F:\Devel\deps\jboss-eap-6.1\modules,F:\Devel\deps\jboss-eap-6.1\modules\system\layers\base))]
> at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190) [jboss-modules.jar:1.2.0.CR1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:468) [jboss-modules.jar:1.2.0.CR1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:456) [jboss-modules.jar:1.2.0.CR1]
> at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) [jboss-modules.jar:1.2.0.CR1]
> at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:120) [jboss-modules.jar:1.2.0.CR1]
> at java.lang.Class.forName0(Native Method) [rt.jar:1.7.0_17]
> at java.lang.Class.forName(Class.java:188) [rt.jar:1.7.0_17]
> at org.jboss.tm.TransactionManagerLocator.usePrivateAPI(TransactionManagerLocator.java:172) [jboss-transaction-spi-7.0.0.Final.jar:7.0.0.Final]
> at org.jboss.tm.TransactionManagerLocator.locate(TransactionManagerLocator.java:133) [jboss-transaction-spi-7.0.0.Final.jar:7.0.0.Final]
> at org.jboss.tm.TransactionManagerLocator.locateTransactionManager(TransactionManagerLocator.java:94) [jboss-transaction-spi-7.0.0.Final.jar:7.0.0.Final]
> at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.<init>(ServerVMClientUserTransaction.java:93) [jboss-transaction-spi-7.0.0.Final.jar:7.0.0.Final]
> at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.<clinit>(ServerVMClientUserTransaction.java:60) [jboss-transaction-spi-7.0.0.Final.jar:7.0.0.Final]
> at org.jboss.as.txn.service.ArjunaTransactionManagerService.start(ArjunaTransactionManagerService.java:115) [jboss-as-transactions-7.2.0.Alpha1-redhat-4.jar:7.2.0.Alpha1-redhat-4]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]
> at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17]
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
11 years, 5 months