Hello Everybody,
I am still working on content system BZs and came across something interesting and unique
to JBoss AS4 plugin. I had a lengthy talk with Ian and the conclusion was that it will
require a little bit of rework.
The AS4 plugin has a concept of backup/restore for applications. The backup is done when
creating a new application but only when the newly created application is to be deployed
on top of an existing application. The original application is kept in a folder/file with
.bak appended to its name. There is an option in the deploy wizard regarding backup
creation, the default value is no. Every application has an operation called
"revert". This works only if the .bak file is present on the disk. If the user
calls revert that operation is non-reversible, only one single revert is possible.
Now there are a couple of problems with this:
1) Content redeployments using the content tab do not create the .bak file. The revert
works only in the narrow case described above.2
2) Unless the user knows exactly what the backup setting does, it will probably go
unnoticed (and no backup is done).
2) Lets suppose the .bak was created. And lets suppose a user redeploys content (through
the content system) a couple of times and then calls revert. The app will be reverted to
the content prior to creating the new app. So the revert operation is very misleading.
It's not reverting to previous content but to content prior to resource creation.
3) It is not very clear to users when the revert operation is available.
4) This functionality can only be found in the AS4 plugin. No other plugin has a similar
concept implemented.
5) If the application is large, there is no way to delete the .bak file from RHQ. The only
workaround is to manually delete the file afterwards.
My proposal:
1) Remove this functionality completely. The revert concept should be implemented at
content system level.
2) Remove the revert operation from web applications.
2) Prevent deployments of applications on top of existing applications. If an app is
already deployed on disk at the same location then fail the operation to create a new
resource. This will eliminate the need to have a .bak file on disk.
Here are some reasons to support my proposal:
1) AS4 plugin functionality will be aligned with Tomcat and AS5.
2) No more confusing revert operations and use cases.
3) Simpler and easier to maintain plugin code.
4) Make a clear design choice that this functionality should be implemented at content
system level.
5) The code that does the actual deployments will be nearly identical between AS4, AS5 and
Tomcat and can be refactored to a common location.
Does my proposal make sense? Is there anything I am missing with regards to this confusing
functionality? Is there anybody actually using .bak files and revert?
Thank you,
Stefan Negrea
Software Engineer