user2123794
user2123794

Reputation: 3

Hot deployment on seam fails

Reading http://docs.jboss.org/seam/snapshot/en-US/html/gettingstarted.html I get to know that there's something called hot deployment meaning that if you change code in a view (xhtml) the server won't restart. Nevertheless, every time I change some code either in a view or a java class, the server rebuilds/redeploys.

There are two types of server connectors in Eclipse: JBoss AS and JBoss Community. Testing with each of them makes no difference.

I'm using JBoss 4.2.3, Seam 2.0 and Eclipse as my IDE. My OS is Mac OS X 10.7.5

Any help would be great. Should I have to config something else?

Upvotes: 0

Views: 336

Answers (2)

tahagh
tahagh

Reputation: 807

I've used seam hot deploy a lot and it works perfectly. Please first check these in your environment (this checklist is for web projects not ear projects):

  1. The publishing mode in your server setting is "Automatically publish when resource change".
  2. Your archive is not deployed as a compressed archive, i.e. a .war file. (check your deploy folder to be sure of it).
  3. Seam hot deploy only loads changed classes from this directory (your archive path)/WEB-INF/dev. So check that your classes actually deployed in that directory, if it is not the case, go to your "Project Properties/Java Build Path/Source" and change the output folder to correct location.
  4. For xhtml files to be reloaded, make sure either you don't have these settings in your web.xml file (since their default values allow for reloading) or set their values into a different values than these. Since you are using seam 2, I assume JSF 1.2:

    <context-param>
        <param-name>facelets.REFRESH_PERIOD</param-name>
        <param-value>-1</param-value>
    </context-param>
    
    <context-param>
      <param-name>facelets.DEVELOPMENT</param-name>
      <param-value>false</param-value>
     </context-param>
    

    Also you should add seam filter to your web.xml file.

  5. Put seam in the debug mode which can be set in your components.xml file. Also you should have seam-debug.jar file in your classpath.

Upvotes: 0

Trind
Trind

Reputation: 1599

Open the server tab and remove automaticly redeploy.

If you want good hotswap use jRebel instead.

http://zeroturnaround.com/software/jrebel/

Upvotes: 1

Related Questions