2 Replies Latest reply on Jun 3, 2010 7:08 AM by alesj

    What is the minimum configuration to register a Deployer?

    bosschaert

      I'm trying to build a simplistic deployer using the structure in

        http://anonsvn.jboss.org/repos/jbossas/projects/demos/microcontainer/trunk

       

      Just registering my SimpleDeployer (extends AbstractDeployer) as a bean clearly isn't enough as I'm not getting the deploy() and undeploy() callbacks when I call Main.deploy(someurl) after I've installed my deployer. Do I need to register it somehow?

       

      My current registration looks like this:

       

       

      {code}<deployment xmlns="urn:jboss:bean-deployer:2.0">

          <bean name="SimpleDeployer" class="org.acme.SimpleDeployer"/>

      </deployment>{code}

       

       

      I have the following code:

       

       

      {code}// This deploys my Simple Deployer as above

      Main.deploy("${demos.home}/deployer/src/main/resources/META-INF/deployer-beans.xml");

      Main.validate();

       

      Thread.sleep(2000);

      Main.deploy("${demos.home}/deployer/src/main/resources/META-INF/some-other-beans.xml");

      Main.validate();

       

      Thread.sleep(2000);

      Main.undeploy("${demos.home}/deployer/src/main/resources/META-INF/some-other-beans.xml");

      Main.validate();{code}

       

      I can see that the constructor of my SimpleDeployer is getting called, but it doesn't get any deployment callbacks when I call Main.deploy() later on...