I'm not sure but maybe you can use the naming subsystem:
<subsystem xmlns="urn:jboss:domain:naming:1.2">
<bindings>
<lookup name="java:XY_DS" lookup="java:jboss/datasource/XY_DS"/>
</bindings>
<remote-naming/>
</subsystem>
Let me know whether it works