Hot Deploy Java code/ ATG components on JBoss

Pretty simple, on a production environment you start JBoss with its run file and a series of commands, which then picks up your EAR file from the deployment directory. Which is a fine process to go through, but what if you’re developing code and you don’t want to wait the several minutes for a build and deployment – on a windows system this can take well over 20 minutes to achieve if you’re running things locally.

We want to do hot deployment so that when you make small changes in your java class/ ATG component you don’t have to rebuild and restart JBoss each time and you save yourself a lot of time.

We can do this by starting JBoss in the following way:

To avoid building an EAR file each time rather than using JBoss’s run file (/JBoss/bin/run.bat or ATG provides a way to start JBoss and build the EAR on the fly from your working directory. This means that you can make changes to JSP’s etc… and see the changes instantly. To do this from your command prompt/shell go to your ATG home directory (/ATG/ATG22007.1/home/bin/) and in the bin run this file: StartDynamoOnJBoss.

In order for this to work and hot deployments to work we need to pass in a few parameters for this to work. Firstly the dynamo server to use – if you’re using one. Next set the name of the jBoss server using the -c flag. Then set the modules you want to load so your projects bin/ code source directory, ATG modules etc… and finally set the most important command -f -run-in-place which tells jBoss to compile and run the code from your projects directory rather than look for an EAR file in its deploy directory. So the start command looks like this:

startDynamoOnJBoss MY_DYNAMO_SERVER_NAME -c MY_JBOSS_SERVER_NAME -m MYPROJECT.core -f -run-in-place

And thats it. Now you can make changes to your files in Eclipse and you won’t need to restart jBoss. But there is one last thing – make sure to set your project in Eclipse to build automatically – you can set this under the project menu at the top.


  • Hi Larry,

    Thanks so much for sharing this information, I have tried it and it worked for jsp changes, not sure why its not working for java file changes.

    Things I have tried :
    * The project is by default putting the compiled classes in /classes directory but the changes are not picking up from there in hot deployment.

    * I have tried to change the build path from /classes to /j2ee-apps//module.war/WEB-INF/classes … but again it didn’t work.

    Any suggestions?


    Abdul Mohsin

    • Hi, first try enabling debug on your code and adding a couple of breaks to see if your file is being used etc…

  • what does ATG meant for??

    • ATG stands for Arts Technology Group and is a Java based e-commerce platform

  • Hi Larry,

    thanks for sharing this info. I am also getting this issue that JSPs are getting picked up but java files are not. I have used debugger also to verify that my updated file is being used.


  • unfortunately this does not work with jboss eap 5.1 and atg10!:(

  • Hi Larry,

    I was trying to start up the server as per below command
    startDynamoOnJBoss MY_DYNAMO_SERVER_NAME -c MY_JBOSS_SERVER_NAME -m MYPROJECT.core -f -run-in-place

    tried with:
    “startDynamoOnJBoss server -c default -m -f -run-in-plac”
    “startDynamoOnJBoss machineName:8080 -c default -m -f -run-in-plac”

    but i am getting below error msg, even though i tried with valid server name

    *** The server directory for server: dynamo does not exist.
    *** You must specify a valid server.

    Can you please guide me, how to get the Dynamo server name and how to use module names for -m , Thanks in advance

    • your commands are missing the e off of run-in-place

      The dynamo server name will come from your ATG server config/ properties which will be part of your build.

      It’ll also be part of your jboss server config as well

  • hi larry., i’m new to this atg tech. could you suggest me some sites for tutorial other than atg documentation please..

  • Could you be more descriptive? Is it necessary that project folder/workspace should be in ATG Home folder?

    For example if workspace is c:/code/projectabc , I use ant script to create .EAR which gets deployed into C:\ATG\jboss-eap-4.2\jboss-as\server\project\deploy\projectabc.ear

    I go to the location say c:/code/projectabc/modules and run the ant all command.

    In the above case how to incorporate the use of startDynamoOnJBoss what should be the command so that my projcet is passed to the server and EAR is created on the fly?

Join the Discussion

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>