Datasources, what, why, how?

Hope this post clarifies the reasons why you would need a XA Datasource when your JavaEE Application has to store data in two different places using a single transaction. (Or for example, when you want to use PVP to store the domain information from your project in a different database from the one used by jBPM to store its data.)