<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Stuart,<div><br></div><div>The problem with this approach is that&nbsp;I need to introduce a dependency on&nbsp;org.jboss.as:jboss-as-weld, which depends on&nbsp;org.jboss.as:jboss-as-transactions. This introduces a cyclic dependency.&nbsp;org.jboss.as:jboss-as-weld&nbsp;is needed for the&nbsp;WeldDeploymentMarker and to use&nbsp;WeldAttachments.PORTABLE_EXTENSIONS.</div><div><br></div><div><blockquote type="cite">You can do this for every deployment, if beans.xml is not present it won't do anything</blockquote></div><div><br></div><div>I assume this is done by the three tests at the top of the deploy method? Therefore, I would need to use&nbsp;WeldDeploymentMarker.</div><div><br></div><div><blockquote type="cite">you basically just need to attach it under&nbsp;org.jboss.as.weld.deployment.WeldAttachments#PORTABLE_EXTENSIONS for the top level deployment.</blockquote></div><div>&nbsp;</div><div>Again, I can't do this without access to&nbsp;WeldAttachments.PORTABLE_EXTENSIONS.</div><div><br></div><div>To break this cycle, I think I would need to create a new maven module and subsytem called, for example, transactions-cdi. This seems a bit over-kill.&nbsp;Is there an alternative you can think of?</div><div><br></div><div>Thanks,</div><div><br></div><div>Paul.</div><div><br></div><div><br><div><div>On 14 May 2013, at 10:15, Stuart Douglas &lt;<a href="mailto:sdouglas@redhat.com">sdouglas@redhat.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Registering it in a DUP in the transactions subsystem is fine.<br><br>Have a look in org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor#loadAttachments for an example of what you need to do, you basically just need to attach it under org.jboss.as.weld.deployment.WeldAttachments#PORTABLE_EXTENSIONS for the top level deployment.<br><br>You can do this for every deployment, if beans.xml is not present it won't do anything.<br><br>Stuart<br><br>Paul Robinson wrote:<br><blockquote type="cite">Stuart (wildfly-dev in CC too)<br><br>I'm implementing JTA 1.2, and part of it is to develop a new CDI<br>context. I'm currently registering that via an Extension in the<br>javax.enterprise.inject.spi.Extension file. The problem with this is<br>that this is a burden on the application developer. Alternatively, I<br>could register it in a DUP in the transactions subsytem. I'd probably<br>have to register it for every deployment, as I don't think I can detect<br>if it's needed.<br><br>@pmuir said that you would probably know what I should do.<br><br>Thanks,<br><br>Paul.<br>--<br>Paul Robinson<br>Web Service Transactions Lead<br><a href="mailto:paul.robinson@redhat.com">paul.robinson@redhat.com</a> &lt;<a href="mailto:paul.robinson@redhat.com">mailto:paul.robinson@redhat.com</a>&gt;<br><br>JBoss, a Division of Red Hat<br>Registered in England and Wales under Company Registration No. 03798903<br>Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt Parson<br>(USA), Charlie Peters (USA)<br><br></blockquote></blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">--&nbsp;<br>Paul Robinson<br>Web Service Transactions Lead<br><a href="mailto:paul.robinson@redhat.com">paul.robinson@redhat.com</a><br><br>JBoss, a Division of Red Hat<br>Registered in England and Wales under&nbsp;Company Registration No. 03798903<br>Directors: Michael Cunningham (USA),&nbsp;Brendan Lane (Ireland), Matt Parson<br>(USA), Charlie Peters (USA)</div></span></span>
</div>
<br></div></body></html>