0

In JBoss EAP 6.x, below are details of cli command and its response, to get the path of the deoployed archive file (picked from deployment-scanner subsystem)

cli -

/deployment=helloworld.war:read-attribute(name=content)

response -

{
"outcome" => "success",
"result" => [{
    "path" => "deployments\\cluster-demo.war",
    "relative-to" => "jboss.server.base.dir",
    "archive" => true
}]

}

As we can see above response is giving proper deployment path.

But when I run the same cli command in JBoss EAP 7.1, it is giving me below response ---

{
"outcome" => "success",
"result" => [{"hash" => bytes {
    0xe4, 0x51, 0x63, 0x04, 0x61, 0x2d, 0xd6, 0x29,
    0xac, 0xeb, 0xe1, 0x62, 0x85, 0x3e, 0x52, 0x78,
    0x50, 0x13, 0x82, 0x6e
}}]

}

With the above response, I need to prepare the deployment path by adding those bytes using java string builder. Also the path string prepared is different than the one we are receiving in JBoss EAP 6.x ( path of deployment folder, identified by deployment-scanner subsystem).

Below is the prepared path --

e4/516304612dd629acebe162853e52785013826e/content

Above path is relative to JBoss/standalone/data/content folder, so the whole path is --

<JBoss EAP installation directory>\standalone\data\content

here content is the deployed file. Please note that here the file is without extension, but I open the same in winrar I can see the content of actual archive file.

My concern is, is there any cli command available in JBoss EAP 7.x, through which I can get the same response, as I am getting in JBoss EAP 6.x.

Please help!!

Thanks Rahul

  • How do you deploy your application? – James R. Perkins Jul 05 '18 at 20:44
  • I am putting the archive file in /standalone/deployments folder. This directory is being scanned by JBoss' scanner-deployment subsystem, which automatically deployes all the war file if the enable flag is absent/true. – malviyarahuljayendra Jul 06 '18 at 05:42
  • What is it you need the path for? You may be interested in some of the new deployment operations http://wildfly.org/news/2017/09/08/Exploded-deployments/. – James R. Perkins Jul 06 '18 at 17:50
  • One of my project module needs to send the deployed war file to another application via http multipart request. For this, my module is asking the jboss eap server about the path of the deployed file, via cli command. Once the path received from cli response, it is preparing the java.io.File object from that path and then it is sending that file object via http multipart request. As JBoss 7.x cli response is not giving the actual path (from where it is taking the file), my generated File object is having different file name, which is causing issues, in further code flow (unable to verify file). – malviyarahuljayendra Jul 07 '18 at 11:13
  • Have a look at the `read-content` operation. There are some examples in that article. You could also use the management Java API to get the attachment and send it that way as well. – James R. Perkins Jul 09 '18 at 16:18
  • @JamesR.Perkins can you please point me to the link....I will go through it – malviyarahuljayendra Jul 10 '18 at 07:33
  • It's in the previously linked blog post http://wildfly.org/news/2017/09/08/Exploded-deployments/. – James R. Perkins Jul 10 '18 at 14:12

0 Answers0