Conflicts between sip.xml and annotations
- From: Nitzan Nissim <
- Subject: Conflicts between sip.xml and annotations
- Date: Thu, 27 Feb 2014 17:02:57 +0200
The issue of conflicts between sip.xml and annotation needs to be clarify
in the spec.
The Web Servlets spec says the xml take precedence, so it makes sense this
will be the same for SIP, but it needs to be explicitly stated somewhere in
Another thing that should be made clear, is what happens if the annotations
specify more or different parameters in an element that had other
parameters in the xml. Will these get merged, or will the annotation be
ignored completely? (e.g. Servlet xml element has no description, and
@SipServlet annotation for the same class specifically states one).
I think that ignoring such annotation will make more sense.
Another situation are conflicting cases like same Servlet name to 2
different classes, one stated in xml and another in annotation.
I think that in this case the deployment should fail, rather then letting
the xml take precedence and ignore the annotation...