1 of 1 people found this helpful
TransactionServicesis a per-deployment service so you would have to make your custom implementation available through the deployment SPI, i.e.
org.jboss.weld.bootstrap.spi.Deployment.getServices(). What's the target environment? I mean this is rather an integrator issue.
The target environement is Weld EE and Weld Servlet/Tomcat 7 Embedded in conjunction with Arquillian.
Is it possible to register (provide an SPI) so Weld EE or Weld Servlet would pick up my custom transaction service?
Weld SE - yes, extend
org.jboss.weld.environment.se.Weld, override the
createDeployment()method, delegate to super, and add custom transactions service to the deployment
Weld Servlet - not right now, please create an issue
Weld in a Java EE container - it's only possible if an integrator allows to override the default implementation (note that TransactionServices is required for EE containers)
There is an issues filed already: WELD-1495.
I would like to see an SPI so it'd be possible to have my custom transaction services loaded in WeldSE/EmbeddedEE and Weld-Servlet (for use in ie. Tomcat). It should not be necessary to write and maintain my own (integration) implementation for doing so. Really hope this issues will be addressed, so I can test my Entity Beans with JTA support in WeldSE, and playing around with the Naryana JTA.
Thanks Martin for pointing me into the right direction. I'll look into your workaround.