4 Replies Latest reply on Feb 22, 2005 4:38 PM by Eric McIntyre

    Suppressing temp jar renaming (tmp99999*.jar)

    Eric McIntyre Newbie

      Hi,

      Is it possible to keep the deploy process from using "tmp" names when it copies jars to tmp/deploy/, maybe through a configuration somewhere?

      I ask because we are running JBoss (4.0.1) on an iSeries. Java on OS/400 has an amusing little quirk: when it loads a class from a jar that it hasn't seen before, it precompiles the jar into a pseudo-native program. Every time we start JBoss, it encounters these "new" jars and precompiles them, which slows down the startup significantly. If we could suppress the prefix on the temp jars, then startup would be much faster most of the time.

      Thanks,
      Eric

        • 1. Re: Suppressing temp jar renaming (tmp99999*.jar)
          Scott Stark Master

          Unpacked deployments are not copied. You can also set a jboss.deploy.localcopy=false system property to prevent the copying.

          • 2. Re: Suppressing temp jar renaming (tmp99999*.jar)
            Eric McIntyre Newbie

            Thanks for the reply, Scott. I have modified run.conf to include "-Djboss.deploy.localcopy=false" in the JAVA_OPTS variable. However, I'm still seeing temp files created under tmp/deploy/, along with the corresponding message "Attaching Java program to <jboss install>/server/default/tmp/deploy/tmp99999xxx.jar", which indicates that this is a new jar. I have also tried passing the -D param to run.sh on the command line and (grasping at straws) added it to properties-service.xml, all to no effect. If I missed something, could you please clarify? If this is a bug, I'll be happy to enter an issue into JIRA.

            Eric

            • 3. Re: Suppressing temp jar renaming (tmp99999*.jar)
              Scott Stark Master

              Ok, it appears that the system property is getting overriden by the xmbean configuration in 4.0.x, so you need to edit the conf/xmdesc/org.jboss.deployment.MainDeployer-xmbean.xml descriptor and set the CopyFiles value to false:

               <attribute access='read-write' setMethod='setCopyFiles' getMethod='getCopyFiles'>
               <description></description>
               <name>CopyFiles</name>
               <type>boolean</type>
               <descriptors>
               <value value="false"/>
               </descriptors>
               </attribute>
              


              After this, there will still be some rars that are getting copied when they should not, but its a fraction of what was copied before:
              [starksm@banshee9100 tmp]$ ls -R
              .:
              aopdynclasses/ deploy/
              
              ./aopdynclasses:
              
              ./deploy:
              deploy/
              
              ./deploy/deploy:
              jboss-local-jdbc.rar-contents/ jms/
              jboss-xa-jdbc.rar-contents/ mail-ra.rar-contents/
              
              ./deploy/deploy/jboss-local-jdbc.rar-contents:
              jboss-local-jdbc.jar*
              
              ./deploy/deploy/jboss-xa-jdbc.rar-contents:
              jboss-xa-jdbc.jar*
              
              ./deploy/deploy/jms:
              jms-ra.rar-contents/
              
              ./deploy/deploy/jms/jms-ra.rar-contents:
              jms-ra.jar*
              
              ./deploy/deploy/mail-ra.rar-contents:
              mail-ra.jar*
              


              I created a jira entry for the rar copying that is still ocurring:
              http://jira.jboss.com/jira/browse/JBAS-1496


              • 4. Re: Suppressing temp jar renaming (tmp99999*.jar)
                Eric McIntyre Newbie

                Great! That cut my startup time from 2:30 (best case) to 40 seconds. Thanks!