1 Reply Latest reply on Aug 13, 2013 10:09 PM by bvnghiem1012

    Run CLI from mbean

    bvnghiem1012

      Hello all,

       

      I try to modify some configuration in my JBoss 7.1.1 Final server using CLI.

      I use ModelControllerClient to execute the request from java code. It's successful when I run in a seperated java program. But when I define this class as a spring bean and use afterPropertiesSet() method to make it work. It hang the deployment thread until timeout.

       

      My question is how can I make the CLI run at deployment time?

       

      Thanks,

      Nghiem

        • 1. Re: Run CLI from mbean
          bvnghiem1012

          I found the solution for this. Just wrap the code in a single thread.

          But I have another question about CLI. I add a security-domain successfully by CLI in Java code using ModelControllerClient. The new domain also showed in jconsole but in LoginContext, it does not exist and I cannot use it for authentication.

           

          Any one know how to flush the new added security-domain in Java code?  Thanks a lot!