Version 4

    Running and debugging seam application in Eclipse

     

    Some notes about running and debugging seam application (any jBoss application) in Eclipse environment without tedious constant redeployment.

     

    • The main idea is to set output dir in eclipse as ( /bin/your_app.ejb3 )

     

    • Also I usually put my war dir in the same place  ( /bin/your_app.war ) Note that it is not files. It is directories. And endings (.ejb3 and .war) are important.

     

    • Organize eclipse project /src dir appropriate. Keep in mind that eclipse will copy your /src to /bin/your_app.ejb3 except .java. It will be replaced with .class.

     

    • Than change <jBoss_home>\server\default\conf\jboss-service.xml (Look at the end of the file) Add your /bin dir as it shown in the sample.

    <mbean code="org.jboss.deployment.scanner.URLDeploymentScanner" name="jboss.deployment:type=DeploymentScanner,flavor=URL">
    ...
          <attribute name="URLs">
             deploy/,
             file:/C:/EclipseWorkSpace/your_project/bin/
          </attribute>
    ...
    </mbean>
    

     

    • Create some simple ANT tasks to create exploded EAR, JAR, SAR, WAR and even re-deploy them. See details here.

     

    Then just start server. You can do it right from eclipse.

     

    -


    Note, now you can even change you code "hot". If it is not broken, your changes will start working immediately after saving.