Ola pessoal do fórum.
Resolvi abrir esse tópico para discutir as melhores praticas para configurar o Jetty 7. Alem disso tenho muitas duvidas relacionadas a esse container web.
Na nossa empresa utilizamos o Tomcat 6 rodando o ERP e estamos cansados de tantos Memory Leaks(ja fuçamos no código do erp, configurações de memoria do Tomcat....etc). Portanto estou tomando a iniciativa de testar o ERP no Jetty.
Em primeiro momento tudo funcionou perfeitamente... configurei ele para rodar um contexto externo, referenciei todas as lib do Jetty no projeto do erp e exclui as do tomcat(jsp-api...)... tudo blz, rodando legal. E o mais legal a memoria sobe e desce (show de bola), ja que no tomcat a memoria só subia.
Mas agora tenho duvidas quanto as configuracoes:
1 - Memoria do Jetty, onde configuro -Xms512m -Xmx1024m -XX:PermSize=128m -XX:MaxPermSize=512m?. Nao achei nem na documentacao do Jetty e nenhum lugar na internet
2 - Quais as melhores praticas, para obter melhor performance.
3 - Para configurar um contexto externo nao achei nenhuma explicacao na internet apenas criei na sorte um arquivo xml dentro da pasta "jetty-distribution-7.2.0.v20101020\contexts" e referenciei o endereco do erp no xml. Isso é o correto?
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
<!-- ==================================================================
Configure and deploy the test web application in $(jetty.home)/webapps/test
Note. If this file did not exist or used a context path other that /test
then the default configuration of jetty.xml would discover the test
webapplication with a WebAppDeployer. By specifying a context in this
directory, additional configuration may be specified and hot deployments
detected.
===================================================================== -->
<Configure class="org.eclipse.jetty.webapp.WebAppContext">
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Required minimal context configuration : -->
<!-- + contextPath -->
<!-- + war OR resourceBase -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<Set name="contextPath">/erp</Set>
<Set name="war">C:/INTAB/erp/erp</Set>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- Optional context configuration -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
<Set name="extractWAR">true</Set>
<Set name="copyWebDir">false</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
<Set name="overrideDescriptor"><SystemProperty name="jetty.home" default="."/>/contexts/test.d/override-web.xml</Set>
<Get name="securityHandler">
<Set name="loginService">
<New class="org.eclipse.jetty.security.HashLoginService">
<Set name="name">Test Realm</Set>
<Set name="config"><SystemProperty name="jetty.home" default="."/>/etc/realm.properties</Set>
</New>
</Set>
<Set name="checkWelcomeFiles">true</Set>
</Get>
-->
</Configure>
4 - Onde fica as classes do contexto compiladas pelo Jetty?
Então agora podemos discutir melhores praticas e quem souber pode responder as minhas duvidas acima.