This is what I would do:
1) Create a *-ds.xml file in a temporary location (anywhere other than server/xxx/deploy).
2) Either copy that file to server/xxx/deploy or, better yet, use the deploy operation on the MainDeployer MBean to deploy the *-ds.xml file.
3) When I am done with the data source, I would remove the *-ds.xml file from the deploy directory (or call the undeploy operation on MainDeployer if that is how I deployed it)
I hope you don't expect to get any kind of decent performance.
Thanks.. Your thing worked for me..
Is there any way to do it using jboss API ? (without using the jboss hot deploy)