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

    Deploy a block

    sys user Master

      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
          jae Master

          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
            sys user Master

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

            • 3. Re: Deploy a block
              jae Master

              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
                sys user Master

                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. :-/