[undertow-dev] accessing msc services

Stuart Douglas sdouglas at redhat.com
Tue Feb 11 01:44:18 EST 2014


What information are you actually after? Undertow still uses the same metadata, but it also looks at some additional attachments when it is building the deployment. 

Something you could do to avoid the static service registry is just pass the ServiceRegistry that you can get in a DeploymentUnitProcessor to the HandlerWrappers constructor, and add the service name to you are after to the attachment org.jboss.as.server.deployment.Attachments#WEB_DEPENDENCIES.

This will allow you to look up the service in the handler wrapper, and adding it to the dependencies list means that it will definitely be up by that time.

Stuart

----- Original Message -----
> From: "Bill Burke" <bburke at redhat.com>
> To: "Stuart Douglas" <sdouglas at redhat.com>
> Cc: "Tomaž Cerar" <tomaz.cerar at gmail.com>, undertow-dev at lists.jboss.org
> Sent: Sunday, 9 February, 2014 9:08:31 PM
> Subject: Re: [undertow-dev] accessing msc services
> 
> Thanks.
> 
> For a EAP/AS7 IIRC, JBossWeb only exposed Metadata, so I'd have to use a
> static service registry pattern or something?  Anybody know?
> 
> On 2/7/2014 10:21 PM, Stuart Douglas wrote:
> > To save you looking the relevant class is
> > org.wildfly.extension.undertow.deployment.UndertowAttachments.
> >
> > Stuart
> >
> > ----- Original Message -----
> >> From: "Bill Burke" <bburke at redhat.com>
> >> To: "Tomaž Cerar" <tomaz.cerar at gmail.com>
> >> Cc: undertow-dev at lists.jboss.org
> >> Sent: Friday, 7 February, 2014 11:10:26 PM
> >> Subject: Re: [undertow-dev] accessing msc services
> >>
> >>
> >>
> >> On 2/7/2014 3:53 PM, Tomaž Cerar wrote:
> >>>
> >>> On Fri, Feb 7, 2014 at 9:51 PM, Bill Burke <bburke at redhat.com
> >>> <mailto:bburke at redhat.com>> wrote:
> >>>
> >>>      I just need a reference to this service as it contains config
> >>>      information that is stored in the subsystem (standalone.xml, sorry
> >>>      if I'm confusing the terminology).  Don't care where or when the
> >>>      Undertow Handler gets this referenc(deploy time or runtime).
> >>>
> >>>      Is it possible to create HttpHandler instances in a deployment
> >>>      processor and attach them to the WAR deployment?  What about
> >>>      AuthMechanisms?  I guess I should dive into the undertow subsystem a
> >>>      bit more.
> >>>
> >>>
> >>>
> >>> Yeah it is possible create & attach http handlers to the chain inside
> >>> your deployment processor, same for auth mechanisms.
> >>> There are many subsystems that already do exactly this.
> >>
> >> Awesome. Ok, that's all I needed.  I'll search the codebase.
> >>
> >> --
> >> Bill Burke
> >> JBoss, a division of Red Hat
> >> http://bill.burkecentral.com
> >> _______________________________________________
> >> undertow-dev mailing list
> >> undertow-dev at lists.jboss.org
> >> https://lists.jboss.org/mailman/listinfo/undertow-dev
> 
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
> 



More information about the undertow-dev mailing list