You could use the 'deploy' operation on the jboss.system:service=MainDeployer MBean. The only gotcha with that is that the file name and path you give to the deploy method must be accessible from the server (in other words, this method does not copy the file from the client to the server).
If you want to be able to remotely deploy applications, you will need to write code. A servlet that uses the html file upload mechanism should do it.
so, it's not possible to do it completely remotely uploading the war/ear/jar from the jmx or web-console?
No. Though JBossON does have that capability. Of course, you need to get a support contract to use JBossON.
I've being asking this in the thread http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4139741#4139741, but I didn't could find an example in the Internet.
So, what I need is, put a Servlet, with another auxiliar classes, into a .war archive in JBoss AS. So, I'll put a JSP that acess remotely it from my web application.
In this way, I don't need use JBossON,right? So, I think that I should ask for a deployer using something like that: jboss.system:service=MainDeployer, right?
Ok, it seems to be the way to do that. But, how could I do that? Please, does anybody have an example to share with me? ...because I've being looking for it and didn't find anyone yet.
Thanks in advance, guys!
My first response (dated Jan 8) already answers your question. (or are you actually asking that someone post working code, and not just tell you which MBean and operation to use?)
And a warning - if you deploy an application this way you will need to redeploy it every time you restart the app server.