I'm using GlassFish v3. The following field is declared in a class:
@Resource
private javax.sql.DataSource _data_source;
The following is declared in web.xml:
<data-source>
<name>java:app/env/data</name>
<class-name>com.mysql.jdbc.Driver</class-name>
<server-name>localhost</server-name>
<port-number>3306</port-number>
<user>myUser</user>
<password>myPass</password>
</data-source>
At run-time _data_source is empty. What am I doing wrong?