It might be of some help, but I did look a bit into clustering Resin when I worked on clustering Quercus and Drupal. This was the mail I sent about this at the beginning of the month:
---------- Forwarded message ---------- From: Geert Bevin <[EMAIL PROTECTED]> Date: Jul 4, 2007 3:33 PM Subject: Re: [Eng] anyone want to cluster Drupal? To: Taylor Gautier <[EMAIL PROTECTED]> Cc: Juris Galang <[EMAIL PROTECTED]>, TC Engineering <[EMAIL PROTECTED]> Ok, FWIW I got something to work. It seems that Resin launches another Java process that runs the actual web server. So adding this to resin.conf lets that other process run correctly: <server-default> <!-- other config stuff --> <jvm-arg>-Dcom.sun.management.jmxremote</jvm-arg> <jvm-arg>-Dnet.sf.ehcache.useLRUMap=true</jvm-arg> <jvm-arg>-Xbootclasspath/p:tcinst_root/lib/dso-boot/dso-boot-hotspot_osx_150_07.jar</jvm-arg> <jvm-arg>-Dtc.install-root=tcinst_root</jvm-arg> <jvm-arg>-Dtc.config=localhost:9510</jvm-arg> <!-- other config stuff --> </server-default> That's not sufficient though, since by default Resin replaces the system classloader which seems to go into an endless loop (didn't go through it step by step to find the exact cause yet). I attached a patch that disables this new system classloader entirely, which seems to work, I have no idea about the side effects though. Finally, I also included the tc-config.xml. The strange thing though is that I can see the ehcache.EhcacheModule being instrumented, but the manager field is never shared as a root. The Ehcache caches are though. Haven't figured out what that's about. Anyway, with this, Drupal is using Ehcache which is clustered through Terracotta ... though very hackishly due to non existent Resin support. I tried Quercus with Tomcat and Glassfish, but those failed to properly work with the database and I couldn't find any logs describing why. Anyway, this should make it easier for others to play around with this, let me know if you wanna have a go. -- Geert Bevin Terracotta - http://www.terracotta.org Uwyn "Use what you need" - http://uwyn.com RIFE Java application framework - http://rifers.org Music and words - http://gbevin.com
ResinWatchdog.java.diff
Description: Binary data
<?xml version="1.0" encoding="UTF-8"?> <!-- All content copyright (c) 2003-2007 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved. --> <tc:tc-config xmlns:tc="http://www.terracotta.org/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.terracotta.org/schema/terracotta-4.xsd"> <!-- Tell DSO where the Terracotta server can be found; See the Terracotta DSO Guide for additional information. --> <servers> <server host="%i" name="sample"> <data>%(user.home)/terracotta/demo-server/server-data</data> <logs>%(user.home)/terracotta/demo-server/server-logs</logs> </server> </servers> <clients> <!-- Tell DSO where to put the generated client logs See the Terracotta Configuration Guide and Reference for additional information.--> <logs>logs/client-logs/%(webserver.log.name)</logs> <modules> <module name="clustered-commons-collections-3.1" version="1.0.0"/> <module name="clustered-ehcache-1.3" version="1.0.0"/> </modules> </clients> <application> <dso> <instrumented-classes> <include> <class-expression>ehcache.*..*</class-expression> </include> <include> <class-expression>com.caucho.quercus.env.*..*</class-expression> </include> </instrumented-classes> <roots> <root> <field-name>ehcache.EhcacheModule.manager</field-name> </root> </roots> </dso> </application> </tc:tc-config>
cache.inc.diff
Description: Binary data
ehcachemodule.jar
Description: Binary data
_______________________________________________ tc-dev mailing list [email protected] http://lists.terracotta.org/mailman/listinfo/tc-dev
