https://issues.apache.org/bugzilla/show_bug.cgi?id=54379

--- Comment #5 from Violeta Georgieva <violet...@apache.org> ---
Created attachment 29840
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29840&action=edit
Patch proposal + tests

Hi,

Please find attached a patch proposal and tests.

Important notes to the implementation:
1. Only one method per given event is allowed per class.
2. As per javaee_6.xsd if 'lifefycle-callback-class' element is not specified
then the component that contains definitions for post-construct or pre-destroy
should be used. For web applications we can specify this functionality only per
web application and not per web component so in the implementation if the class
is not specified then IllegalArgumentException will be thrown.
3. If method for a given event is specified in deployment descriptor and with
annotation - the definition in the descriptor will be used.
4. If there are definitions in web.xml and in web-fragment.xml then
web-fragment.xml will be ignored.
5. If there are no definitions in the web.xml and we have definitions in web
fragments then they will be merged. However if there are conflicts - more than
one method per given event per class - the merge operation will not succeed.
6. If the method specified in the deployment descriptor cannot be found in the
class then IllegalArgumentException will be thrown.

I'm looking forward to your comment.

Regards
Violeta

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to