Hi,
which JBoss version?
Is your database bound to the global name "DefaultDS", or does it have a different name?
If the name is different, I think your "@Resource" annotation should be:
@Resource(mappedName="java:MyDS")
private DataSource ds;
As far as I know, the "name" attribut declares a JNDI name in the ENC, which could be used if you have to perform a lookup later - but in most cases you don't need it.
Best regards
Wolfgang