- @Resource equivalent to <resource-ref>, <resource-env-ref>, <env-entry> and <message-destination-ref> in web.xml
- @Resources declares java:comp/env name linkages for reference by JNDI lookups
- @PostConstruct equivalent to <post-construct> in web.xml
- @PreDestroy equivalent to <pre-destroy> in web.xml
- @RunAs equivalent to <run-as> in web.xml
Lets look first at how you can use web.xml to declare injections and callbacks without needing to use JDK1.5 annotations.