On Thu, Mar 8, 2012 at 1:59 PM, Mark Thomas <ma...@apache.org> wrote: > There is no way you compiled an application that uses > javax.annotation.Resource against the Servlet 2.4 / Java EE 1.4 API. If > you try that you'll get an error.
As I said, javax.annotation.Resource is included with J2SE 6 (as specified in JSR-250, "Common Annotations for the Java(tm) Platform"). http://docs.oracle.com/javase/6/docs/api/javax/annotation/Resource.html So the code I posted compiles just fine under Java 6 with the Tomcat 5.5 APIs. > If you compile against a later API, claim to use an older API and then > run on a container that supports the later API then you should expect > some odd behaviour and that is exactly what you got. Tomcat is never > going to add the necessary checking to prevent this because of the > overhead it adds to fix what is a build time issue. Fair enough. Thanks, -- David --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org