From what i remember, the MainDeployer deploys the application in
%JBOSS_HOME%/server/< serverName>/tmp folder. This tmp folder gets cleaned up on
restarts.
The last time, when i was playing around with a similar requirement on a sample
application, i had deployed my own service using a *-service.xml (which extends
MainDeployer) and overriden the deploy method as follows:
|
| public class ExtendedMainDeployer extends MainDeployer {
|
| /**
| * Logger
| */
| protected Logger log = Logger.getLogger(this.getClass().getName());
|
| /**
| *
| */
| public void deploy(URL url) throws DeploymentException {
| String serverDeployFolderPath =
System.getProperty("jboss.server.home.dir") + "/deploy/";
| File file = new File(url.getFile());
|
|
| //just copy it to server deploy folder and let the deployer pick it up
| try {
| log.info("Copying " + file.getName() + " to " +
serverDeployFolderPath + file.getName());
| copy(url,new File(serverDeployFolderPath + file.getName()));
| } catch (IOException ioe) {
| log.error("Could not copy " + url.getFile() + " to " +
serverDeployFolderPath, ioe);
| throw new DeploymentException(ioe);
| }
| }
|
| }
All this piece of code does is it copies the application to the "deploy" folder
of JBoss so that the server picks it up for deployment. This way, you dont have to worry
about restarts. I am not sure whether this is an option for you, though.
Maybe someone has better ideas?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4140577#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...