2 Replies Latest reply on Oct 28, 2010 2:49 PM by Peter Johnson

    shutting down with bindings

    Pucky Loucks Newbie

      I'm currently starting multiple jboss on a single server and using the bindings to deal with port conflicts. 


      for example to start the first instance I would type. (based upon the examples @ http://community.jboss.org/wiki/ConfiguringMultipleJBossInstancesOnOneMachine )


      ./run.sh -c node2 -Djboss.service.binding.set=ports-01

      so based upon the bindings.xml it will pick the correct set for ports for the respective services.


      my confusion on this is, why can't I use the following?


      ./shutdown.sh -Djboss.service.binding.set=ports-01


      Am I missing something or is just the way it is.


      The reason I'm asking is that if there are multiple instances running the user might not know which RMI port is for which Jboss instance.




        • 1. Re: shutting down with bindings
          Wolf-Dieter Fink Master

          I decide to wrap the script, (start in background store the PID).

          For shutdown I use 'kill PID' this will initiate a correct shutdown.

          I have trouble with the shutdown by using the ports (wrong defaulting, autodiscovery ...) in the past.

          • 2. Re: shutting down with bindings
            Peter Johnson Master

            The problem is that the shutdown script (or actually, the Java class is invokes) doesn't look at the server's configuration. Thus you have to know the JNDI port and supply it. Also, the shutdown script can be run from anywhere, not just from the system running JBoss AS since it communicates over the network to shut JBoss AS down. And of course if the script is run remotely it would not have access to the binding file.


            But your idea of letting shutdown determine the ports is probably worth pursuing. Though you are missing part of the command - you still have to tell it which configuration to use because each one can have a different port binding file:


            shutdown -c node2 -Djboss.service.binding.set=ports-01


            I recommend that you create a JIRA for this new feature. I suspect that if you also supply the code that it would be accepted. And don't forget that shutdown has to work remotely as well as locally - while this new usage would work only locally the current usage must still work remotely.