0 Replies Latest reply on Mar 10, 2006 1:18 PM by x x

    Hot deployment

    x x Newbie

      I deploy my web application into the JBoss server from the JBOSS Eclipse IDE. After the deployment are the new files on the server copied, but if I request some servlet from this aplication, the old classes are invoked. Only after restart the JBoss server the actual classes are loaded.

      How can I solve this problem so that JBoss automatically detects the changes and reloads the classes?

      appropriated section in the jboss-service:

       <!-- An mbean for hot deployment/undeployment of archives.
       <mbean code="org.jboss.deployment.scanner.URLDeploymentScanner"
       <!-- Uncomment (and comment/remove version below) to enable usage of the
       <depends optional-attribute-name="Deployer">jboss.deployment:type=DeploymentCache</depends>
       <depends optional-attribute-name="Deployer">jboss.system:service=MainDeployer</depends>
       <!-- The URLComparator can be used to specify a deployment ordering
       for deployments found in a scanned directory. The class specified
       must be an implementation of java.util.Comparator, it must be able
       to compare two URL objects, and it must have a no-arg constructor.
       Two deployment comparators are shipped with JBoss:
       - org.jboss.deployment.DeploymentSorter
       Sorts by file extension, as follows:
       "sar", "service.xml", "rar", "jar", "war", "wsr", "ear", "zip",
       <attribute name="URLComparator">org.jboss.deployment.DeploymentSorter</attribute>
       <attribute name="URLComparator">org.jboss.deployment.scanner.PrefixDeploymentSorter</attribute>
       <!-- The FilterInstance specifies a URLLister.URLFilter for scanned
       directories. This DeploymentFilter is initialized with the given
       prefixes, suffixes and matches that define which URLs should be
       <attribute name="FilterInstance"
       <!-- Files starting with theses strings are ignored -->
       <property name="prefixes">#,%,\,,.,_$</property>
       <!-- Files ending with theses strings are ignored -->
       <property name="suffixes">#,$,%,~,\,v,.BAK,.bak,.old,.orig,.tmp,.rej,.sh</property>
       <!-- Files matching with theses strings are ignored -->
       <property name="matches">.make.state,.nse_depinfo,CVS,CVS.admin,RCS,RCSLOG,SCCS,TAGS,core,tags</property>
       <!-- Frequency in milliseconds to rescan the URLs for changes -->
       <attribute name="ScanPeriod">5000</attribute>
       <!-- A flag to disable the scans -->
       <attribute name="ScanEnabled">true</attribute>
       <attribute name="URLs">
       <attribute name="RecursiveSearch">True</attribute>

      Thanks for answers.