First, which version of JBossAS are you using? I tried this on 4.2.3, and the deployment time changed, even when I passed a lower-case disk drive letter. Note, however, that my war file is in the deploy directory, not in an external location.
Second, after updating the war file, are you calling deploy() on MainDeployer again? As far as I know, the hot deployer will not automatically redeploy an app unless it is in the deploy directory.
See, didn't I say you had a better chance of getting a response in this forum? ;-)
thanks for reply, PeterJ.
I'm calling deploy() on MainDeployer...
But I did another tests, some changes, and "C" or "c" isn't changing nothing anymore... I don't know why getDeployment on MainDeployer is returning old deploymentInfo.
Look, I installed notificationListener on subDeployers of MainDeployer, and when deploy or undeploy occours, I can see de DeploymentInfo given by Notification, and I see the real deploymentInfo ('state' changes, 'lastDeployed' changes), but calling getDeployment I don't have the same object (and their fields aren't equals).
I did another test:
1- I called getDeployment and print the result
2- I called deploy()
3- NotificationListener sent me notifications and I print deploymentInfo given by these notifications (and I saw that the state changes, lastdeployed too, etc)
4- I called getDeployment again and print the result. The result is equals the first time I called getDeployment (step 1). same state, same lastDeployed, same object (memory address), and totally differently as deploymentInfo of notifications, that has the right information.
Try this. After step 1, use the JMX console or twiddle to get the deployment info. Do the same after step 4. Compare those values. If they are different, then your code is hanging on to the old values.
If that does not help, please post your code (or a simplified variation of your code) that exhibits the behavior. Remember to enclose your source code in 'code' tags (select the source code, click the Code button), and Preview your response to check the formatting before clicking Submit.
PeterJ, I don't know why sometimes if I use "C:\" I have some answer and "c:\" a different answer... but I saw that if I invoke "undeploy()" before "deploy()", the problem is solved.
Even if the application is already undeployed, I have to invoke undeploy(). So, I can get the right deploymentInfo when invoke getDeployment() after deploy().
I don't know why sometimes, when I change some characters to UpperCase or LowerCase, I don't have to do nothing special..
I'm curious, but at least the problem is solved!
Just a question: Some methods (like deploy() and undeploy()) can be invoked using "java.lang.String" as ParamType, or java.net.URL as ParamType. What is the different between call with "string", or with "new java.net.URL(string)" ?
There is no functional difference between the two deploy() methods. The one that takes a String converts the string to a URL and then calls the one that takes a URL.