My question is that is there anyway to dynamically configure the JBoss datasource other than using the *-ds.xml paradigm, and I am not talking about creating the xml on the fly?
There is DeploymentServiceMBean which can help you to do so , all you need is to work and create velocity macros , but remember that it is experimental , I think it might work .
Have a look at this link
Another option would be write a MBean which will create the ds.xml and deploy it , this is not too complex and you should be able to do it .
Finally there is a JIRA for such requirement which would be done for Jboss5
Using the DeploymentService seems to be working. What I did was to convert my Service Archive to interface with the DeploymentService and added in the undeploy and deploy methodology. This allows the admin the ability to change the Service Archive params on the fly to reconfigure the DataSource. The only problem with this is that I would have preferred to use the JBoss 5 implementation and when going to JBoss 5 this will have to be re-written. If you are going to follow this Topic I would definetly consider what the impact of this type of implementation will cause when migrating.
If you are going to follow this Topic I would definetly consider what the impact of this type of implementation will cause when migrating.
If I am alive I am going to follow this Topic :)
The DeploymentService is MBean which will surely work on the future release of Jboss