4 Replies Latest reply on Jul 8, 2004 11:50 AM by sysuser1

    Deploy a block

    sysuser1

      Hi !

      I have deployed my own block but when I restart JBoss I have to restart it in the module block.
      Could you tell me how to do to display my block by default?

      Thanks !!

        • 1. Re: Deploy a block
          jae77

          you need to place the block-service.xml file in the nukes.last directory so it is deployed after the module. or you have to package the block-service.xml file inside the sar so it deploys w/ the classes.

          if you hot deploy the module again, you're going to have to touch the -service.xml file again to get it to reload.

          altho - now that i think about it, you could probably hook into the block's mbean and force a restart when the module is redeployed.

          • 2. Re: Deploy a block
            sysuser1

            Ok, thank you !
            But how to force the mbean to restart when I redeployed my block?

            • 3. Re: Deploy a block
              jae77

              i'm not following the question.

              you have a "module" that also has a "block" associated w/ it, correct?

              to redeploy the block and the block's code hasn't changed, then you just need to "touch" the -service.xml.

              if you change the block's code, then you have to redeploy the module, and then "touch" the -service.xml for the block unless it is packaged inside the ear

              as i said before, it may be possible to do it programatically inside the mbean for the module. i'd have to give this some more thought.

              • 4. Re: Deploy a block
                sysuser1

                No, it's just a block with html link inside like :

                public void render(Page page) {
                 page.print("<a href=index.html?module=myModule>My module</a><br/>");
                }
                

                and I want that, when I restart jboss, it appears in my page without I have to restart it...
                I am sorry if I am not clear. :-/