Remote JBoss Deployments

I know that application servers such as Websphere and Weblogic have remote deployment capabilities that can be written using Ant or Jython tasks. Is there something equivalent for JBoss? Basically, if I have a server in some famous place, and I have the appropriate credentials, how can I deploy JBoss remotely?

+4
source share
3 answers

Deploying to a remote JBoss AS is not easy because JBoss AS does not provide significant assistance in this area. But here are some ideas / suggestions:

  • Use the JBoss JSR-88 implementation (which is trimmed in Java EE 6 and therefore will be removed in Java EE 7, but this gives you some time).
  • Use the base DeployManager , as suggested by @skaffman, and either upload the deployment to a remote server, or use the file:// protocol or install it on a web server and use http:// .
  • Use Cargo (but there is a limitation , the deployment must first be uploaded to the remote server).
  • Use the jboss-maven-plugin , which uses the JMX deployment interface and thus supports remote deployment (see MJBOSS-3 ), as we saw above.
  • Or simply download the deployable (FTP, SCP) to the remote computer and move them remotely to the deploy directory.
+5
source
Good question. You do not say which version of JBoss you are talking about (v4 and v5 are as different as chalk and cheese), so I will consider JBoss 4.x. There may be some similarities with JBoss 5, but I only know 4.

The JBoss deployment is URL-based and all crawling of deployed components is done using the URL. The deployer itself is represented by the MainDeployer JMX bean and is located in the JMX tree; it can be called remotely via HTTP or RMI. One deployment method is deploy(URL) . I used this only in the context of the URL file:// , but theoretically it should work for HTTP URLs as well. Thus, you can specify the URL of the EAR / WAR file on another server, and it should work by copying the EAR / WAR locally and unpacking it.

What I don’t think you can do is β€œupload” something directly to the server and make it deploy. I have never seen such functionality in JBoss (which does not mean that this does not exist, of course, only that I did not see it).

+2
source

Depending on the server setting (you say that you have credentials), you can always send the EAR / WAR file to the JBoss deployment directory. Keep in mind that one of the possible problems is that JBoss may start deploying the file before it finishes downloading, which will cause JBoss to complain about the corrupted EAR / WAR file.

0
source

Source: https://habr.com/ru/post/1302688/


All Articles