if you do have proper extension, than it is simple :)
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.
once you have created your servletextension with the data from your service
just pass that servlet extension instance to attachment list.
deploymentUnit.addToAttachmentList(UndertowAttachments.UNDERTOW_SERVLET_EXTENSIONS,
your servlet extension);
this way your exact instance will be used, no need for registering it as
service in meta-inf...
hope this helps,
tomaz
On Fri, Jan 23, 2015 at 6:54 PM, Harris, Carl <ceharris(a)vt.edu> wrote:
On Jan 23, 2015, at 12:17 PM, Tomaž Cerar
<tomaz.cerar(a)gmail.com> wrote:
Other option would be to write proper WildFly extension which is bit
more work.
take a look at
https://docs.jboss.org/author/display/WFLY8/Extending+WildFly+8
for how to do that.
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.
I am using an Undertow ServletExtension so that I can augment the
authentication mechanisms supported by Undertow with my own mechanism.
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.
Thanks for any tips/advice.
—
Carl Harris
Chief Technology Architect
Virginia Tech