From 5ab35cc6080653a7e9b25712f637db6c95c183ce Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Wed, 5 Sep 2012 17:10:31 +0300 Subject: Combine ApplicationContext into Application (#9402) --- uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java') diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java index a9a988f296..34c1cc1fce 100644 --- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java +++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java @@ -34,6 +34,7 @@ import com.vaadin.LegacyApplication; import com.vaadin.server.AbstractUIProvider; import com.vaadin.server.ApplicationConfiguration; import com.vaadin.server.LegacyVaadinServlet; +import com.vaadin.server.ServletApplicationContext; import com.vaadin.server.UIProvider; import com.vaadin.server.WrappedHttpServletRequest; import com.vaadin.server.WrappedRequest; @@ -112,12 +113,12 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { } @Override - protected Application createApplication(HttpServletRequest request) - throws ServletException { + protected ServletApplicationContext createApplication( + HttpServletRequest request) throws ServletException { try { final Class classToRun = getClassToRun(); if (UI.class.isAssignableFrom(classToRun)) { - Application application = new Application(); + ServletApplicationContext application = new ServletApplicationContext(); application.addUIProvider(new AbstractUIProvider() { @Override @@ -130,7 +131,7 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet { } else if (LegacyApplication.class.isAssignableFrom(classToRun)) { return super.createApplication(request); } else if (UIProvider.class.isAssignableFrom(classToRun)) { - Application application = new Application(); + ServletApplicationContext application = new ServletApplicationContext(); application .addUIProvider((UIProvider) classToRun.newInstance()); return application; -- cgit v1.2.3