public void test() throws Exception
{
MBeanServer server = getServer();
ObjectName name = new ObjectName("jboss.web:type=Service,serviceName=jboss.web");
Connector connector = new Connector("org.apache.coyote.memory.MemoryProtocolHandler");
MemoryProtocolHandler handler = (MemoryProtocolHandler) connector.getProtocolHandler();
server.invoke(name, "addConnector", new Object[] { connector }, new String[] { Connector.class.getName() });
try
{
ByteChunk input = new ByteChunk(1024);
ByteChunk output = new ByteChunk(1024);
org.apache.coyote.Request req = new org.apache.coyote.Request();
req.decodedURI().setString("/webbmtcleanuptest/test1.jsp");
req.method().setString("GET");
org.apache.coyote.Response resp = new org.apache.coyote.Response();
handler.process(req, input, resp, output);
if (resp.getStatus() != 200)
throw new Error(output.toString());
input = new ByteChunk(1024);
output = new ByteChunk(1024);
req = new org.apache.coyote.Request();
req.decodedURI().setString("/webbmtcleanuptest/test2.jsp");
req.method().setString("GET");
resp = new org.apache.coyote.Response();
handler.process(req, input, resp, output);
if (resp.getStatus() != 200)
throw new Error(output.toString());
}
finally
{