hammant 2002/11/05 23:54:26
Modified: sevak/src/demo/conf jetty-config.xml
sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty
JettySevak.java
Log:
Still can't get Jetty working
Revision Changes Path
1.3 +1 -1 jakarta-avalon-apps/sevak/src/demo/conf/jetty-config.xml
Index: jetty-config.xml
===================================================================
RCS file: /home/cvs/jakarta-avalon-apps/sevak/src/demo/conf/jetty-config.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- jetty-config.xml 30 Sep 2002 23:08:48 -0000 1.2
+++ jetty-config.xml 6 Nov 2002 07:54:26 -0000 1.3
@@ -11,7 +11,7 @@
<hostname>localhost</hostname>
</sevak>
<sevakTest>
- <Context docBase="ROOT" path="webapps/root"/>
+ <Context docBase="/" path="webapps/root"/>
</sevakTest>
</config>
1.5 +14 -6
jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak.java
Index: JettySevak.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-apps/sevak/src/java/org/apache/avalon/apps/sevak/blocks/jetty/JettySevak.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- JettySevak.java 1 Oct 2002 19:58:47 -0000 1.4
+++ JettySevak.java 6 Nov 2002 07:54:26 -0000 1.5
@@ -28,6 +28,7 @@
import org.mortbay.util.MultiException;
import org.mortbay.util.InetAddrPort;
import org.mortbay.util.Log;
+import org.mortbay.http.SocketListener;
/**
@@ -87,7 +88,13 @@
public void initialize() throws Exception
{
m_server = new Server();
- m_server.addListener(new InetAddrPort(m_hostName, m_port));
+ final int minThreads = 5;
+ final int maxThreads = 250;
+ SocketListener listener = new SocketListener();
+ listener.setPort(m_port);
+ listener.setMinThreads(minThreads);
+ listener.setMaxThreads(maxThreads);
+ m_server.addListener(listener);
PhoenixLogSink phoenixLogSink = new PhoenixLogSink();
phoenixLogSink.enableLogging(getLogger());
Log.instance().add(phoenixLogSink);
@@ -104,7 +111,7 @@
}
catch (MultiException e)
{
- throw new CascadingRuntimeException("Some problem starting Jetty",e);
+ throw new CascadingRuntimeException("Some problem starting Jetty", e);
}
}
@@ -119,7 +126,7 @@
}
catch (InterruptedException e)
{
- throw new CascadingRuntimeException("Some problem stopping Jetty",e);
+ throw new CascadingRuntimeException("Some problem stopping Jetty", e);
}
}
@@ -136,12 +143,13 @@
// This does not work.
WebApplicationContext ctx = m_server.addWebApplication(m_hostName,
context,
pathToWebAppFolder.getAbsolutePath());
- System.out.println("deploying " + context + " " +
pathToWebAppFolder.getAbsolutePath());
- m_webapps.put(context,ctx);
+ System.out.println("deploying " + context + " " +
pathToWebAppFolder.getAbsolutePath() + " to "
+ + m_hostName);
+ m_webapps.put(context, ctx);
}
catch (IOException ioe)
{
- throw new SevakException("Problem deploying web application in
Jetty",ioe);
+ throw new SevakException("Problem deploying web application in Jetty",
ioe);
}
}
--
To unsubscribe, e-mail: <mailto:avalon-cvs-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@;jakarta.apache.org>