[
https://jira.jboss.org/jira/browse/EMBJOPR-28?page=com.atlassian.jira.plu...
]
Ian Springer commented on EMBJOPR-28:
-------------------------------------
Note, for war create, the attempt to delete the war in step 2 will fail due to the
jboss-web.xml file being locked if all of the following conditions are true:
a) the OS is Windows
b) the war is a directory (i.e. exploded)
c) the war contains a jboss-web.xml
d) the war's web.xml is not well-formed XML
This is caused by an AS bug (
https://jira.jboss.org/jira/browse/JBAS-6179).
if the call to redeploy() during an EAR/WAR update fails, the EAR/WAR
will not be discovered by the subsequent runtime scan, and the Resource will disappear
from inventory
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: EMBJOPR-28
URL:
https://jira.jboss.org/jira/browse/EMBJOPR-28
Project: Embedded Jopr
Issue Type: Bug
Components: Plugin
Affects Versions: 1.0
Reporter: Ian Springer
Assignee: Ian Springer
Fix For: 1.1
Original Estimate: 3 hours
Remaining Estimate: 3 hours
I think the most robust thing to do would be:
For create:
1) Write the file (or dir) and call deploy().
2) If deploy() fails, call undeploy() on the file (or dir) and then delete it from the
filesystem.
For update:
1) Backup the original war to filename.war.rej first thing using File.rename()
2) Then write the new file and call deploy().
3) If deploy() fails, rename the rej file back to the original name and then call
deploy() once again. This 2nd call to deploy() should always succeed, but if it fails,
inform the user that in addition to the update failing, rollback to the original war
failed.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira