users@glassfish.java.net

Re: how to inject session bean into servlet using _at_EJB

From: Tim Quinn <Timothy.Quinn_at_Sun.COM>
Date: Wed, 13 Feb 2008 11:12:20 -0600

This seems to crop up fairly often.

How about if the container always checks for annotations in an app's
managed classes, regardless of the schema version? Of course it would
perform injection only if the schema version is high enough but it would
warn the user if it finds annos but the specified version is too low.

I know this means a longer codepath in GlassFish for apps with older
schema versions, but it seems a number of developers - and the people
who respond to their questions about why injection does not seem to be
working - lose significant time due to this sort of error.

Just a thought.

- Tim

glassfish_at_javadesktop.org wrote:
> Hi,
>
> Your web.xml is of version 2.4. It needs to be 2.5 to be able to use annotations.
>
> <web-app id="WebApp_ID" version="2.4"
> xmlns="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>
> See similar discussions:
> http://forums.java.net/jive/thread.jspa?messageID=250332&#250332
>
> -cheng
> [Message sent by forum member 'cf126330' (cf126330)]
>
> http://forums.java.net/jive/thread.jspa?messageID=258770
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>