import java.util.Properties;\r
import java.util.Random;\r
\r
-import javax.servlet.http.HttpServletRequest;\r
import javax.servlet.http.HttpSession;\r
\r
import junit.framework.TestCase;\r
\r
import com.vaadin.Application;\r
import com.vaadin.service.ApplicationContext.TransactionListener;\r
+import com.vaadin.terminal.gwt.server.AbstractWebApplicationContext;\r
import com.vaadin.terminal.gwt.server.WebApplicationContext;\r
\r
public class TransactionListenersConcurrency extends TestCase {\r
* transaction is then started for each application. Some semi-random delays\r
* are included so that calls to addTransactionListener and\r
* WebApplicationContext.startTransaction are mixed.\r
- * \r
+ *\r
*/\r
public void testTransactionListeners() throws Exception {\r
final List<Throwable> exceptions = new ArrayList<Throwable>();\r
// Call the transaction listener using reflection as\r
// startTransaction is protected.\r
\r
- Method m = context.getClass().getDeclaredMethod(\r
- "startTransaction", Application.class,\r
- HttpServletRequest.class);\r
+ Method m = AbstractWebApplicationContext.class\r
+ .getDeclaredMethod("startTransaction",\r
+ Application.class, Object.class);\r
m.setAccessible(true);\r
m.invoke(context, app, null);\r
} catch (Exception e) {\r
\r
/**\r
* Creates a HttpSession mock\r
- * \r
+ *\r
*/\r
private static HttpSession createSession() {\r
HttpSession session = createMock(HttpSession.class);\r
/**\r
* A transaction listener that just sleeps for the given amount of time in\r
* transactionStart and transactionEnd.\r
- * \r
+ *\r
*/\r
public static class DelayTransactionListener implements TransactionListener {\r
\r