I have an ear file with a couple of ejb modules and jars etc etc. One module contains a number of entity beans, and has the appropriate jboss.xml, jbosscmp-jdnc.xml and ejb-jar.xml. All runs perfectly fine, only problem is that the jbosscmp-jdbc xml has following
where MYOwnDSMYSQL is the name found in my data source file mysql-ds.xml which is located in my jboss deploy directory along with other ones such as oracle-ds, hsqldb-ds etc etc.



What i want to know is it possible to supply the datasource in the ear file. I would like to have a complete deployable ear, that will work straight away on a fresh jboss install (3.2.3 or higher). Currently before app is deployed, user needs to edit the mysql-ds file and then copy in the mysql jar (can i put this in my ear file) then it all works fine.

So can i have my own datasource, such as myproject-ds.xml in my ear file, that registers at deploy time and that my ejbmodule in same earfile can pick up and use.
Thank you for any suggestions.