User: d_jencks Date: 02/02/25 16:22:55 Modified: src/main/org/jboss/deployment DeploymentInfo.java MainDeployer.java Log: changed to copy into unique jars. IMPORTANT NOTE: delete everything in JBOSS_HOME/tmp/deploy or you will have conflicts with the previous copying scheme Revision Changes Path 1.2 +10 -7 jboss-system/src/main/org/jboss/deployment/DeploymentInfo.java Index: DeploymentInfo.java =================================================================== RCS file: /cvsroot/jboss/jboss-system/src/main/org/jboss/deployment/DeploymentInfo.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DeploymentInfo.java 24 Feb 2002 10:24:33 -0000 1.1 +++ DeploymentInfo.java 26 Feb 2002 00:22:55 -0000 1.2 @@ -53,7 +53,7 @@ * @author <a href="mailto:[EMAIL PROTECTED]">Daniel Schulze</a> * @author <a href="mailto:[EMAIL PROTECTED]">Christoph G. Jung</a> * @author <a href="mailto:[EMAIL PROTECTED]">Scott Stark</a> - * @version $Revision: 1.1 $ <p> + * @version $Revision: 1.2 $ <p> * * <b>20011211 marc fleury:</b> * <ul> @@ -168,12 +168,7 @@ if (parent != null) parent.subDeployments.add(this); // The "short name" for the deployment http://myserver/mybean.ear should yield "mybean.ear" - shortName = url.getFile(); - - if (shortName.endsWith("/")) shortName = shortName.substring(0, shortName.length() - 1); - - shortName = shortName.substring(shortName.lastIndexOf("/") + 1); - + shortName = getShortName(url.getFile()); // Do we have an XML descriptor only deployment? isXML = shortName.toLowerCase().endsWith("xml"); @@ -280,5 +275,13 @@ public String toString() { return super.toString() + "{ url=" + url + " }"; + } + + public static String getShortName(String name) + { + if (name.endsWith("/")) name = name.substring(0, name.length() - 1); + + name = name.substring(name.lastIndexOf("/") + 1); + return name; } } 1.7 +23 -1 jboss-system/src/main/org/jboss/deployment/MainDeployer.java Index: MainDeployer.java =================================================================== RCS file: /cvsroot/jboss/jboss-system/src/main/org/jboss/deployment/MainDeployer.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- MainDeployer.java 25 Feb 2002 13:52:31 -0000 1.6 +++ MainDeployer.java 26 Feb 2002 00:22:55 -0000 1.7 @@ -47,7 +47,7 @@ * * @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a> * @author <a href="mailto:[EMAIL PROTECTED]">Scott Stark</a> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ */ public class MainDeployer extends ServiceMBeanSupport @@ -252,6 +252,24 @@ // Stop auto deploy thread running = false; } + + protected void destroyService() + { + //undeploy everything in sight + + for (Iterator i = listDeployed().iterator(); i.hasNext(); ) + { + try + { + removeDeployment((DeploymentInfo)i.next()).cleanup(log); + } + catch (Exception e) + { + log.info("exception trying to undeploy during shutdown: ", e); + } // end of try-catch + + } // end of for () + } public boolean getScan() { @@ -1067,6 +1085,8 @@ path.deleteCharAt(i); } // end of if () } // end of for () + String shortName = DeploymentInfo.getShortName(path.toString()); + path.append("/").append(getNextID()).append(".").append(shortName); sdi.localUrl = new File(tempDir, path.toString()).toURL(); copy(sdi.url, sdi.localUrl); } @@ -1074,6 +1094,8 @@ catch (Exception e) { log.error("Could not make local copy for "+sdi.url.toString(), e); + log.error("if you have just upgraded jboss versions, please delete"); + log.error(" everything in the $JBOSS_HOME/tmp/deploy and try again"); } }
_______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development