1 Reply Latest reply on Jun 30, 2009 6:15 AM by Dimitris Andreadis

    HtmlAdaptorServer from JBoss 3.2.7 is not found in JBoss 5.1

    Newbie

      I need to migrate a Jboss 3.2.7 application to Jboss 5.1.0GA.
      I see there's deploy\jmx-html-adaptor1.sar\META-INF\jboss-service.xml file in my old Jboss 3.2.7 install:

      <server>
       <mbean code="com.sun.jdmk.comm.HtmlAdaptorServer" name="jboss.jmx:type=Adaptor,name=HTML">
       <attribute name="MaxActiveClientCount">10</attribute>
       <attribute name="Parser" />
       <attribute name="Port">49802</attribute>
       </mbean>
      </server>
      



      I also have some java code to shutdown our server remotely using this connector on port 49802:
      public static void shutdown(String host, int port) {
       System.out.println("Shutting down server at " + host + ":" + port);
      
       try {
       URL url = new URL("http", host, port, COMMAND);
       url.getContent();
       } catch (Exception ignore) {
       System.err.println("ignoring " + ignore.toString());
       }
       System.out.println("Shutdown complete.");
       }
      
       private static final String COMMAND
       = "/InvokeAction//jboss%2Esystem%3Atype%3DServer/action=shutdown?action=shutdown";
      



      I don't see "\jmx-html-adaptor1.sar" folder in new JB5 server. what's the equivalent of this stuff in jboss 5?
      basically, I just need to shutdown the server remotely.

      For this particular need I could use this solution from http://www.jboss.org/file-access/default/members/jbossas/freezone/docs/Installation_And_Getting_Started_Guide/5/html/The_JBoss_Server___A_Quick_Tour.html#Starting_and_Stopping_the_Server-Stopping_the_Server :

      9.3.4. Stopping the Server
      
      To shutdown the server, you simply issue a Ctrl-C sequence in the console in which JBoss was started. Alternatively, you can use the shutdown.sh command.
      
      [bin]$ ./shutdown.sh -S
      
      The shutdown script supports the following options:
      
      A JMX client to shutdown (exit or halt) a remote JBoss server.
      
      usage: shutdown [options] <operation>
      
      options:
      -h, --help Show this help message (default)
      -D<name>[=<value>] Set a system property
      -- Stop processing options
      -s, --server=<url> Specify the JNDI URL of the remote server
      -n, --serverName=<url> Specify the JMX name of the ServerImpl
      -a, --adapter=<name> Specify JNDI name of the MBeanServerConnection to use
      -u, --user=<name> Specify the username for authentication
      -p, --password=<name> Specify the password for authentication
      
      operations:
      -S, --shutdown Shutdown the server
      -e, --exit=<code> Force the VM to exit with a status code
      -H, --halt=<code> Force the VM to halt with a status code
      


      but anyway - what happened to this deploy\jmx-html-adaptor1.sar service in JBoss 5.1.0? it existed in JBoss 3.2.7