[gatein-issues] [JBoss JIRA] (GTNPC-76) Hotdeploy of a portlet war, see the portlet.xml loaded before the web.xml

Matt Wringe (JIRA) jira-events at lists.jboss.org
Wed Jan 11 14:27:21 EST 2012


     [ https://issues.jboss.org/browse/GTNPC-76?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Matt Wringe updated GTNPC-76:
-----------------------------

    Attachment: wci-disable-and-manual-native-registration.patch


Including a patch which changes the WCI behaviour in 2 ways

1) a web application can specify it doesn't want to be picked up by the native registration [for generic, an application is defaulted to not being registered. The GateInServlet has to be added to the web.xml for registration to occur]

2) we can now manually register a webapp in WCI.

By using the two behaviours specified above we can get the desired behaviour:
- disable the webapp's registration so that the native implementation doesn't pick it up.
- use the GateInServlet to manually add in the webapp. By using the load-on-startup option in the web.xml we can control when the webapp gets registered with regards to other servlets.
                
> Hotdeploy of a portlet war, see the portlet.xml loaded before the web.xml
> -------------------------------------------------------------------------
>
>                 Key: GTNPC-76
>                 URL: https://issues.jboss.org/browse/GTNPC-76
>             Project: GateIn Portlet Container
>          Issue Type: Quality Risk
>         Environment: JBoss EPP-5.1.0
>            Reporter: Dimitri BAELI
>            Assignee: Matt Wringe
>         Attachments: PortletAndServletLoadOrderTest.war, PortletServletLoadOrder.zip, wci-disable-and-manual-native-registration.patch
>
>
> CONTEXT:
> * A war with a portlet deployed in EPP/GateIn
> PROBLEM:
> * As seen in the Forum (http://community.jboss.org/thread/157804) the servlet / portlet init order is changing between normal startup and hotdeploy. 
> * This breaks the hotdeployment of Spring MVC Portlets (which requires the Spring RootContext to be initialized).
> * This is a quality risk as the loading order is not consitent
> * This breaks the hotdeployment feature of JBossStudio of manual HotDeployment, and it's a huge pain for developpers
> REPRODUCE:
> * To reproduce, I've created a minimalist project (without Spring) that shows the difference between start order init order (normal/hotdeploy).
> * Put the war in a EPP/GateIn deploy dir
> * Start the server
> * The logs will contain this for the fresh start-up:
> {code}
> 03:14:47,514 INFO  [STDOUT] SampleServlet init.
> ...
> 03:15:38,088 INFO  [STDOUT] HelloWorldPortlet init.
> {code}
> * Touch the war file in the deploy dir
> * The logs will contain this for the fresh start-up:
> {code}
> 03:16:24,907 INFO  [TomcatDeployment] undeploy, ctxPath=/PortletAndServletLoadOrderTest
> 03:16:24,979 INFO  [STDOUT] HelloWorldPortlet destroy.
> 03:16:25,180 WARN  [MainResourceResolver] Cannot find servlet context module
> 03:16:25,181 INFO  [STDOUT] SampleServlet destroy.
> 03:16:25,322 INFO  [TomcatDeployment] deploy, ctxPath=/PortletAndServletLoadOrderTest
> 03:16:25,461 INFO  [STDOUT] HelloWorldPortlet init.
> 03:16:25,467 INFO  [STDOUT] SampleServlet init.
> {code}
> * Where we see that the Portlet is inited before the portlet
> EXPECTED:
> * web.xml is initialized before portlet.xml when the war is Hotdeployed, like during a normal startup

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the gatein-issues mailing list