you'll find my 2 xml conf (resin 4.0.13)
- resin.xml is the front server, I have 1 front for 2 app-tier clusters,
one cluster is for the application, the other if for images only servers
- resin.safe.xml is the conf for application app-tier, I did not set any
http service for this because I never access it directly. (but you have
to if you use resin-admin)
I don't use automatic deployement or elastic server yet, but I think
I'll try this on the new version of resin.
good luck
On 09/11/12 09:52, Rick Mann wrote:
On Nov 9, 2012, at 0:19 , Riccardo Cohen <r.co...@realty-property.com> wrote:
Hello Rick
I haven't worked a lot on this, but if you want I can provide my
resin.xml : in my application I have one resin front loadbalancer, with
N application servers (all IP are known) and potentially 2 mysql db
servers .
I use resin 4.0.13 pro on linux debian
Thanks, Riccardo, couldn't hurt!
--
Riccardo Cohen
+33 (0)6 09 83 64 49
Société Realty-Property.com
1 rue de la Monnaie
37000 Tours
France
<http://www.appartement-maison.fr>
<!--
- Resin 4.0 configuration file for a clustered/load-balance environment
-->
<resin xmlns="http://caucho.com/ns/resin"
xmlns:resin="urn:java:com.caucho.resin">
<!-- adds all .jar files under the resin/lib directory -->
<class-loader>
<tree-loader path="${resin.home}/ext-lib"/>
<tree-loader path="${resin.root}/ext-lib"/>
<tree-loader path="${resin.home}/lib"/>
<tree-loader path="${resin.root}/lib"/>
</class-loader>
<!--
- jars with maven dependencies can be placed in project-jars to be used
- by web-apps
<resin:ProjectJarRepository path="${resin.root}/project-jars"/>
-->
<!--
- Resin-managed data, including sessions, administration, and clustering
-->
<resin-data-directory>${resin.root}/resin-data</resin-data-directory>
<!--
- Remote management requires at least one enabled admin user.
<resin:AdminAuthenticator>
<resin:import path="${resin.root}/conf/admin-users.xml" optional="true"/>
</resin:AdminAuthenticator>
-->
<!--
- Logging configuration for the JDK logging API.
-->
<log-handler name="" level="info" path="/home/webapps.tmp/realty/logs/jvm.log"
timestamp="[%y-%m-%d %H:%M:%S.%s] {%{thread}} "
rollover-size="1mb"
rollover-period="1D"
rollover-count="60"/>
<!--
- 'info' for production
- 'fine' or 'finer' for development and troubleshooting
-->
<logger name="com.caucho" level="info"/>
<logger name="com.caucho.java" level="config"/>
<logger name="com.caucho.loader" level="config"/>
<logger name="com.caucho.sql" level="info"/>
<logger name="com.caucho.amber" level="info"/>
<logger name="com.caucho.server.http" level="info"/>
<stdout-log path='/home/webapps.tmp/realty/logs/jvm.log' timestamp="OUT[%y-%m-%d %H:%M:%S.%s] {%{thread}} "/>
<stderr-log path='/home/webapps.tmp/realty/logs/jvm.log' timestamp="ERR[%y-%m-%d %H:%M:%S.%s] {%{thread}} "/>
<!--
- For production sites, change dependency-check-interval to something
- like 600s, so it only checks for updates every 10 minutes.
-->
<dependency-check-interval>-1s</dependency-check-interval>
<!--
- SMTP server for sending mail notifications
-->
<system-property mail.smtp.host="smtp.nothing.fr"/>
<system-property mail.smtp.port="25"/>
<!--
- Sets the default character encoding to utf-8
-
-->
<character-encoding>utf-8</character-encoding>
<!--
- You can change the compiler to "javac", "eclipse" or "internal".
-->
<javac compiler="javac" args=""/>
<cluster-default>
<!-- standard servlet behavior, including .jsp, .php, and WEB-INF -->
<resin:import path="${resin.root}/conf/app-default.xml"/>
<!--
- Admin services
-->
<resin:DeployService/>
<resin:if test="${resin.professional}">
<resin:JmxService/>
<resin:LogService/>
<resin:StatService/>
<resin:XaLogService/>
</resin:if>
</cluster-default>
<cluster id="realty">
<!-- sets the content root for the cluster, relative to resin.root -->
<root-directory>.</root-directory>
<!-- enables development error pages
<development-mode-error-page/>
-->
<server-default>
<!-- The http port
<http address="*" port="80"/>
-->
<!-- SSL port configuration:
<http address="*" port="8443">
<openssl>
<certificate-file>keys/gryffindor.crt</certificate-file>
<certificate-key-file>keys/gryffindor.key</certificate-key-file>
<password>my-password</password>
</openssl>
</http>
-->
<!--
- The JVM arguments
-->
<jvm-arg>-Xms64m</jvm-arg>
<jvm-arg>-Xmx256m</jvm-arg>
<jvm-arg>-Xss1m</jvm-arg>
<jvm-arg>-Dfile.encoding=UTF-8</jvm-arg>
<!--
<jvm-arg>-Xdebug</jvm-arg>
<jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
-->
<!--
- Uncomment to enable admin heap dumps
- <jvm-arg>-agentlib:resin</jvm-arg>
-
- Uncomment for low-memory overhead
- <jvm-arg>-Dcaucho.smallmem</jvm-arg>
-->
<!--
- arguments for the watchdog process
<watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>
-->
<!--
- Configures the minimum free memory allowed before Resin
- will force a restart.
-->
<memory-free-min>10M</memory-free-min>
<!-- Maximum number of threads. -->
<thread-max>100</thread-max>
<!-- Configures the socket timeout -->
<socket-timeout>65s</socket-timeout>
<!-- Configures the keepalive -->
<keepalive-timeout>15s</keepalive-timeout>
<!--
- If starting Resin as root on Unix, specify the user name
- and group name for the web server user.
<resin:if test="${resin.userName == 'root'}">
<user-name>resin</user-name>
<group-name>resin</group-name>
</resin:if>
-->
</server-default>
<!-- define the servers in the cluster -->
<server id="realty1" address="127.0.0.1" port="10001"/>
<!--
- For security, use a different cookie for SSL sessions.
- <ssl-session-cookie>SSL_JSESSIONID</ssl-session-cookie>
-->
<!--
- Enables the cache (available in Resin Professional)
-->
<!--
<resin:if test="${resin.professional}">
<cache path="cache" memory-size="64M">
Vary header rewriting for IE
<rewrite-vary-as-private/>
</cache>
</resin:if>
-->
<!--
- Enables periodic checking of the server status and
- check for deadlocks..
-
- All servers can add <url>s to be checked.
<resin:if test="${resin.professional}">
<resin:PingThread>
<url>http://localhost:8080/test-ping.jsp</url>
</resin:PingThread>
</resin:if>
-->
<!--
- Defaults applied to each web-app.
-->
<web-app-default>
<prologue>
<!--
- Enable EL expressions in Servlet and Filter init-param
<allow-servlet-el/>
-->
</prologue>
<!--
- Sets timeout values for cacheable pages, e.g. static pages.
-->
<cache-mapping url-pattern="/" expires="5s"/>
<cache-mapping url-pattern="*.gif" expires="600s"/>
<cache-mapping url-pattern="*.jpg" expires="600s"/>
<cache-mapping url-pattern="*.png" expires="600s"/>
<cache-mapping url-pattern="*.css" expires="600s"/>
<cache-mapping url-pattern="*.swf" expires="600s"/>
<cache-mapping url-pattern="*.js" expires="600s"/>
<cache-mapping url-pattern="*.pdf" expires="600s"/>
<!--
- for security, disable session URLs by default.
-->
<session-config>
<enable-url-rewriting>false</enable-url-rewriting>
</session-config>
<!--
- For security, set the HttpOnly flag in cookies.
- <cookie-http-only/>
-->
<!--
- Some JSP packages have incorrect .tld files. It's possible to
- set validate-taglib-schema to false to work around these packages.
<jsp>
<validate-taglib-schema>true</validate-taglib-schema>
<fast-jstl>true</fast-jstl>
</jsp>
<jsf fast-jsf='false'/>
-->
</web-app-default>
<!--
- Sample database pool configuration
-
- The JDBC name is java:comp/env/jdbc/test
<database>
<jndi-name>jdbc/mysql</jndi-name>
<driver type="org.mysql.jdbc.Driver">
<url>jdbc:mysql://localhost:3306/test</url>
<user></user>
<password></password>
</driver>
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>20</max-connections>
<max-idle-time>30s</max-idle-time>
</database>
-->
<!--
- Default host configuration applied to all virtual hosts.
-->
<host-default>
<!--
- With another web server, like Apache, this can be commented out
- because the web server will log this information.
<access-log path="log/access.log"
format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
rollover-period="1W"/>
-->
<!-- creates the webapps directory for .war expansion
<web-app-deploy path="webapps"/>
-->
</host-default>
<!-- configures a deployment directory for virtual hosts -->
<host-deploy path="hosts">
<host-default>
<resin:import path="host.xml" optional="true"/>
</host-default>
</host-deploy>
<!-- configures the default host, matching any host name -->
<host id=""> <!--root-directory="."-->
<!--
- configures an explicit root web-app matching the
- webapp's ROOT
<web-app id="/" root-directory="webapps/ROOT"/>
-->
<!--
- Administration application /resin-admin
<web-app id="/resin-admin" root-directory="${resin.root}/doc/admin">
<prologue>
<resin:set var="resin_admin_external" value="false"/>
<resin:set var="resin_admin_insecure" value="true"/>
</prologue>
</web-app>
-->
<!--
<web-app id="/resin-config" root-directory="${resin.root}/doc/config"/>
-->
<!--
<web-app id="/resin-doc" root-directory="${resin.root}/doc/resin-doc"/>
-->
<class-loader>
<library-loader path="/home/webapps/realty/WEB-INF/lib/google"/>
</class-loader>
<web-app id="/"
xmlns="http://caucho.com/ns/resin"
root-directory="/home/webapps/realty"
work-dir="/home/webapps.tmp/realty/work"
temp-dir="/home/webapps.tmp/realty/tmp">
<database>
<jndi-name>realty/jdbc</jndi-name>
<driver>
<type>com.mysql.jdbc.Driver</type>
<url>jdbc:mysql://localhost/realty</url>
<init-param zeroDateTimeBehavior="convertToNull"/>
<init-param jdbcCompliantTruncation="false"/>
<init-param characterEncoding="utf8" />
<user>realty</user>
<password></password>
</driver>
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>200</max-connections>
<spy>false</spy>
</database>
<ejb-server data-source="realty/jdbc" create-database-schema="false"/>
<database>
<jndi-name>realty/jdbc2</jndi-name>
<driver>
<type>com.mysql.jdbc.Driver</type>
<url>jdbc:mysql://localhost/realty</url>
<init-param zeroDateTimeBehavior="convertToNull"/>
<init-param jdbcCompliantTruncation="false"/>
<init-param characterEncoding="utf8" />
<user>realty</user>
<password></password>
</driver>
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>20</max-connections>
<max-idle-time>30s</max-idle-time>
<spy>false</spy>
</database>
<session-config>
<!-- The cookie JSESSIONID must be the same for pro and www (for InterAgencies) -->
<cookie-domain>appartement-maison.fr</cookie-domain>
</session-config>
<servlet servlet-name="globalaction" servlet-class="realty.Globalaction">
<load-on-startup/>
</servlet>
<servlet servlet-name="urlmanager" servlet-class="realty.Urlmanager">
<load-on-startup/>
</servlet>
<servlet servlet-name="flextestrequests" servlet-class="reatest.Flextest">
<load-on-startup/>
</servlet>
<servlet servlet-name="flexadminrequests" servlet-class="realty.Flexadmin">
<load-on-startup/>
</servlet>
<servlet servlet-name="flexaccountprorequests" servlet-class="realty.Flexaccountpro">
<load-on-startup/>
</servlet>
<servlet servlet-name="flexaccountproiarequests" servlet-class="realty.FlexaccountproIa">
<load-on-startup/>
</servlet>
<servlet servlet-name="javascriptactions" servlet-class="realty.Jsactions">
<load-on-startup/>
</servlet>
<servlet servlet-name="javascriptsearch" servlet-class="realty.Jssearch">
<load-on-startup/>
</servlet>
<servlet servlet-name="jsaccountrequests" servlet-class="realty.Jsaccount">
<load-on-startup/>
</servlet>
<servlet servlet-name="filesactions" servlet-class="realty.Filesactions">
<load-on-startup/>
</servlet>
<servlet-mapping url-regexp="/fr-.*" servlet-name="urlmanager"/>
<servlet-mapping url-regexp="/en-.*" servlet-name="urlmanager"/>
<servlet-mapping url-pattern="/fr/*" servlet-name="urlmanager"/>
<servlet-mapping url-pattern="/en/*" servlet-name="urlmanager"/>
<servlet-mapping url-pattern="/test/*" servlet-name="urlmanager"/>
<servlet-mapping url-pattern="/command/*" servlet-name="urlmanager"/>
<servlet-mapping url-regexp="/sitemap.*" servlet-name="urlmanager"/>
<servlet-mapping url-pattern="/robots.txt" servlet-name="urlmanager"/>
<servlet-mapping url-pattern="/admin" servlet-name="urlmanager"/>
<servlet-mapping url-pattern="/adminimportfiles" servlet-name="urlmanager"/>
<servlet-mapping url-pattern="/swftest/*" servlet-name="flextestrequests"/>
<servlet-mapping url-pattern="/swfadmin/*" servlet-name="flexadminrequests"/>
<servlet-mapping url-pattern="/swfaccountpro/*" servlet-name="flexaccountprorequests"/>
<servlet-mapping url-pattern="/swfaccountproia/*" servlet-name="flexaccountproiarequests"/>
<servlet-mapping url-pattern="/jsactions/*" servlet-name="javascriptactions"/>
<servlet-mapping url-pattern="/jssearch/*" servlet-name="javascriptsearch"/>
<servlet-mapping url-pattern="/jsaccount/*" servlet-name="jsaccountrequests"/>
<servlet-mapping url-pattern="/filesactions/*" servlet-name="filesactions"/>
<path-mapping url-pattern='/.administration/*' real-path='nowhere'/>
<path-mapping url-pattern='/.settings/*' real-path='nowhere'/>
<multipart-form enable='true' upload-max='5M'/>
<listener>
<listener-class>com.caucho.jsp.JspPrecompileListener</listener-class>
<init>
<extension>jsp</extension>
</init>
</listener>
<error-page>
<error-code>404</error-code>
<location>/jsp/err404.jsp</location>
</error-page>
<!-- Frequent cron tasks -->
<scheduled-task class="reacron.Statsmanager">
<cron>* * * * *</cron>
</scheduled-task>
<scheduled-task class="reacron.Cleancache">
<cron>1 * * * *</cron>
</scheduled-task>
<scheduled-task class="reacron.Randpropinfo">
<cron>3 * * * *</cron>
</scheduled-task>
<!-- Night cron tasks -->
<scheduled-task class="reacron.CleanLogs">
<cron>00 20 * * *</cron>
</scheduled-task>
<scheduled-task class="reacron.Cleanprops">
<cron>00 22 * * *</cron>
</scheduled-task>
<scheduled-task class="reacron.Cleanmembers">
<cron>10 22 * * *</cron>
</scheduled-task>
<!-- after backup, all imports and citiesprepare.sh -->
<scheduled-task class="reacron.CleanGeocache">
<cron>40 4 * * *</cron>
</scheduled-task>
<scheduled-task class="reacron.Cleanimages">
<cron>45 4 * * *</cron>
</scheduled-task>
<scheduled-task class="reacron.Alertmanager"><!-- must be after midnight for ia alert-->
<cron>50 4 * * *</cron>
</scheduled-task>
<scheduled-task class="reacron.Cleanstats"><!-- must be after midnight to count all stats for yesterday-->
<cron>10 5 * * *</cron>
</scheduled-task>
<scheduled-task class="reacron.ExternalData"><!-- must be after midnight to get Analytics stats for yesterday-->
<cron>15 5 * * *</cron>
</scheduled-task>
<scheduled-task class="reacron.StatsUbiflow"><!-- must be done after CleanStats and ExternalData-->
<cron>00 6 * * *</cron>
</scheduled-task>
<!-- weekly cron tasks -->
<scheduled-task class="reacron.AddressCounter">
<cron>0 5 * * 0</cron><!-- sunday morning after imports -->
</scheduled-task>
</web-app>
</host>
</cluster>
</resin>
<!--
- Resin 3.2 configuration file.
-->
<resin xmlns="http://caucho.com/ns/resin"
xmlns:resin="http://caucho.com/ns/resin/core">
<!-- adds all .jar files under the resin/lib directory -->
<class-loader>
<tree-loader path="${resin.home}/ext-lib"/>
<tree-loader path="${resin.root}/ext-lib"/>
<tree-loader path="${resin.home}/lib"/>
<tree-loader path="${resin.root}/lib"/>
</class-loader>
<log-handler name="" level="info" path="/home/webapps.tmp/front/logs/jvm.log"
timestamp="[%y-%m-%d %H:%M:%S.%s] {%{thread}} "/>
<logger name="com.caucho" level="info"/>
<logger name="com.caucho.java" level="config"/>
<logger name="com.caucho.loader" level="config"/>
<logger name="com.caucho.sql" level="all"/>
<logger name="com.caucho.amber" level="info"/>
<logger name="com.caucho.server.http" level="info"/>
<!--
- For production sites, change dependency-check-interval to something
- like 600s, so it only checks for updates every 10 minutes.
-->
<dependency-check-interval>-1s</dependency-check-interval>
<character-encoding>utf-8</character-encoding>
<cluster id="web-tier">
<server-default>
<http address="*" port="80"/>
<!--
<http address="*" port="443">
<openssl>
<certificate-file>/home/ssl/mp/presencemusicale.crt</certificate-file>
<certificate-key-file>/home/ssl/mp/presencemusicale.key_withpass</certificate-key-file>
<password>mp56</password>
</openssl>
</http>
-->
<jvm-arg>-Xms64m</jvm-arg>
<jvm-arg>-Xmx256m</jvm-arg>
<jvm-arg>-Xss1m</jvm-arg>
<jvm-arg>-Dfile.encoding=UTF-8</jvm-arg>
<jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg>
<watchdog-jvm-arg>-Dcom.sun.management.jmxremote</watchdog-jvm-arg>
<memory-free-min>1M</memory-free-min>
<thread-max>256</thread-max>
<socket-timeout>65s</socket-timeout>
<keepalive-timeout>15s</keepalive-timeout>
</server-default>
<web-app-default>
<cache-mapping url-pattern="/" expires="5s"/>
<cache-mapping url-pattern="*.gif" expires="60s"/>
<cache-mapping url-pattern="*.jpg" expires="60s"/>
<cache-mapping url-pattern="*.png" expires="60s"/>
<cache-mapping url-pattern="*.swf" expires="60s"/>
</web-app-default>
<server id="realty1front" address="127.0.0.1"/>
<!-- needs resin pro <cache disk-size="1024M" memory-size="256M"/> -->
<resin:import path="${RESIN_HOME}/conf/app-default.xml"/>
<host-default>
</host-default>
<host id="safe.appartement-maison.fr" root-directory="/home/webapps/fronthost" >
<host-alias>safepro.appartement-maison.fr</host-alias>
<host-alias>ks369966.kimsufi.com</host-alias>
<web-app id="/"
root-directory="/home/webapps/front"
work-dir="/home/webapps.tmp/front/work"
temp-dir="/home/webapps.tmp/front/tmp">
<rewrite-dispatch>
<load-balance regexp="" cluster="app-tier"/>
</rewrite-dispatch>
<error-page>
<error-code>503</error-code>
<location>/err.html</location>
</error-page>
</web-app>
</host>
<host id="safemedia.appartement-maison.fr" root-directory="/home/webapps/fronthostmedia" >
<web-app id="/"
root-directory="/home/webapps/front"
work-dir="/home/webapps.tmp/front/work"
temp-dir="/home/webapps.tmp/front/tmp">
<rewrite-dispatch>
<load-balance regexp="" cluster="img-tier"/>
</rewrite-dispatch>
</web-app>
</host>
</cluster>
<cluster id="app-tier">
<server id="realty1" address="127.0.0.1" port="10001"/>
</cluster>
<cluster id="img-tier">
<server id="realtymedia1" address="127.0.0.1" port="20001"/>
</cluster>
</resin>
_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest