If the code is basically the same, why not deploying it in a .jar file and then deploy 2 xml descriptors e.g. instance1-service.xml, instance2-service.xml, with the content you've mentioned?
Just make sure there is no META-INF/jboss-service.xml in the .jar file.
That's interesting. I will try. Thanks!