2 Replies Latest reply on Jul 11, 2009 2:32 PM by blabno

    Is the hot redeploying of permission drools possible now?

    Gena Batalski Newbie

      Hello,


      is it possible to redeploy the security.drl file without server restart? It doesn't work automatically at least with the current snapshot. I don't want to configure any other agents or working memories as it would be enough for me, simply to compile / apply the new rules on the fly. In general, i think as many components as possible should be redeployable without the restart and not only during the development.


      Is it really a good idea to use drools for simple but, sometimes, context dependant permissions or not?


      Thank you for any help,


      Gena




        • 1. Re: Is the hot redeploying of permission drools possible now?
          blabno Master

          Could anybody comment on that ? Is hot deployment of drools possible ?

          • 2. Re: Is the hot redeploying of permission drools possible now?
            blabno Master

            After experimenting a bit i can tell that it is very simple to hot deploy *.drl files.
            All you need to do is copy new rule files to deployment directory (i.e. explode target in seam-gen project) and remove several items :


            Contexts.getSessionContext().remove("org.jboss.seam.security.ruleBasedPermissionResolver");
            Contexts.getSessionContext().remove("org.jboss.seam.security.defaultResolverChain");
            Contexts.getApplicationContext().remove("securityRules");



            Note that component name in last line may vary according to your components.xml, mine was :


            <drools:rule-base name="securityRules">
                  <drools:rule-files><value>/security.drl</value></drools:rule-files>
               </drools:rule-base>



            It would be cool if such functionality was included in hot deploy filter.
            I think modification of org.jboss.seam.init.Initialization.redeploy method would be enough.


            And one more think : how can I find out from java code what name was configured for drools:rule-base ?