- looks like just copying this file to our ear package (or war) should stop any scanning (at least I rely on commented hint in that jboss-scanning.xml). After doing that booting time of my server even a bit increased. Well, it can be related to my PC, but if everything was done right, then this issue is really not related to scanning, as Jaikiran Pai mentioned.

On the other hand, to stop AS also takes time (about 1 minute now on my PC with my applications). It removes tmp folder content; when I do it with my hands (just removing that folder), it also takes about 1 minute. A lot of small class files, so it takes time to create/delete those files...

Did you try your application using JBoss 5.x? I migrated from JBoss 4.x so I didn't check, but jboss-scanning.xml firstly arrived there (as far as I know); it probably also means that if your JBoss 5.x boots with your application fine, then again, it is not scanning...

Anyway let us know about your results... This is truely weird issue...

On the other hand, to stop AS also takes time (about 1 minute now on my PC with my applications). It removes tmp folder content; when I do it with my hands (just removing that folder), it also takes about 1 minute. A lot of small class files, so it takes time to create/delete those files...

thank you very much for your response. No, I didn't try on JBoss 5.x. I tried to directly update from 4.2.2 to 6.0.0!

I did some further testing in the meantime. I think you are right. The slowness seems to be more related to the extracting of JAR files and the extreme number of files in tmp/ than to the annotation scanning.

I did the following experiment. I monitored the number of files in the server/default/tmp/ directory with a simple Linux command:

After starting JBoss without any of my applications deployed the number of files is 44. Then I hot-deployed my main EAR file. It consists of one HAR, one SAR, one EJB archive, one very small WAR and about 35 MB of JAR files in the lib/ directory of the EAR. This deployment is more or less fast (about 25 seconds). After the deployment the number of files in the tmp/ directory is 2368.

Then I deployed an additional WAR file with about 26MB of JAR files in WEB-INF/lib/. This deployments takes VERY long time (more than 2 minutes). While the deployment is in progress, the number of files in the tmp/ directory grows to 19.293 files!!!! This seems to slow down the complete system.

Shutting down JBoss also takes very long time. Just after "JMXConnector stopped" you can watch the number of files decreasing. This takes about 2 minutes. Just after the number reaches 0, the server shutdown finally stops.

After starting JBoss without any of my applications deployed the number of files is 44. Then I hot-deployed my main EAR file. It consists of one HAR, one SAR, one EJB archive, one very small WAR and about 35 MB of JAR files in the lib/ directory of the EAR. This deployment is more or less fast (about 25 seconds). After the deployment the number of files in the tmp/ directory is 2368.

Then I deployed an additional WAR file with about 26MB of JAR files in WEB-INF/lib/. This deployments takes VERY long time (more than 2 minutes). While the deployment is in progress, the number of files in the tmp/ directory grows to 19.293 files!!!! This seems to slow down the complete system.

This doesn't look good. Can you create a separate JBAS JIRA to track this ever growing tmp file size issue?

It is not, when I stop my JBoss, it completely cleans tmp folder. Fortunately I don't have such an issue posted in JIRA by that link. The only way when tmp folder is growing is when I terminate my JBoss (don't allowing it to stop its work and clean files it created at booting time).

thank you for job done, I see people related to JBoss AS updated jira, hope they would provide a fix

We also tried ramdisk, we use Windows XP while developing, and here we could copy whole JBoss AS to that ramdisk only (we don't know any way to map a folder to ramdisk there), this way it took some resources... Maybe there is another way, I didn't find any information, but is it possible to tell JBoss that my tmp folder is on another drive? E.g. My JBoss is located in folder H:/servers/JBoss-6.0.0.Final and project therefore is deployed in H:/servers/JBoss-6.0.0.Final/server/default/deploy folder; but using ramdisk (I tried Dataram RAMDisk) I want tmp folder to be there - I:/tmp

My test results so far: I repacked my ear the way when most libraries (jars) are in ear/lib folder, and only 11 are left in war/WEB-INF/lib; after deployment my tmp folder contains 3500 files and:

before (hd drive is using) - 1m 50s to boot JBoss; 26s to stop JBoss

after (ramdisk) - 1m 45s to boot JBoss; 7s to stop JBoss

well, good advantage at stopping. Some PCs are slower here, so they will feel ramdisk using; I remember test results done 2 weeks ago and it was 2m with JBoss AS booted from ramdisk against 4m to boot from harddisk), but they can not give so much RAM to work, it will be more helpful if I can create tmp folder out of JBoss folder (if it not possible, then we will buy extra RAM to work)