users@glassfish.java.net

Re: howto: usage of _at_Resources ?

From: <glassfish_at_javadesktop.org>
Date: Thu, 15 Nov 2007 18:26:55 PST

@Resources can only be used at type-level to group a list of @Resource annotations. For example:

@Resources({
  @Resource(name="jdbc/default", type=javax.sql.DataSource.class, mappedName="jdbc/__default"),
  @Resource(name="jdbc/mysql-ds", type=javax.sql.DataSource.class, mappedName="jdbc/mysql-ds")
})

@Resources cannot be used for field or setter injections.

-cheng
[Message sent by forum member 'cf126330' (cf126330)]

http://forums.java.net/jive/thread.jspa?messageID=245748