The datasource configuration is the same for both modes.
Difference is that the domain.xml contain more than one profiles (as standalone*.xml does).
You need to check whether you use the correct profile. The server is part of a server-group and this group use a specific configuration profile.
This profile need to have the datasource. Also you need to add the driver as a module (manually) for all instances if you use more than one.
If that did not help you should provide more details.