<div dir="ltr"><div>if you do have proper extension, than it is simple :)<br><br></div><div>You could create your servletExtension as part of your deployment processor, where you can lookup service registry by calling deploymentUnit.getServiceRegistry() and lookup service from there.<br></div><div>once you have created your servletextension with the data from your service just pass that servlet extension instance to attachment list.<br></div><div><pre style="background-color:rgb(255,255,255);color:rgb(0,0,0);font-family:&quot;Courier New&quot;;font-size:12pt">deploymentUnit.addToAttachmentList(UndertowAttachments.<span style="color:rgb(102,14,122);font-weight:bold;font-style:italic">UNDERTOW_SERVLET_EXTENSIONS</span>, your servlet extension);</pre><br></div>this way your exact instance will be used, no need for registering it as service in meta-inf...<br><br>hope this helps,<br>tomaz<br><div><br><br><span style="color:rgb(102,14,122);font-weight:bold;font-style:italic"></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 23, 2015 at 6:54 PM, Harris, Carl <span dir="ltr">&lt;<a href="mailto:ceharris@vt.edu" target="_blank">ceharris@vt.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div style="word-wrap:break-word"><span class="">
On Jan 23, 2015, at 12:17 PM, Tomaž Cerar &lt;<a href="mailto:tomaz.cerar@gmail.com" target="_blank">tomaz.cerar@gmail.com</a>&gt; wrote:<br>
<div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div>
<div>Other option would be to write proper WildFly extension which is bit more work.<br>
</div>
take a look at <a href="https://docs.jboss.org/author/display/WFLY8/Extending+WildFly+8" target="_blank">
https://docs.jboss.org/author/display/WFLY8/Extending+WildFly+8</a><br>
for how to do that.<br>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</span><div>Perhaps I wasn’t clear in my original message.  I have written a proper Wildfly extension.  It uses a DeploymentProcessor to observe deployments and participates and in the management model to create/configure the services needed for the authentication
 and authorization mechanisms I wish to support.</div>
<div><br>
</div>
<div>I am using an Undertow ServletExtension so that I can augment the authentication mechanisms supported by Undertow with my own mechanism.</div>
<div><br>
</div>
<div>What I’m unclear on how to accomplish is how to get a reference to the services I have created in my Wildfly extension from within the implementation of my Undertow authentication mechanism and associated identity manager.</div>
<div><br>
</div>
<div>Thanks for any tips/advice.</div><span class="">
<div><br>
</div>
<div><br>
</div>
<div>—</div>
<div>Carl Harris</div>
<div>Chief Technology Architect</div>
<div>Virginia Tech</div>
</span></div>

</blockquote></div><br></div>