[jboss-user] [Management, JMX/JBoss] - Re: Managing JBoss programmatically?

PeterJ do-not-reply at jboss.com
Wed Aug 15 18:37:06 EDT 2007


Why not use the stream classes to do the copying?

Or you could use File.rename() to move the JAR for the deploy directory.

Also, if you are going to do a copy, it is usually best to copy the file to a temporary location on the same disk partition as the deploy directory, and then move that file to the deploy directory. This prevents weird zip file error that can occur if the hot deploy tries to deploy the JAR before the copy is finished. 

And just to answer your question, to run an external program use Process.exec(), though within an EJB you should not wait for the process to exit before continuing.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4074603#4074603

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4074603



More information about the jboss-user mailing list