Hi,
@Resource(mappedName="java:/AdpartnerDS", name="java:/comp/env/AdpartnerDS")
is working for me on JBoss 5.1.0GA. Note: mappedName is the global JNDI name. The name is the local and you can write anything you like, just it must start by "java:/comp/env/". (I think this is a bug.)