huh? If you are running inside the JBoss app server, it handles the JNDI for you. If you are running outside the app server you don't have any JNDI provider unless you pick one yourself. Why do you have to register the datasource at all, just instantiate it direct in your code.
Plus, if you're running outside of the application server then consider using the transactional JDBC driver that ships with JBossTS. Once again: it's all in the documentation.