0 Replies Latest reply on Oct 9, 2003 3:53 AM by Scy

    Dynamic datasources?

    Scy Newbie


      I have a need to configure and deploy a datasource dynamically (at runtime). I have an application which needs to create a mysql database, create a datasource based on this database, deploy the datasource, and write to the db.

      Creating the database is not a problem, and already implemented. However, I have not been able to find any reference to creating a datasource dynamically in JBoss.

      The way I see it being done is to create an MBean, deploy it, and wait for deployment to finish before proceeding. However, I do not know which MBean to create, how to configure it and the deployment issues.

      Since I could potentially (and very inelegantly), add -ds.xml files to the /deploy directory at runtime, I know something like this must be possible through JMX.

      I would be grateful for any pointers.