[
https://issues.jboss.org/browse/AS7-845?page=com.atlassian.jira.plugin.sy...
]
Brian Stansberry updated AS7-845:
---------------------------------
Summary: Incorrect handing of name and runtime-name in deployers (was: Problems
with WARs that change name and/or runtime name)
Assignee: (was: Remy Maucherat)
Priority: Blocker (was: Major)
Component/s: Domain Management
(was: Web)
I changed the name of this issue and the affected component. This is a general problem not
specific to the web subsystem. When RootDeploymentUnitService creates a
DeploymentUnitImpl, it uses the value of the last element of the deployment resource's
address as the name (e.g. /deployment=foo.war results in deploymentUnit.getName()
returning "foo.war"). It attaches the value of the resource's runtime-name
attribute to the DU under key org.jboss.as.server.deployment.Attachments.RUNTIME_NAME but
most DUPs are not looking for that; they are doing the natural thing and calling
deploymentUnit.getName().
The problem with this is the value of the last element of the deployment resource's
address can be anything at all, e.g. /deployment=foo.war.v1 or /deployment=brian. This
value should not be used as the default value for the EE application/module name. The
runtime-name should be used.
We need to see if there is any reason for the value of the last element of the deployment
resource's address to be visible to DUPs at all. The original design intent was that
it would not be.
Incorrect handing of name and runtime-name in deployers
-------------------------------------------------------
Key: AS7-845
URL:
https://issues.jboss.org/browse/AS7-845
Project: Application Server 7
Issue Type: Bug
Components: Domain Management
Affects Versions: 7.0.0.CR1
Reporter: Stan Silvert
Priority: Blocker
Various problems happen at deploy time if you deploy a file and change the name or
runtime-name arguments. (Note: in the CLI, the argument to change the runtime-name is
"runtime-name" rather than "runtime_name" as described in the help.
See AS7-785)
If I deploy foo.war and I only change the runtime-name=bar.war, it will deploy normally,
but the context will be set to /foo instead of /bar.
If I deploy stuff.war and change both names with name=hello and runtime-name=hello.war,
the context is set to /h and I will get a 404 when I try to hit my page:
[standalone@localhost:9999 /] deploy /projects/foo.war/stuff.war --name=hello
--runtime-name=hello.war
'hello' deployed successfully.
16:46:15,916 INFO [org.jboss.as.server.deployment] (ManagementCommunication-threads -
10) Content added at location C:\as7trunk\jboss-as\build\target\jboss-7.0.0.Beta4-S
NAPSHOT\standalone\data\content\91\b040bbc10337f5150474ee417f8aaeb005896d\content
16:46:26,096 INFO [org.jboss.as.server.deployment] (MSC service thread 1-6) Starting
deployment of "hello"
16:46:26,133 INFO [org.jboss.web] (MSC service thread 1-5) registering web context: /h
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira