EJServer server = new EJServer( new EchoHandler(), 80 );
server.setMaxReadProcessors( 1 );
server.setMaxWriteProcessors( 1 );
server.enableNonBlockingIO( true );
server.enablePersistentConnections( true );
server.enableHttpPackaging( true );
server.enableCompression( true );
try
{
server.start();
}