[wildfly-dev] Confusion around deployment runtime-name

Bartosz Baranowski bbaranow at redhat.com
Thu Jun 13 10:12:56 EDT 2013


Hi guys.

Im trying to fix one of EAPs BZ and this led me into deep state of confusion.
Said BZ: https://bugzilla.redhat.com/show_bug.cgi?id=964446


Ive looked into CLI and this is what it offers:


[standalone at localhost:9990 /] deploy --help
SYNOPSIS

    deploy ((file_path | --url=deployment_url)
               [--script=script_name] [--name=deployment_name]
               [--runtime-name=deployment_runtime_name]
              ...


 file_path         - filesystem path to the application to deploy.
                     If the deployment has to be added or replaced in the
                     repository, either the file_path or the --url argument
                     is required.
                     The path can be either absolute or relative to the current
                     directory.

 --url             - ...

 --name            - the unique name of the deployment. If the file path
                     argument is specified the name argument is optional with
                     the file name been the default value. If the file path
                     argument isn't specified then the command is supposed to
                     enable an already existing but disabled deployment, and in
                     this case the name argument is required.

 --runtime-name    - optional, the runtime name for the deployment.



A bit vague description of --runtime-name. --name gives a bit more info - it tells me that ${name} will be part of PathAddress in AS7 model.
I kept digging and found this bit in DMR file:

Name by which the deployment should be known within a server's runtime. This would be equivalent to the file name of a deployment file, and would form the basis for such things as default Java Enterprise Edition application and module names. This would typically be the same as 'name', but in some cases users may wish to have two deployments with the same 'runtime-name' (e.g. two versions of \"foo.war\") both available in the deployment content repository, in which case the deployments would need to have distinct 'name' values but would have the same 'runtime-name'."


Ok now to the point: 
1. ${runtime-name} is used as 'root' of deployment. It becomes a part of service name in jboss MSC. However model name contains ${name}/archive name as root of PathAddress.

Is this correct? I've been told that this is wrong and the ${runtime-name} should be also part of PathAddress.
#1 is essentially a root of BZ. Operation seek service which contain ${name} as part of service name, while MSC has service which has the ${runtime-name}:
lookup value:        jboss.deployment.subunit."jboss-as-ejb-in-ear-ear.ear"."jboss-as-ejb-in-ear-ejb.jar".component.GreeterEJB.START
actual msc service:  jboss.deployment.subunit."nnn.ear"."jboss-as-ejb-in-ear-ejb.jar".component.GreeterEJB.START


2. From above description of runtime-name it seems I should be able to execute:
deploy --runtime-name=nnn.ear /x/archive-1.0.ear
deploy --runtime-name=nnn.ear /x/archive-1.1.ear

In fact I'm able to do that, but I've been told that this is wrong. Which is it?







More information about the wildfly-dev mailing list