User: jules_gosnell
Date: 02/01/13 13:30:13
Modified: jetty/src/main/org/jboss/jetty
JBossWebApplicationContext.java Jetty.java
Log:
a fixed watchdog ear will now deploy/undeploy happily and tests can be run:
[java] [gtest] *** 333 TEST(S) PASSED! ***
[java] [gtest] *** 9 TEST(S) FAILED! ***
Revision Changes Path
1.15 +3 -3
contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java
Index: JBossWebApplicationContext.java
===================================================================
RCS file:
/cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/JBossWebApplicationContext.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- JBossWebApplicationContext.java 2002/01/13 13:26:45 1.14
+++ JBossWebApplicationContext.java 2002/01/13 21:30:13 1.15
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: JBossWebApplicationContext.java,v 1.14 2002/01/13 13:26:45 jules_gosnell
Exp $
+// $Id: JBossWebApplicationContext.java,v 1.15 2002/01/13 21:30:13 jules_gosnell
Exp $
// A Jetty HttpServer with the interface expected by JBoss'
// J2EEDeployer...
@@ -123,8 +123,8 @@
}
else if ("distributable".equals(element))
{
- _distributed=true;
- getServletHandler().setSessionManager(new
DistributedHttpSessionManager(this));
+ _distributed=true;
+ getServletHandler().setSessionManager(new
DistributedHttpSessionManager(this));
}
// these are handled by Jetty
else
1.32 +25 -13 contrib/jetty/src/main/org/jboss/jetty/Jetty.java
Index: Jetty.java
===================================================================
RCS file: /cvsroot/jboss/contrib/jetty/src/main/org/jboss/jetty/Jetty.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- Jetty.java 2002/01/13 13:26:45 1.31
+++ Jetty.java 2002/01/13 21:30:13 1.32
@@ -5,7 +5,7 @@
* See terms of license at gnu.org.
*/
-// $Id: Jetty.java,v 1.31 2002/01/13 13:26:45 jules_gosnell Exp $
+// $Id: Jetty.java,v 1.32 2002/01/13 21:30:13 jules_gosnell Exp $
// A Jetty HttpServer with the interface expected by JBoss'
// J2EEDeployer...
@@ -26,6 +26,7 @@
import org.jboss.web.AbstractWebContainer.WebDescriptorParser;
import org.jboss.web.WebApplication;
import org.mortbay.jetty.servlet.WebApplicationContext;
+import org.mortbay.util.MultiException;
//------------------------------------------------------------------------------
@@ -34,7 +35,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Julian Gosnell</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Andreas Schaefer</a>.
- * @version $Revision: 1.31 $
+ * @version $Revision: 1.32 $
*
* <p><b>Revisions:</b>
*
@@ -50,9 +51,9 @@
public class Jetty
extends org.mortbay.jetty.Server
{
- static DocumentBuilderFactory _factory=DocumentBuilderFactory.newInstance();
+ static DocumentBuilderFactory _factory =DocumentBuilderFactory.newInstance();
DocumentBuilder _parser;
- Logger _log = Logger.getLogger(Jetty.class);
+ Logger _log = Logger.getLogger(Jetty.class);
Jetty()
{
@@ -198,7 +199,7 @@
// deploy the WebApp
WebApplicationContext app=
- new JBossWebApplicationContext(this, contextPath, descriptorParser, wa,
_parser);
+ new JBossWebApplicationContext(this, contextPath, descriptorParser, wa,
_parser);
String virtualHost=null;
addContext(virtualHost, app);
@@ -206,9 +207,20 @@
String fixedWarUrl=warUrl+(warUrl.endsWith("/")?"":"/");
app.initialize(fixedWarUrl, getWebDefault(), getUnpackWars());
- // finally start the app
- app.start();
-
+ try
+ {
+ // finally start the app
+ app.start();
+ }
+ catch (MultiException me)
+ {
+ _log.warn("problem deploying "+warUrl+" to "+contextPath);
+ for (int i=0; i<me.size(); i++)
+ {
+ Exception e=me.getException(i);
+ _log.warn(e, e);
+ }
+ }
// keep track of deployed contexts for undeployment
_deployed.put(warUrl, app);
@@ -283,9 +295,9 @@
// Get the separator of the JAR URL and the file reference
int index = url.indexOf( '!' );
if( index >= 0 ) {
- index = url.lastIndexOf( '/', index );
+ index = url.lastIndexOf( '/', index );
} else {
- index = url.lastIndexOf( '/' );
+ index = url.lastIndexOf( '/' );
}
// Now add a "./" before the JAR file to add a different path
if( index >= 0 ) {
@@ -294,9 +306,9 @@
"/." +
url.substring( index );
} else {
- // Now forward slash found then there is severe problem with
- // the URL but here we just ignore it
- return url;
+ // Now forward slash found then there is severe problem with
+ // the URL but here we just ignore it
+ return url;
}
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development