Then you need to copy this file to your default (or another profile in your JBossAS) deploy folder, tada! you have registered a JNDI registry for the XA Data-source of yours. Now the question is how to use it with Hibernate. Hibernate configuration files are usually something like:
in this hibernate file as you can see, all the variables required to connect to database are specified. However, now that you have created the Datasource you just need to point hibernate configuration file to the new Datasource file, something like:
now you should be able to use Hibernate and it should be able to connect to your database flawlessly.
Please note that the connection datasource name in hibernate file is java:XAOracleDS and not XAOracleDS.