[jboss-jira] [JBoss JIRA] (WFLY-9880) ServletContainerInitializer at onStartup is not invoked for deployment

Jan Stourac (JIRA) issues at jboss.org
Thu Feb 22 13:50:00 EST 2018


    [ https://issues.jboss.org/browse/WFLY-9880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13537135#comment-13537135 ] 

Jan Stourac commented on WFLY-9880:
-----------------------------------

Thank you, Stuart, you are right. After adding the {{services="import"}} attribute in jboss-deployment-structure.xml as you said, it starts to work.

I was able to find that this change in behaviour is becaus of this fix WFLY-9375. I think we should make some note in release notes about this change as some customers might have similarly broken deployments too. I'll put a comment in that original jira.

> ServletContainerInitializer at onStartup is not invoked for deployment
> -------------------------------------------------------------------
>
>                 Key: WFLY-9880
>                 URL: https://issues.jboss.org/browse/WFLY-9880
>             Project: WildFly
>          Issue Type: Bug
>          Components: Web (Undertow)
>    Affects Versions: 12.0.0.Beta1
>            Reporter: Jan Stourac
>            Assignee: Stuart Douglas
>         Attachments: deployment-with-dep.war, module.xml, servlet-container-init.jar
>
>
> The {{ServletContainerInitializer at onStartup}} is not invoked for deployment. See {{Steps to Reproduce}}.
> Problematic part seems to be on [this line|https://github.com/undertow-io/undertow/blob/1706a5f41adb8f1a719617ca8516ec6078cb1285/servlet/src/main/java/io/undertow/servlet/core/DeploymentManagerImpl.java#L199] in Undertow
> {code}
>                     //then run the SCI's
> --->                for (final ServletContainerInitializerInfo sci : deploymentInfo.getServletContainerInitializers()) {
>                         final InstanceHandle<? extends ServletContainerInitializer> instance = sci.getInstanceFactory().createInstance();
>                         try {
>                             instance.getInstance().onStartup(sci.getHandlesTypes(), servletContext);
>                         } finally {
>                             instance.release();
>                         }
>                     }
> {code}
> It looks like calling {{deploymentInfo.getServletContainerInitializers()}} does not include our deployment and simply ignores it.



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the jboss-jira mailing list