5 Replies Latest reply on Feb 10, 2004 2:56 PM by togath

    deploy datasource on the fly

    togath Newbie

      Is there a way to deploy a datasource (ds.xml) on the fly?

      I am trying to do this thru an MBean using the MBeanServer (invoke method) and the MainDeployer, but it always has a problem deploying the ds.xml file.

      It looks like there are no deployers for ds files in jboss by default. Below is what I get back from the MainDeployer in the log:

      2004-02-09 09:43:16,362 INFO [org.jboss.deployment.MainDeployer] Starting deployment of package: file://C:/jboss/server/default/deploy/tmp-firebird-ds.xml
      2004-02-09 09:43:16,362 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file://C:/jboss/server/default/deploy/tmp-firebird-ds.xml
      2004-02-09 09:43:16,372 DEBUG [org.jboss.deployment.MainDeployer] No deployer found for url: file://C:/jboss/server/default/deploy/tmp-firebird-ds.xml
      2004-02-09 09:43:16,382 INFO [org.jboss.deployment.MainDeployer] deployment waiting for deployer: file://C:/jboss/server/default/deploy/tmp-firebird-ds.xml
      2004-02-09 09:43:16,382 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file://C:/jboss/server/default/deploy/tmp-firebird-ds.xml
      2004-02-09 09:43:16,382 INFO [org.jboss.deployment.MainDeployer] Deployment of package: file://C:/jboss/server/default/deploy/tmp-firebird-ds.xml is waiting for an appropriate deployer

      Thanks in advance


        • 1. Re: deploy datasource on the fly
          Heiko Rupp Master

          What do you mean with 'on the fly'? Just drop them into a running JBoss in deploy/ and they get deployed.

          • 2. Re: deploy datasource on the fly
            togath Newbie

            The new datasource is contained in a SAR file that uses an MBean to copy the ds.xml to deploy. When it is copied I don't see it getting deployed and binding the JNDI name that is in the DS.

            The SAR is in deploy before JBoss is started and is deployed at the time Jboss starts.

            This method is working on 3.06 (using service.xml), but since moving to 3.2.1 I am seeing th problem.

            Thanks for the help

            • 3. Re: deploy datasource on the fly
              Heiko Rupp Master

              When it is in the sar, I expect it to be deployed at deployment time of the sar ("russian doll" principle). So could it be, that it doesn't get deployed, because it is already?

              • 4. Re: deploy datasource on the fly
                togath Newbie

                If it does get deployed when the SAR copies the ds.xml to deploy then I think the JNDI name would be bound. Right?

                I don't see that at all. In fact, after the ds.xml is in deploy the MBean tries to do a lookup on the JNDI name and gets a


                This is the contents of the ds.xml:


                • 5. Re: deploy datasource on the fly
                  togath Newbie

                  oops I must have deleted the password tags, but they are there in the ds.xml