jetty-9 fixed jetty-spring
This commit is contained in:
parent
2dfcebfc04
commit
358e5b5bfd
|
@ -8,7 +8,7 @@
|
|||
<!-- -->
|
||||
<!-- This file may be run with: -->
|
||||
<!-- java -jar start.jar OPTIONS=Server,spring \ -->
|
||||
<!-- start.class=org.mortbay.jetty.spring.Main \ -->
|
||||
<!-- start.class=org.eclipse.jetty.spring.Main \ -->
|
||||
<!-- etc/jetty-spring.xml -->
|
||||
<!-- -->
|
||||
<!-- The spring and commons-logging jars may need to be added -->
|
||||
|
|
|
@ -19,8 +19,12 @@
|
|||
|
||||
package org.eclipse.jetty.spring;
|
||||
|
||||
import java.net.InetSocketAddress;
|
||||
import java.util.Collection;
|
||||
|
||||
import org.eclipse.jetty.util.component.Container;
|
||||
import org.eclipse.jetty.util.thread.ThreadPool;
|
||||
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/**
|
||||
|
@ -30,10 +34,34 @@ import java.util.Collection;
|
|||
*/
|
||||
public class Server extends org.eclipse.jetty.server.Server
|
||||
{
|
||||
public Server()
|
||||
{
|
||||
super();
|
||||
}
|
||||
|
||||
public Server(InetSocketAddress addr)
|
||||
{
|
||||
super(addr);
|
||||
}
|
||||
|
||||
public Server(int port)
|
||||
{
|
||||
super(port);
|
||||
}
|
||||
|
||||
public Server(ThreadPool pool, Container container)
|
||||
{
|
||||
super(pool,container);
|
||||
}
|
||||
|
||||
public Server(ThreadPool pool)
|
||||
{
|
||||
super(pool);
|
||||
}
|
||||
|
||||
public void setBeans(Collection<Object> beans)
|
||||
{
|
||||
for (Object o:beans)
|
||||
addBean(o);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@ import static junit.framework.Assert.assertEquals;
|
|||
|
||||
public class SpringXmlConfigurationTest
|
||||
{
|
||||
protected String _configure="org/mortbay/jetty/spring/configure.xml";
|
||||
protected String _configure="org/eclipse/jetty/spring/configure.xml";
|
||||
|
||||
@Before
|
||||
public void init() throws Exception
|
||||
|
@ -128,7 +128,7 @@ public class SpringXmlConfigurationTest
|
|||
@Test
|
||||
public void testJettyXml() throws Exception
|
||||
{
|
||||
URL url = SpringXmlConfigurationTest.class.getClassLoader().getResource("org/mortbay/jetty/spring/jetty.xml");
|
||||
URL url = SpringXmlConfigurationTest.class.getClassLoader().getResource("org/eclipse/jetty/spring/jetty.xml");
|
||||
XmlConfiguration configuration = new XmlConfiguration(url);
|
||||
|
||||
Server server = (Server)configuration.configure();
|
||||
|
@ -140,7 +140,7 @@ public class SpringXmlConfigurationTest
|
|||
@Test
|
||||
public void XmlConfigurationMain() throws Exception
|
||||
{
|
||||
XmlConfiguration.main(new String[]{"src/test/resources/org/mortbay/jetty/spring/jetty.xml"});
|
||||
XmlConfiguration.main(new String[]{"src/test/resources/org/eclipse/jetty/spring/jetty.xml"});
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,20 +12,20 @@
|
|||
<property name="arguments"><list><value>test</value></list></property>
|
||||
</bean>
|
||||
|
||||
<bean id="root" name="Some,Names,Main" class="org.mortbay.jetty.spring.TestConfiguration">
|
||||
<bean id="root" name="Some,Names,Main" class="org.eclipse.jetty.spring.TestConfiguration">
|
||||
<property name="testString1"><value>SetValue</value></property>
|
||||
<property name="testInt1"><value>1</value></property>
|
||||
<property name="nested" ref="nested"/>
|
||||
<property name="testString2" ref="testProperty"/>
|
||||
</bean>
|
||||
|
||||
<bean id="nested" class="org.mortbay.jetty.spring.TestConfiguration">
|
||||
<bean id="nested" class="org.eclipse.jetty.spring.TestConfiguration">
|
||||
<property name="testInt2"><value>2</value></property>
|
||||
<property name="testString1"><value>nested</value></property>
|
||||
<property name="nested" ref="nestedDeep"/>
|
||||
</bean>
|
||||
|
||||
<bean id="nestedDeep" class="org.mortbay.jetty.spring.TestConfiguration">
|
||||
<bean id="nestedDeep" class="org.eclipse.jetty.spring.TestConfiguration">
|
||||
<property name="testString1"><value>deep</value></property>
|
||||
<property name="testInt2"><value>2</value></property>
|
||||
</bean>
|
|
@ -2,12 +2,12 @@
|
|||
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
|
||||
|
||||
<beans>
|
||||
<bean id="Server" name="Main" class="org.mortbay.jetty.spring.Server">
|
||||
<bean id="Server" name="Main" class="org.eclipse.jetty.spring.Server">
|
||||
|
||||
<!--
|
||||
<property name="beans">
|
||||
<list>
|
||||
<bean id="ContextDeployer" class="org.mortbay.jetty.spring.ContextDeployer">
|
||||
<bean id="ContextDeployer" class="org.eclipse.jetty.spring.ContextDeployer">
|
||||
<property name="contexts" ref="contexts"/>
|
||||
<property name="contextsDir" value="contexts"/>
|
||||
<property name="scanInterval" value="5"/>
|
|
@ -3,22 +3,24 @@
|
|||
|
||||
<beans>
|
||||
<bean id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
|
||||
<bean id="Server" name="Main" class="org.mortbay.jetty.spring.Server">
|
||||
|
||||
<property name="threadPool">
|
||||
<bean id="Server" name="Main" class="org.eclipse.jetty.spring.Server">
|
||||
<constructor-arg type="org.eclipse.jetty.util.thread.ThreadPool">
|
||||
<bean id="ThreadPool" class="org.eclipse.jetty.util.thread.QueuedThreadPool">
|
||||
<property name="minThreads" value="10"/>
|
||||
<property name="maxThreads" value="200"/>
|
||||
</bean>
|
||||
</property>
|
||||
|
||||
</constructor-arg>
|
||||
|
||||
<!--
|
||||
<property name="connectors">
|
||||
<list>
|
||||
<bean id="Connector" class="org.eclipse.jetty.server.nio.SelectChannelConnector">
|
||||
<bean id="Connector" class="org.eclipse.jetty.server.SelectChannelConnector">
|
||||
<constructor-arg type="org.eclipse.jetty.spring.Server"><ref bean="Server"/></constructor-arg>
|
||||
<property name="port" value="0"/>
|
||||
</bean>
|
||||
</list>
|
||||
</property>
|
||||
-->
|
||||
|
||||
<property name="handler">
|
||||
<bean id="handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
|
Loading…
Reference in New Issue