Each vendor is required to support configuration that lets you map the logical DataSource to
a physical app server resource. However, the exact way that's done is left up to the vendor. The
key is that it must be supported in a way that does not require any changes to the portable parts of your application -- meaning the source code and standard deployment descriptors.
The easiest way to do this is to specify the name() attribute on @Resource. Then map that
logical name to a vendor-specific name in a vendor-specific .xml file. For GlassFish those are called sun-ejb-jar.xml or sun-web.xml, depending on the module in which the @Resource dependency is defined.
[Message sent by forum member 'ksak' (ksak)]
http://forums.java.net/jive/thread.jspa?messageID=345952