deployment information

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

deployment information

Claudio Miranda
Hi, for any jar deployed, deployment shows


/deployment=mysql-connector-java-5.1.26-bin.jar:read-resource(include-runtime=true,include-aliases=true,include-defaults=true,recursive=true)
{
    "outcome" => "success",
    "result" => {
        "content" => [{"hash" => bytes {
            0x22, 0x53, 0xb6, 0xad, 0x12, 0x0d, 0x95, 0x46,
            0xe4, 0x84, 0xe3, 0x3b, 0x54, 0x66, 0xb4, 0xdd,
            0xa9, 0x02, 0xa8, 0xfd
        }}],
        "enabled" => true,
        "name" => "mysql-connector-java-5.1.26-bin.jar",
        "persistent" => true,
        "runtime-name" => "mysql-connector-java-5.1.26-bin.jar",
        "status" => "OK",
        "subdeployment" => undefined,
        "subsystem" => undefined
    }
}

I would like to add more information, the timestamp of deployment
(probably the timestamp of content file on the filesystem), size and
the hash as in data/content directory.

Tried to look into wildfly-core projects (host-controller,
deployment-scanner, deployment-repository, wildfly-controller), but
was unable to find the code that outputs the information to jboss-cli.

I know it uses the instruction below, to request deployment
information, but what is the project/class invoked for the
"deployment" command ?

final ModelNode op =
Util.getEmptyOperation(READ_CHILDREN_RESOURCES_OPERATION, new
ModelNode());
        op.get(CHILD_TYPE).set(DEPLOYMENT);
        ModelNode response;
        try {
            response = controllerClient.execute(op);


Kind regards
--
  Claudio Miranda

[hidden email]
http://www.claudius.com.br
_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev
Reply | Threaded
Open this post in threaded view
|

Re: deployment information

Emmanuel Hugonnet
Hi,
You would have to register new runtime attributes to the DeploymentResourceDefinition that would read the informations from the
ContentRepository / file depending on how the jar was deployed and if it is exploded or not.
Cheers,
Emmanuel


Le 31/07/2014 04:49, Claudio Miranda a écrit :

> Hi, for any jar deployed, deployment shows
>
>
> /deployment=mysql-connector-java-5.1.26-bin.jar:read-resource(include-runtime=true,include-aliases=true,include-defaults=true,recursive=true)
> {
>     "outcome" => "success",
>     "result" => {
>         "content" => [{"hash" => bytes {
>             0x22, 0x53, 0xb6, 0xad, 0x12, 0x0d, 0x95, 0x46,
>             0xe4, 0x84, 0xe3, 0x3b, 0x54, 0x66, 0xb4, 0xdd,
>             0xa9, 0x02, 0xa8, 0xfd
>         }}],
>         "enabled" => true,
>         "name" => "mysql-connector-java-5.1.26-bin.jar",
>         "persistent" => true,
>         "runtime-name" => "mysql-connector-java-5.1.26-bin.jar",
>         "status" => "OK",
>         "subdeployment" => undefined,
>         "subsystem" => undefined
>     }
> }
>
> I would like to add more information, the timestamp of deployment
> (probably the timestamp of content file on the filesystem), size and
> the hash as in data/content directory.
>
> Tried to look into wildfly-core projects (host-controller,
> deployment-scanner, deployment-repository, wildfly-controller), but
> was unable to find the code that outputs the information to jboss-cli.
>
> I know it uses the instruction below, to request deployment
> information, but what is the project/class invoked for the
> "deployment" command ?
>
> final ModelNode op =
> Util.getEmptyOperation(READ_CHILDREN_RESOURCES_OPERATION, new
> ModelNode());
>         op.get(CHILD_TYPE).set(DEPLOYMENT);
>         ModelNode response;
>         try {
>             response = controllerClient.execute(op);
>
>
> Kind regards
>

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev

signature.asc (550 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: deployment information

Claudio Miranda
Hi, a bit later, was working on other stuff.

I looked into ServerDeploymentResourceDefinition and
DeploymentResourceDefinition, but was not sure how to register those
additional attributes. I put breakpoints there and
DeploymentAttributes, but the command below doesn't step into the
class

/deployment=mysql-connector-java-5.1.26-bin.jar:read-resource(include-runtime=true,include-aliases=true,include-defaults=true,recursive=true)

Do you know which class I must look to implement the runtime attribute ?


On Thu, Jul 31, 2014 at 5:20 AM, Emmanuel Hugonnet <[hidden email]> wrote:

> Hi,
> You would have to register new runtime attributes to the DeploymentResourceDefinition that would read the informations from the
> ContentRepository / file depending on how the jar was deployed and if it is exploded or not.
> Cheers,
> Emmanuel
>
>
> Le 31/07/2014 04:49, Claudio Miranda a écrit :
>> Hi, for any jar deployed, deployment shows
>>
>>
>> /deployment=mysql-connector-java-5.1.26-bin.jar:read-resource(include-runtime=true,include-aliases=true,include-defaults=true,recursive=true)
>> {
>>     "outcome" => "success",
>>     "result" => {
>>         "content" => [{"hash" => bytes {
>>             0x22, 0x53, 0xb6, 0xad, 0x12, 0x0d, 0x95, 0x46,
>>             0xe4, 0x84, 0xe3, 0x3b, 0x54, 0x66, 0xb4, 0xdd,
>>             0xa9, 0x02, 0xa8, 0xfd
>>         }}],
>>         "enabled" => true,
>>         "name" => "mysql-connector-java-5.1.26-bin.jar",
>>         "persistent" => true,
>>         "runtime-name" => "mysql-connector-java-5.1.26-bin.jar",
>>         "status" => "OK",
>>         "subdeployment" => undefined,
>>         "subsystem" => undefined
>>     }
>> }
>>
>> I would like to add more information, the timestamp of deployment
>> (probably the timestamp of content file on the filesystem), size and
>> the hash as in data/content directory.
>>
>> Tried to look into wildfly-core projects (host-controller,
>> deployment-scanner, deployment-repository, wildfly-controller), but
>> was unable to find the code that outputs the information to jboss-cli.
>>
>> I know it uses the instruction below, to request deployment
>> information, but what is the project/class invoked for the
>> "deployment" command ?
>>
>> final ModelNode op =
>> Util.getEmptyOperation(READ_CHILDREN_RESOURCES_OPERATION, new
>> ModelNode());
>>         op.get(CHILD_TYPE).set(DEPLOYMENT);
>>         ModelNode response;
>>         try {
>>             response = controllerClient.execute(op);
>>
>>
>> Kind regards
>>
>



--
  Claudio Miranda

[hidden email]
http://www.claudius.com.br

_______________________________________________
wildfly-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/wildfly-dev