@WebService annotation in a library jar
I encountered something interesting and wondered what the forum thinks - is a bug or a feature. We had a jar that contained a class A that was annotated with @WebService. This class A is a WebService implementation class under a different depplyment. However, in this deployment of new Web Service endpoint, this class A in the jar is simply used as a library and web.xml did not point to this class A either. But when I deployed this new WebService (packaged in a war) to Glassfish v2.1, Glassfish was trying to process the @WebService annotation in this class A in the library jar and of course caused error. The same jar is also used in another new EJB3-based WebService endpoint and packaged as EJB jar. That deployment did not cause any problem. So is this a bug in Glassfish's Web container (EJB did not show the same behavior)?