When you use a *-ds.xml file, you are *defining a datasource* and NOT a driver. So the jndi name that you are specifying is for the datasource and not the driver. Naturally, when you lookup this jndi name, its going to return you a Datasource.
And what types should be specified within <driver-class>? I think, it can only be of class java.sql.Driver. Is that right?
Yes the driver class needs to implement the Driver interface. Also, the jar containing this driver class needs to be placed in the %JBOSS_HOME%/server/default/lib directory to be picked up by the server.
This makes the things a little more obvious. Thank you.