-
1. Re: @WebListener not detected in ear with skinny wars
jaikiran Sep 8, 2014 1:41 AM (in response to electricsam)What WildFly does is the correct way as mandated by the Servlet 3 spec which states:
11.3.1 Provision of Listener Classes
The Developer of the Web application provides listener classes implementing one or
more of the listener interfaces in the javax.servlet API. Each listener class must
have a public constructor taking no arguments. The listener classes are packaged
into the WAR, either under the WEB-INF/classes archive entry, or inside a JAR in
the WEB-INF/lib directory.
-
2. Re: @WebListener not detected in ear with skinny wars
jaikiran Sep 8, 2014 1:42 AM (in response to jaikiran)1 of 1 people found this helpfulI would like to keep skinny wars to avoid dependency duplication across my project
You can still avoid the duplication. Just move the webapp specific components like the listener class to a jar within the .war/lib folder (or even .war/WEB-INF/classes) and you have the really shared classes across the application modules within the .ear/lib jars.