Currently, it is possible to define Datasource and Drivers as such in the standalone.xml:
The driver module attribute allows to point to a well define module which is fine. Though it doesn't seems possible to point to another "slot" to be able to switch between multiple version of the same driver.
It would be nice if we could do so, ex:
Also, while playing with the configuration, I've noticed that whatever you put onto the driver definition will be safely discarded instead of throwing an XSD validation exception. I'm not sure this is the proper behavior as it could be very misleading, ex:
Currenly doesn't throw any exception and is getting rewrited to:
Should a bug be opened for that? To me it looks a bit similar to:
The only workaround I'm aware of is to either:
1. create a new main module.xml that depends on the actual versioned slot
2. have the versioning scheme part of the dependency (ex: com/h2database-1.0/main)
Both solutions are not very elegant.