Deploying Java class files without restarting JBoss

I would like to know if it is possible to deploy java class files without restarting the JBoss server. I am using jboss v4.2.2.

Also, when I try to deploy jsp files, it works fine and the server accepts the changes almost instantly.

Thank you very much in advance:)

+5
source share
4 answers

I am better off with Tomcat than JBoss, but it should be possible (as in Tomcat) to restart the application without restarting the application server. If the server has a "development mode" and it is active, then it should be possible to restart the application simply by touching WEB-INF/web.xml, that is, update its timestamp. This should result in the loading of a previously downloaded class file.

+2
source

Theoretically, you will never have to restart the entire server, you only restart specific applications (earphones). JBoss (with default settings) will automatically reinstall your ear if it notices any changes in it. Just copy the new version on top of it.

, JBoss Tools eclipse, : http://www.jboss.org/tools

0

, .

, , ( eclipse "WebContent" ) , Jboss.

.

0

( project.war), web.xml:

<web-app>
    <context-param>
        <param-name>org.jboss.weld.development</param-name>
        <param-value>true</param-value>
    </context-param>

web.xml , :

set PRJ_HOME=C:\Temp2\MyProject\src\main\webapp
set PRJ_CLSS_HOME=%PRJ_HOME%\WEB-INF\classes\com\myProject

set JBOSS_HOME= C:\Java\jboss-4.2.3.GA-jdk6\server\default\deploy\MyProject.war
set JBOSS_CLSS_HOME= %JBOSS_HOME%\WEB-INF\classes\com\myProject

copy %PRJ_CLSS_HOME%\frontend\actions\profile\ProfileAction.class %JBOSS_CLSS_HOME%\frontend\actions\profile\ProfileAction.class
copy %PRJ_CLSS_HOME%\frontend\actions\profile\AjaxAction.class %JBOSS_CLSS_HOME%\frontend\actions\profile\AjaxAction.class

ECHO.>>%JBOSS_HOME%\WEB-INF\web.xml
0

All Articles