Discussions

EJB design: how to reload my aplication with out restarting my jboss server

  1. Hi,

      I need the finest way to reload my application whaen i am changing any class files or jsps. I am using jboss 4.1.sp.
  2. 1.You can use http://localhost:8080/jmx-console/ to do it manually

    2.Or a simple ant script (for unix):

      ......
      <property name="project.name" value="YOUR_PROJECT"/>
      <property name="jboss.user" value="admin"/>
      <property name="jboss.password" value="PASSWORD"/>
      <property name="jboss.adminUrl" value="http://localhost:8080/jmx-console/HtmlAdaptor?action=invokeOp&amp;name=jboss.web:j2eeType=WebModule,name=//localhost/${project.name},J2EEApplication=none,J2EEServer=none"/>
      ......
      <target name="reload" description="Reload web application">^
        <exec executable="wget">^
          <arg value="--http-user=${jboss.user}"/>^
          <arg value="--http-passwd=${jboss.password}"/>^
          <arg value="--output-document=/dev/null"/>^
          <arg value="${jboss.adminUrl}&amp;methodIndex=2"/>^
        </exec>^
      </target>^

      <target name="start" description="Start web application">
        <exec executable="wget">
          <arg value="--http-user=${jboss.user}"/>
          <arg value="--http-passwd=${jboss.password}"/>
          <arg value="--output-document=/dev/null"/>
          <arg value="${jboss.adminUrl}&amp;methodIndex=4"/>
        </exec>
      </target>

      <target name="stop" description="Stop web application">
        <exec executable="wget">
          <arg value="--http-user=${jboss.user}"/>
          <arg value="--http-passwd=${jboss.password}"/>
          <arg value="--output-document=/dev/null"/>
          <arg value="${jboss.adminUrl}&amp;methodIndex=5"/>
        </exec>
      </target>
  3. problems with Ant_jboss reloading web[ Go to top ]

    Hi,

    I am using that solution but I am struggling because the URL:


     


    reload:
         [exec] Current OS is Linux
         [exec] Executing 'wget' with arguments:
         [exec] '--http-user=es-super1'
         [exec] '--http-passwd=es-super1'
         [exec] '--output-document=/dev/null'
         [exec] 'http://xxxxxx:8080/jmx-console/HtmlAdaptor?action=invokeOp&name=jboss.web:j2eeType=WebModule,name=//localhost/apps,J2EEApplication=none,J2EEServer=none&methodIndex=2'

         [exec]
         [exec] The ' characters around the executable and arguments are
         [exec] not part of the command.
    Execute:Java13CommandLauncher: Executing 'wget' with arguments:
    '--http-user=es-super1'
    '--http-passwd=es-super1'
    '--output-document=/dev/null'
    'http://xxxxxxxx:8080/jmx-console/HtmlAdaptor?action=invokeOp&name=jboss.web:j2eeType=WebModule,name=//localhost/apps,J2EEApplication=none,J2EEServer=none&methodIndex=2

    The ' characters around the executable and arguments are
    not part of the command.
         [exec] --14:41:54--  http://xxxx:8080/jmx-console/HtmlAdaptor?action=invokeOp&name=jboss.web:j2eeType=WebModule,name=//localhost/apps,J2EEApplication=none,J2EEServer=none&methodIndex=2

         [exec]            => `/dev/null'


         [exec]            => `/dev/null'
         [exec] Resolving xxxxx... xxx.xxx.xxx.xxx
         [exec] Connecting to xxxxx|xxx.xxx.xxx.xxx4|:8080... connected.
         [exec] HTTP request sent, awaiting response... 500 Internal Server Error
         [exec] 14:36:49 ERROR 500: Internal Server Error.
         [exec]
         [exec] Result: 1


    Anything wrong in there I am not seeing?
    I am using JBoss AS 4.2.0

    Thanks very much

    Ran
  4. problems with Ant_jboss reloading web[ Go to top ]

    Hi,

    I am using that solution but I am struggling because the URL:


     


    reload:
         exec Current OS is Linux
         exec Executing 'wget' with arguments:
         exec '--http-user=es-super1'
         exec '--http-passwd=es-super1'
         exec '--output-document=/dev/null'
         exec 'http://xxxxxx:8080/jmx-console/HtmlAdaptor?action=invokeOp&name=jboss.web:j2eeType=WebModule,name=//localhost/apps,J2EEApplication=none,J2EEServer=none&methodIndex=2'

         exec
         exec The ' characters around the executable and arguments are
         exec not part of the command.
    Execute:Java13CommandLauncher: Executing 'wget' with arguments:
    '--http-user=es-super1'
    '--http-passwd=es-super1'
    '--output-document=/dev/null'
    'http://xxxxxxxx:8080/jmx-console/HtmlAdaptor?action=invokeOp&name=jboss.web:j2eeType=WebModule,name=//localhost/apps,J2EEApplication=none,J2EEServer=none&methodIndex=2

    The ' characters around the executable and arguments are
    not part of the command.
         exec --14:41:54--  http://xxxx:8080/jmx-console/HtmlAdaptor?action=invokeOp&name=jboss.web:j2eeType=WebModule,name=//localhost/apps,J2EEApplication=none,J2EEServer=none&methodIndex=2

         exec            => `/dev/null'


         exec            => `/dev/null'
         exec Resolving xxxxx... xxx.xxx.xxx.xxx
         exec Connecting to xxxxx|xxx.xxx.xxx.xxx4|:8080... connected.
         exec HTTP request sent, awaiting response... 500 Internal Server Error
         exec 14:36:49 ERROR 500: Internal Server Error.
         exec
         exec Result: 1


    Anything wrong in there I am not seeing?
    I am using JBoss AS 4.2.0

    Thanks very much

    Ran

    Hi, try to change in the url with action=inspectMBean and rest as is.. it may help you..

    thanks!!
    satz