<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>Let me check if I understand you correctly...</div><div><br></div><div>I have a module "org.jboss.jts" that applications using my portable extension depend upon. </div><div><br></div><div>I've put the PE file in the module jar. See here:</div><div><br></div><div><div>unzip -l modules/system/layers/base/org/jboss/jts/main/narayana-jts-jacorb-5.0.0.M3-SNAPSHOT.jar | grep META-INF | grep -v maven</div><div> 0 05-24-13 15:01 META-INF/</div><div> 656 05-24-13 15:01 META-INF/MANIFEST.MF</div><div> 49 05-24-13 15:24 META-INF/services/javax.enterprise.inject.spi.Extension</div><div> 0 05-24-13 16:02 META-INF/beans.xml</div></div><div><br></div><div>The contents of META-INF/services/javax.enterprise.inject.spi.Extension, contains just "com.arjuna.ats.jta.cdi.TransactionScopedExtension".</div><div><br></div><div>I've put breakpoints on the methods in "com.arjuna.ats.jta.cdi.TransactionScopedExtension" and they are never invoked. </div><div><br></div><div>I also wonder why we still need CDIExtensionProcessors like this: <a href="https://github.com/wildfly/wildfly/pull/4535/files#diff-7">https://github.com/wildfly/wildfly/pull/4535/files#diff-7</a>, if "you should just need to add the module with the META-INF/services entry as a dependency". </div><div><br></div><div>Are you able to correct my understanding?</div><div><br></div><div>Much appreciated,</div><div><br></div><div>Paul.</div><div><br></div><div><br><div><div>On 22 May 2013, at 12:34, Stuart Douglas <<a href="mailto:sdouglas@redhat.com">sdouglas@redhat.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">No, you should just need to add the module with the META-INF/services entry as a dependency. If it is a Weld deployment then it will pick it up.<br><br>Stuart<br><br>Paul Robinson wrote:<br><blockquote type="cite">Stuart,<br><br>That's great, thanks a lot. I'll keep an eye on the PR.<br><br>Also, won't I still need to use the WeldDeploymentMarker?<br><br>Paul.<br><br>On 22 May 2013, at 01:38, Stuart Douglas <<a href="mailto:stuart.w.douglas@gmail.com">stuart.w.douglas@gmail.com</a><br><<a href="mailto:stuart.w.douglas@gmail.com">mailto:stuart.w.douglas@gmail.com</a>>> wrote:<br><br><blockquote type="cite">I have been meaning to change the way these are registered for some time:<br><br><a href="https://github.com/wildfly/wildfly/pull/4535">https://github.com/wildfly/wildfly/pull/4535</a><br><br>Now it should just be a matter of adding a dependency with a services<br>import on the relevant module.<br><br>Stuart<br><br>Paul Robinson wrote:<br><blockquote type="cite">Stuart,<br><br>The problem with this approach is that I need to introduce a dependency<br>on org.jboss.as:jboss-as-weld, which depends on<br>org.jboss.as:jboss-as-transactions. This introduces a cyclic dependency.<br>org.jboss.as:jboss-as-weld is needed for the WeldDeploymentMarker and to<br>use WeldAttachments.PORTABLE_EXTENSIONS.<br><br><blockquote type="cite">You can do this for every deployment, if beans.xml is not present it<br>won't do anything<br></blockquote><br>I assume this is done by the three tests at the top of the deploy<br>method? Therefore, I would need to use WeldDeploymentMarker.<br><br><blockquote type="cite">you basically just need to attach it under<br>org.jboss.as.weld.deployment.WeldAttachments#PORTABLE_EXTENSIONS for<br>the top level deployment.<br></blockquote>Again, I can't do this without access to<br>WeldAttachments.PORTABLE_EXTENSIONS.<br><br>To break this cycle, I think I would need to create a new maven module<br>and subsytem called, for example, transactions-cdi. This seems a bit<br>over-kill. Is there an alternative you can think of?<br><br>Thanks,<br><br>Paul.<br><br><br>On 14 May 2013, at 10:15, Stuart Douglas <sdouglas@redhat.com<br><mailto:sdouglas@redhat.com>> wrote:<br><br><blockquote type="cite">Registering it in a DUP in the transactions subsystem is fine.<br><br>Have a look in<br>org.jboss.as.weld.deployment.processors.WeldPortableExtensionProcessor#loadAttachments<br>for an example of what you need to do, you basically just need to<br>attach it under<br>org.jboss.as.weld.deployment.WeldAttachments#PORTABLE_EXTENSIONS for<br>the top level deployment.<br><br>You can do this for every deployment, if beans.xml is not present it<br>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>paul.robinson@redhat.com <mailto:paul.robinson@redhat.com><br><mailto:paul.robinson@redhat.com><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<br>Parson<br>(USA), Charlie Peters (USA)<br><br></blockquote></blockquote><br>--<br>Paul Robinson<br>Web Service Transactions Lead<br>paul.robinson@redhat.com <mailto:paul.robinson@redhat.com><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>_______________________________________________<br>wildfly-dev mailing list<br>wildfly-dev@lists.jboss.org<br>https://lists.jboss.org/mailman/listinfo/wildfly-dev<br></blockquote></blockquote><br>--<br>Paul Robinson<br>Web Service Transactions Lead<br><a href="mailto:paul.robinson@redhat.com">paul.robinson@redhat.com</a> <<a href="mailto:paul.robinson@redhat.com">mailto:paul.robinson@redhat.com</a>><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 apple-content-edited="true">
<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; ">-- <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 Company Registration No. 03798903<br>Directors: Michael Cunningham (USA), Brendan Lane (Ireland), Matt Parson<br>(USA), Charlie Peters (USA)</div></span></span>
</div>
<br></div></body></html>