Reputation: 1477
I know the app servers like Websphere and Weblogic have remote deployment capabilities that can be scripted with either Ant tasks or Jython. Is there something equivalent for JBoss? Basically, if I have a server at some known location and I have appropriate credentials, how do I deploy to JBoss remotely?
Upvotes: 4
Views: 8722
Reputation: 570345
Deploying to a remote JBoss AS is not easy because JBoss AS doesn't provide much help in that area. But here are some ideas/suggestions:
file://
protocol or put it on a web server and use http://
.deploy
directory.Upvotes: 5
Reputation: 35018
Depending on the server setup (you say you've got credentials), you could always sftp your EAR/WAR file to the deploy directory of JBoss. Mind you, one potential problem with this is that JBoss might actually start deploying the file before it has completed uploading which will result in a JBoss complaining about a corrupt EAR/WAR file.
Upvotes: 0
Reputation: 403481
Good question. You don't say which version of JBoss you're talking about (v4 and v5 are as different as chalk and cheese), so I'll assume JBoss 4.x. There may be some similarity with JBoss 5, but I'm only familiar with 4.
JBoss's deployer is based around the URL, and all scanning of deployable components is done by URL. The deployer itself is represented by the MainDeployer
JMX bean, and being on the JMX tree, it can be invoked remotely via HTTP or RMI. One of the methods on the deployer is deploy(URL)
. I've only ever used this in the context of file://
URLs, but in theory it should work for HTTP URLs also. So you could give it the URL of a EAR/WAR file on another server, and it should work, copying the EAR/WAR locally and unpacking it.
What I don't think you can do is "upload" something directly to the server and get it to deploy it. I've never seen such functionality in JBoss (which isn't to say that it doesn't exist, of course, just that I haven't seen such a thing).
Upvotes: 2