-
1. Re: How to programatically deploy a PAR to a remote JBoss in
cpob Jun 21, 2006 12:32 PM (in response to nnelgp)If you check the JUnit tests, org/jbpm/jpdl/par/ProcessArchiveDeploymentDbTest.java has examples on how to build a simple .par, as well as deploy it.
The deploy:ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream("your/par/file/name/here")); ProcessDefinition processDefinition = ProcessDefinition.parseParZipInputStream(zipInputStream); jbpmContext.deployProcessDefinition(processDefinition);
You just need to worry about getting the PAR from machine A to machine B. You could do it as a HTML Multipart Post, or FTP, or however you want. Anyway to get the file physically to the other machine (with a known path) is the pain point of your issue. -
2. Re: How to programatically deploy a PAR to a remote JBoss in
nnelgp Jun 21, 2006 12:42 PM (in response to nnelgp)So there is not an MBean whose JMX interface includes methods for deploying a PAR. I was hoping I could create a remote JMX connection to the MBean and get it to machine B that way. Is there an MBean that can do this or would I have to write my own.
Thanks,
Glenn -
3. Re: How to programatically deploy a PAR to a remote JBoss in
cpob Jun 21, 2006 12:54 PM (in response to nnelgp)Unfortunately, no.
According to the FAQ in the Wiki:Does jBPM have JMX integration and if so, how does it look like?
In the starters-kit, jBPM comes deployed as an MBean. But for the moment, this mbean is only used to put the JbpmConfiguration? in JNDI. No properties or management operations are available yet on this MBean. -
4. Re: How to programatically deploy a PAR to a remote JBoss in
nnelgp Jun 21, 2006 1:09 PM (in response to nnelgp)My plan then is to write my own mbean that I can access remotely via JMX to deploy a PAR. Thanks for the info.
-
5. Re: How to programatically deploy a PAR to a remote JBoss in
koen.aers Jun 22, 2006 4:42 AM (in response to nnelgp)You can leverage the deployment servlet in the jBPM webapp if you like... But I agree that an MBean could be a better solution. Let us know if you are planning to contribute ;-)
Cheers,
Koen -
6. Re: How to programatically deploy a PAR to a remote JBoss in
lafbarbosa Mar 26, 2008 4:08 PM (in response to nnelgp)Hi guys,
I've been looking for a way to do the deployment of .esb archives into server/default/deploy directory of JBoss AS running JBossESB inside or JBossESB server, but I didn't find anything related.
Please, nnelgp, did you make your MBean?
I think it could be useful to deploy other kinds of archives into JBoss * servers.
If you made something, please, tell us.
Thanks in advance!
Regards,
Luiz| -
7. Re: How to programatically deploy a PAR to a remote JBoss in
aguizar Mar 29, 2008 9:44 PM (in response to nnelgp)Luiz,
Your use case is unrelated to jBPM itself. You should have posted to the ESB forum instead.
Anyway, the ESB registers its own deployer in JBoss AS to handle files with the .esb suffix. By doing so, it leverages the existing deployment infrastructure. You can call operations on the main deployer MBean (object name: jboss.system:service=MainDeployer) to deploy modules of any kind known to the deployer.
jBPM does not use the main deployer because the lifecycle of process definitions does not match that of modules.