incubator-wadi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdud...@apache.org
Subject svn commit: r356933 [14/35] - in /incubator/wadi/trunk: ./ etc/ modules/ modules/assembly/ modules/assembly/src/ modules/assembly/src/bin/ modules/assembly/src/conf/ modules/assembly/src/main/ modules/assembly/src/main/assembly/ modules/core/ modules/c...
Date Wed, 14 Dec 2005 23:36:16 GMT
Added: incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/StreamingMigratingRelocater.java
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/StreamingMigratingRelocater.java?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/StreamingMigratingRelocater.java (added)
+++ incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/StreamingMigratingRelocater.java Wed Dec 14 15:32:56 2005
@@ -0,0 +1,73 @@
+/**
+ *
+ * Copyright 2003-2005 Core Developers Network Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.codehaus.wadi.impl;
+
+import org.codehaus.wadi.Immoter;
+import org.codehaus.wadi.InvocationContext;
+import org.codehaus.wadi.InvocationException;
+import org.codehaus.wadi.RelocaterConfig;
+import org.codehaus.wadi.SessionRelocater;
+
+import EDU.oswego.cs.dl.util.concurrent.Sync;
+
+public class StreamingMigratingRelocater implements SessionRelocater {
+	
+	public StreamingMigratingRelocater() {
+		super();
+	}
+	
+	protected RelocaterConfig _config;
+	
+	public void init(RelocaterConfig config) {
+		_config=config;
+	}
+	
+	public void destroy() {
+		_config=null;
+	}
+	
+	public boolean relocate(InvocationContext invocationContext, String name, Immoter immoter, Sync motionLock) throws InvocationException {
+		// check cache
+		//Server server=_config.getServer();
+		
+		// repeat ...
+		
+		//boolean sessionMoves=true;
+		
+		//Location location;
+		//if (!sessionMoves && (location=(Location)locationMap.get(name))!=null) {
+		// if cache is fresh (i.e. holds a location) && lock required is 'R'
+		//   p2p to known location with last known timestamp stating 'R' lock needed
+		//   response is one of - don't know, newer location, lock-acquired
+		//   if still no success fall through to else...
+		//}
+		
+		// else - (cache is stale or 'W' lock required) 
+		//   p2n to whole cluster with last known timestamp stating r or w lock needed
+		//   responses are one of: newer location, lock-acquired
+		
+		// until either;
+		//   you receive a lock-acquired (success)
+		// or:
+		//  you cease to be told of fresher locations (fail)
+		
+		// update our location cache on each iteration...
+		
+		return false;
+	}
+	
+}

Added: incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/TimeToLiveEvicter.java
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/TimeToLiveEvicter.java?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/TimeToLiveEvicter.java (added)
+++ incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/TimeToLiveEvicter.java Wed Dec 14 15:32:56 2005
@@ -0,0 +1,39 @@
+/**
+ *
+ * Copyright 2003-2005 Core Developers Network Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.codehaus.wadi.impl;
+
+import org.codehaus.wadi.Evictable;
+
+/**
+ * An Evicter which also evicts Evictables with less than a certain time to live remaining.
+ * For example, using this Evicter, you could evict sessions with less than 30 minutes of time left.
+ *
+ * @author <a href="mailto:jules@coredevelopers.net">Jules Gosnell</a>
+ * @version $Revision: 1.1 $
+ */
+public class TimeToLiveEvicter extends AbstractBestEffortEvicter {
+	protected final long _ttl;
+
+    public TimeToLiveEvicter(int sweepInterval, boolean strictOrdering, int ttl) {
+	    super(sweepInterval, strictOrdering);
+		_ttl=ttl*1000;
+	}
+
+	public boolean test(Evictable evictable, long time, long ttl) {
+	    return ttl<=_ttl;
+	}
+}

Added: incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/TomcatSessionIdFactory.java
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/TomcatSessionIdFactory.java?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/TomcatSessionIdFactory.java (added)
+++ incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/TomcatSessionIdFactory.java Wed Dec 14 15:32:56 2005
@@ -0,0 +1,417 @@
+/**
+ *
+ * Copyright 2003-2005 Core Developers Network Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+// TODO - how do I license this file ?
+
+/*
+ *
+ * ====================================================================
+ *
+ * The Apache Software License, Version 1.1
+ *
+ * Copyright (c) 1999 The Apache Software Foundation.  All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in
+ *    the documentation and/or other materials provided with the
+ *    distribution.
+ *
+ * 3. The end-user documentation included with the redistribution, if
+ *    any, must include the following acknowlegement:
+ *       "This product includes software developed by the
+ *        Apache Software Foundation (http://www.apache.org/)."
+ *    Alternately, this acknowlegement may appear in the software itself,
+ *    if and wherever such third-party acknowlegements normally appear.
+ *
+ * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
+ *    Foundation" must not be used to endorse or promote products derived
+ *    from this software without prior written permission. For written
+ *    permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache"
+ *    nor may "Apache" appear in their names without prior written
+ *    permission of the Apache Group.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation.  For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ *
+ * [Additional notices, if required by prior licensing conditions]
+ *
+ */
+
+// this class has been put together from code taken from Tomcat5
+// org.apache.catalina.session.ManagerBase. When I have the time, I
+// will invetigate UID generation and write my own generator...
+
+// How hard can it be to generate a secure session id ? :-)
+
+package org.codehaus.wadi.impl;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codehaus.wadi.SessionIdFactory;
+
+import java.io.DataInputStream;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.security.AccessController;
+import java.security.MessageDigest;
+import java.security.NoSuchAlgorithmException;
+import java.security.PrivilegedAction;
+import java.util.Random;
+
+/**
+ * An IdGenerator borrowed from Tomcat
+ *
+ * @author <a href="mailto:jules@coredevelopers.net">Jules Gosnell</a>
+ * @version $Revision: 1.5 $
+ */
+public class TomcatSessionIdFactory
+  implements SessionIdFactory
+  {
+    protected final Log _log = LogFactory.getLog(getClass());
+
+    public String create() {
+        String id=generateSessionId();
+        if (log.isTraceEnabled()) log.trace("generated: "+id);
+        return id;
+    }
+
+    public int getSessionIdLength() {
+        return 32;
+    }
+
+    public void setSessionIdLength(int l) {
+        if (l!=getSessionIdLength())
+            if (_log.isWarnEnabled()) _log.warn("session id length is not a writeable attribute - ignoring new setting: " + l);
+    }
+
+//   // we should be able to better than this - can't we work out the
+//   // size of the ID ?
+//   public String
+//     getId(String idId, String idRoute)
+//   {
+//     return idId+"."+idRoute;
+//   }
+
+//   public String
+//     getIdId(String id)
+//     {
+//       int index=id.indexOf('.');
+//       return index<0?id:id.substring(0,index);
+//     }
+
+//   public String
+//     getIdRoute(String id)
+//     {
+//       int index=id.indexOf('.');
+//       return index<0?null:id.substring(index+1,id.length());
+//     }
+
+  //------------------------------------------------
+  // integration layer..
+  //------------------------------------------------
+
+  protected final Log log=LogFactory.getLog(getClass());
+
+  class StringManager
+  {
+    String getString(String s){return s;}
+    String getString(String s, String a){return "["+a+"]: "+s;}
+  }
+
+  protected StringManager sm=new StringManager();
+
+  class Support
+  {
+    void firePropertyChange(String s, Object oldVal, Object newVal){}	// TODO - do we really need this ?
+  }
+
+  protected Support support=new Support();
+
+  //------------------------------------------------
+  // everything below this line borrowed from Tomcat
+  //------------------------------------------------
+
+  protected DataInputStream randomIS=null;
+  protected String devRandomSource="/dev/urandom";
+
+  /**
+   * The default message digest algorithm to use if we cannot use
+   * the requested one.
+   */
+  protected static final String DEFAULT_ALGORITHM = "MD5";
+
+  /**
+   * The number of random bytes to include when generating a
+   * session identifier.
+   */
+  protected static final int SESSION_ID_BYTES = 16;
+
+  /**
+   * The message digest algorithm to be used when generating session
+   * identifiers.  This must be an algorithm supported by the
+   * <code>java.security.MessageDigest</code> class on your platform.
+   */
+  protected String algorithm = DEFAULT_ALGORITHM;
+
+  /**
+   * Return the MessageDigest implementation to be used when
+   * creating session identifiers.
+   */
+  protected MessageDigest digest = null;
+
+  /**
+   * A random number generator to use when generating session identifiers.
+   */
+  protected Random random = null;
+
+  /**
+   * The Java class name of the random number generator class to be used
+   * when generating session identifiers.
+   */
+  protected String randomClass = "java.security.SecureRandom";
+
+  /**
+   * A String initialization parameter used to increase the entropy of
+   * the initialization of our random number generator.
+   */
+  protected String entropy = null;
+
+  /**
+   * Return the entropy increaser value, or compute a semi-useful value
+   * if this String has not yet been set.
+   */
+  public String getEntropy() {
+
+    // Calculate a semi-useful value if this has not been set
+    if (this.entropy == null)
+      setEntropy(this.toString());
+
+    return (this.entropy);
+
+  }
+
+  /**
+   * Set the entropy increaser value.
+   *
+   * @param entropy The new entropy increaser value
+   */
+  public void setEntropy(String entropy) {
+
+    String oldEntropy = entropy;
+    this.entropy = entropy;
+    support.firePropertyChange("entropy", oldEntropy, this.entropy);
+
+  }
+
+  /**
+   * Return the random number generator instance we should use for
+   * generating session identifiers.  If there is no such generator
+   * currently defined, construct and seed a new one.
+   */
+  public synchronized Random getRandom() {
+    if (this.random == null) {
+      synchronized (this) {
+	if (this.random == null) {
+	  // Calculate the new random number generator seed
+	  long seed = System.currentTimeMillis();
+	  //long t1 = seed;
+	  char entropy[] = getEntropy().toCharArray();
+	  for (int i = 0; i < entropy.length; i++) {
+	    long update = ((byte) entropy[i]) << ((i % 8) * 8);
+	    seed ^= update;
+	  }
+	  try {
+	    // Construct and seed a new random number generator
+	    Class clazz = Class.forName(randomClass);
+	    this.random = (Random) clazz.newInstance();
+	    this.random.setSeed(seed);
+	  } catch (Exception e) {
+	    // Fall back to the simple case
+            log.error(sm.getString("managerBase.random", randomClass), e);
+	    this.random = new java.util.Random();
+	    this.random.setSeed(seed);
+	  }
+//	  long t2=System.currentTimeMillis();
+//	  if( (t2-t1) > 100 )
+//	    if (log.isTraceEnabled())
+//	      log.trace(sm.getString("managerBase.seeding", randomClass) + " " + (t2-t1));
+	}
+      }
+    }
+
+    return (this.random);
+
+  }
+
+  private class PrivilegedSetRandomFile implements PrivilegedAction{
+
+    public Object run(){
+      try {
+	File f=new File( devRandomSource );
+	if( ! f.exists() ) return null;
+	randomIS= new DataInputStream( new FileInputStream(f));
+	randomIS.readLong();
+//	if( log.isTraceEnabled() )
+//	  log.trace( "Opening " + devRandomSource );
+	return randomIS;
+      } catch (IOException ex){
+	return null;
+      }
+    }
+  }
+
+  /** Use /dev/random-type special device. This is new code, but may reduce the
+   *  big delay in generating the random.
+   *
+   *  You must specify a path to a random generator file. Use /dev/urandom
+   *  for linux ( or similar ) systems. Use /dev/random for maximum security
+   *  ( it may block if not enough "random" exist ). You can also use
+   *  a pipe that generates random.
+   *
+   *  The code will check if the file exists, and default to java Random
+   *  if not found. There is a significant performance difference, very
+   *  visible on the first call to getSession ( like in the first JSP )
+   *  - so use it if available.
+   */
+  public void setRandomFile( String s ) {
+    // as a hack, you can use a static file - and genarate the same
+    // session ids ( good for strange traceging )
+    if (System.getSecurityManager() != null){
+      randomIS = (DataInputStream)AccessController.doPrivileged(new PrivilegedSetRandomFile());
+    } else {
+      try{
+	devRandomSource=s;
+	File f=new File( devRandomSource );
+	if( ! f.exists() ) return;
+	randomIS= new DataInputStream( new FileInputStream(f));
+	randomIS.readLong();
+//	if( log.isTraceEnabled() )
+//	  log.trace( "Opening " + devRandomSource );
+      } catch( IOException ex ) {
+	randomIS=null;
+      }
+    }
+  }
+
+  /**
+   * Generate and return a new session identifier.
+   */
+  protected synchronized String generateSessionId() {
+    byte bytes[] = new byte[SESSION_ID_BYTES];
+    getRandomBytes( bytes );
+    bytes = getDigest().digest(bytes);
+
+    // Render the result as a String of hexadecimal digits
+    StringBuffer result = new StringBuffer();
+    for (int i = 0; i < bytes.length; i++) {
+      byte b1 = (byte) ((bytes[i] & 0xf0) >> 4);
+      byte b2 = (byte) (bytes[i] & 0x0f);
+      if (b1 < 10)
+	result.append((char) ('0' + b1));
+      else
+	result.append((char) ('A' + (b1 - 10)));
+      if (b2 < 10)
+	result.append((char) ('0' + b2));
+      else
+	result.append((char) ('A' + (b2 - 10)));
+    }
+    return (result.toString());
+
+  }
+
+  /**
+   * Return the MessageDigest object to be used for calculating
+   * session identifiers.  If none has been created yet, initialize
+   * one the first time this method is called.
+   */
+  public synchronized MessageDigest getDigest() {
+
+    if (this.digest == null) {
+      //long t1=System.currentTimeMillis();
+//      if (log.isTraceEnabled())
+//	log.trace(sm.getString("managerBase.getting", algorithm));
+      try {
+	this.digest = MessageDigest.getInstance(algorithm);
+      } catch (NoSuchAlgorithmException e) {
+	log.error(sm.getString("managerBase.digest", algorithm), e);
+	try {
+	  this.digest = MessageDigest.getInstance(DEFAULT_ALGORITHM);
+	} catch (NoSuchAlgorithmException f) {
+	  log.error(sm.getString("managerBase.digest", DEFAULT_ALGORITHM), e);
+	  this.digest = null;
+	}
+      }
+//      if (log.isTraceEnabled())
+//	log.trace(sm.getString("managerBase.gotten"));
+//      long t2=System.currentTimeMillis();
+//      if( log.isTraceEnabled() )
+//	log.trace("getDigest() " + (t2-t1));
+    }
+
+    return (this.digest);
+
+  }
+
+  protected void getRandomBytes( byte bytes[] ) {
+    // Generate a byte array containing a session identifier
+    if( devRandomSource!=null && randomIS==null ) {
+      setRandomFile( devRandomSource );
+    }
+    if(randomIS!=null ) {
+      try {
+	int len=randomIS.read( bytes );
+	if( len==bytes.length ) {
+	  return;
+	}
+//	if (log.isTraceEnabled())
+//	  log.trace("Got " + len + " " + bytes.length );
+      } catch( Exception ex ) {
+      }
+      devRandomSource=null;
+      randomIS=null;
+    }
+//    Random random = getRandom();
+    getRandom().nextBytes(bytes);
+  }
+}

Added: incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/Utils.java
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/Utils.java?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/Utils.java (added)
+++ incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/Utils.java Wed Dec 14 15:32:56 2005
@@ -0,0 +1,298 @@
+/**
+ *
+ * Copyright 2003-2005 Core Developers Network Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.codehaus.wadi.impl;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+
+import org.activemq.ActiveMQConnectionFactory;
+import org.activemq.broker.impl.BrokerContainerFactoryImpl;
+import org.activemq.store.vm.VMPersistenceAdapter;
+import org.activemq.store.vm.VMPersistenceAdapterFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.codehaus.wadi.Emoter;
+import org.codehaus.wadi.Immoter;
+import org.codehaus.wadi.Motable;
+import org.codehaus.wadi.SerializableContent;
+import org.codehaus.wadi.Streamer;
+
+import EDU.oswego.cs.dl.util.concurrent.Puttable;
+import EDU.oswego.cs.dl.util.concurrent.Sync;
+import EDU.oswego.cs.dl.util.concurrent.Takable;
+import EDU.oswego.cs.dl.util.concurrent.TimeoutException;
+
+/**
+ * A collection of useful static functions
+ *
+ * @author <a href="mailto:jules@coredevelopers.net">Jules Gosnell</a>
+ * @version $Revision: 1.7 $
+ */
+
+public class Utils {
+	protected static final Log _log=LogFactory.getLog(Utils.class);
+	protected static final Log _lockLog=LogFactory.getLog("org.codehaus.wadi.LOCKS");
+
+	/**
+	 * Mote (in other words - move) the data held in a Motable from one Contextualiser to another, such
+	 * that if the two Contextualisers store Motables in a persistant fashion, the data is never
+	 * present in less than one of the two.
+	 *
+	 * @param emoter - delegate for the source Contextualiser
+	 * @param immoter - delegate for the target Contextualiser
+	 * @param emotable - data to be moved
+	 * @param name - the id of said data
+	 * @return - the resulting immotable - in other words - the data's new representation in the target Contextualiser
+	 */
+	public static Motable mote(Emoter emoter, Immoter immoter, Motable emotable, String name) {
+		long startTime=System.currentTimeMillis();
+		Motable immotable=immoter.nextMotable(name, emotable);
+		boolean i=false;
+		boolean e=false;
+		if ((i=immoter.prepare(name, emotable, immotable)) &&(e=emoter.prepare(name, emotable, immotable))) {
+			immoter.commit(name, immotable);
+			emoter.commit(name, emotable);
+			long elapsedTime=System.currentTimeMillis()-startTime;
+			if (_log.isDebugEnabled())_log.debug("motion: "+name+" : "+emoter.getInfo()+" -> "+immoter.getInfo()+" ("+elapsedTime+" millis)");
+			return immotable;
+		} else {
+			if (e) emoter.rollback(name, emotable);
+			if (i) immoter.rollback(name, immotable);
+			long elapsedTime=System.currentTimeMillis()-startTime;
+			if (_log.isWarnEnabled()) _log.warn("motion failed: "+name+" : "+emoter.getInfo()+" -> "+immoter.getInfo()+" ("+elapsedTime+" millis)");
+			return null;
+		}
+	}
+
+	/**
+	 * Ignore any interruptions whilst acquiring a lock.
+	 *
+	 * @param sync - the lock
+	 * @throws TimeoutException - some Syncs (TimeoutSync) may timeout during acquisition
+	 */
+	public static void acquireUninterrupted(Sync sync) throws TimeoutException {
+	    do {
+	        try {
+	            sync.acquire();
+	        } catch (TimeoutException e) {
+	            Thread.interrupted(); // TODO - not sure if we need to clear the interrupted flag ?
+	            throw e; // a TimeoutException isa InterruptedException
+	        } catch (InterruptedException e) {
+		  _log.trace("unexpected interruption - ignoring", e);
+	        }
+	    } while (Thread.interrupted());
+	}
+
+	public static void acquireUninterrupted(String lockType, String lockName, Sync sync) throws TimeoutException {
+		try {
+		do {
+			try {
+				if (_lockLog.isTraceEnabled()) _lockLog.trace(lockType+" - acquiring: "+lockName+" ["+Thread.currentThread().getName()+"]"+" : "+sync);
+				//sync.attempt(5000);
+				sync.acquire();
+				if (_lockLog.isTraceEnabled()) _lockLog.trace(lockType+" - acquired : "+lockName+" ["+Thread.currentThread().getName()+"]"+" : "+sync);
+			} catch (TimeoutException e) {
+				Thread.interrupted(); // TODO - not sure if we need to clear the interrupted flag ?
+				throw e; // a TimeoutException isa InterruptedException
+			} catch (InterruptedException e) {
+				_log.trace("unexpected interruption - ignoring", e);
+			}
+		} while (Thread.interrupted());
+		} catch (Exception e) {
+			if (_lockLog.isWarnEnabled()) _lockLog.warn(lockType+" - acquisition FAILED : "+lockName+" ["+Thread.currentThread().getName()+"]"+" : "+sync);
+		}
+	}
+
+	public static void release(String lockType, String lockName, Sync sync) {
+		if (_lockLog.isTraceEnabled()) _lockLog.trace(lockType+" - releasing: "+lockName+" ["+Thread.currentThread().getName()+"]"+" : "+sync);
+		sync.release();
+		if (_lockLog.isTraceEnabled()) _lockLog.trace(lockType+" - released : "+lockName+" ["+Thread.currentThread().getName()+"]"+" : "+sync);
+	}
+
+	/**
+	 * If a lock is free, acquire it, ignoring any interruptions, else fail.
+	 *
+	 * @param sync - the lock
+	 * @return - whether or not the lock was acquired
+	 */
+	public static boolean attemptUninterrupted(String lockType, String lockName, Sync sync) {
+	    boolean acquired=false;
+	    do {
+	        try {
+				if (_lockLog.isTraceEnabled()) _lockLog.trace(lockType+" - acquiring: "+lockName+" ["+Thread.currentThread().getName()+"]"+" : "+sync);
+	            acquired=sync.attempt(0);
+				if (_lockLog.isTraceEnabled()) _lockLog.trace(lockType+" - acquired : "+lockName+" ["+Thread.currentThread().getName()+"]"+" : "+sync);
+	        } catch (InterruptedException e) {
+	        	_log.trace("unexpected interruption - ignoring", e);
+	        }
+	    } while (Thread.interrupted());
+
+	    if (!acquired)
+			if (_lockLog.isTraceEnabled()) _lockLog.trace(lockType+" - acquisition FAILED: "+lockName+" ["+Thread.currentThread().getName()+"]"+" : "+sync);
+
+	    return acquired;
+	}
+
+	public static boolean attemptUninterrupted(Sync sync) {
+	    boolean acquired=false;
+	    do {
+	        try {
+	            acquired=sync.attempt(0);
+	        } catch (InterruptedException e) {
+		  _log.trace("unexpected interruption - ignoring", e);
+	        }
+	    } while (Thread.interrupted());
+	    return acquired;
+	}
+
+	public static Object byteArrayToObject(byte[] bytes, Streamer streamer) throws IOException, ClassNotFoundException {
+	    ByteArrayInputStream bais=new ByteArrayInputStream(bytes);
+	    ObjectInput oi=streamer.getInputStream(bais);
+	    Object tmp=oi.readObject(); // TODO - ClassLoading ?
+	    oi.close();
+	    return tmp;
+	}
+
+	public static Object safeByteArrayToObject(byte[] bytes, Streamer streamer) {
+	    try {
+	        return byteArrayToObject(bytes, streamer);
+	    } catch (Exception e) {
+	      _log.error("unexpected problem whilst unmarshalling", e);
+	        return null;
+	    }
+	}
+
+	public static byte[] objectToByteArray(Object object, Streamer streamer) throws IOException {
+	    ByteArrayOutputStream baos=new ByteArrayOutputStream();
+	    ObjectOutput oo=streamer.getOutputStream(baos);
+	    oo.writeObject(object);
+	    oo.close();
+	    return baos.toByteArray();
+	}
+
+    public static byte[] safeObjectToByteArray(Object object, Streamer streamer) {
+        try {
+            return objectToByteArray(object, streamer);
+        } catch (Exception e) {
+	  _log.error("unexpected problem whilst marshalling", e);
+            return null;
+        }
+    }
+
+    public static byte[] getContent(SerializableContent object, Streamer streamer) throws IOException {
+        ByteArrayOutputStream baos=new ByteArrayOutputStream();
+        ObjectOutput oo=streamer.getOutputStream(baos);
+        object.writeContent(oo);
+        oo.close();
+        return baos.toByteArray();
+    }
+
+    public static byte[] safeGetContent(SerializableContent object, Streamer streamer) {
+        try {
+            return getContent(object, streamer);
+        } catch (Exception e) {
+	  _log.error("unexpected problem whilst marshalling", e);
+            return null;
+        }
+    }
+
+    public static SerializableContent setContent(SerializableContent object, byte[] content, Streamer streamer) throws IOException, ClassNotFoundException {
+        ByteArrayInputStream bais=new ByteArrayInputStream(content);
+        ObjectInput oi=streamer.getInputStream(bais);
+        object.readContent(oi);
+        oi.close();
+        return object;
+    }
+
+    public static SerializableContent safeSetContent(SerializableContent object, byte[] content, Streamer streamer) {
+        try {
+            return setContent(object, content, streamer);
+        } catch (Exception e) {
+	  _log.error("unexpected problem whilst marshalling", e);
+            return null;
+        }
+    }
+
+    public static String getClusterUri() {
+        return "peer://org.codehaus.wadi";
+    }
+
+    // this should really be passed in the top somewhere - but the tests need access too...
+    public static ActiveMQConnectionFactory getConnectionFactory() {
+        ActiveMQConnectionFactory cf=new ActiveMQConnectionFactory(getClusterUri());
+        // ActiveMQConnectionFactory cf=new ActiveMQConnectionFactory("tcp://localhost:61616");
+        // _connectionFactory=new ActiveMQConnectionFactory("multicast://224.1.2.3:5123");
+        cf.setBrokerContainerFactory(new BrokerContainerFactoryImpl(new VMPersistenceAdapter())); // peer protocol seems to ignore this...
+        System.setProperty("activemq.persistenceAdapterFactory", VMPersistenceAdapterFactory.class.getName()); // peer protocol sees this
+        return cf;
+    }
+
+    public static void safePut(Object item, Puttable puttable) {
+        do {
+            try {
+                puttable.put(item);
+            } catch (InterruptedException e) {
+                if (_log.isTraceEnabled()) _log.trace("unexpected interruption - ignoring", e);
+            }
+        } while (Thread.interrupted());
+    }
+
+    public static Object safeTake(Takable takable) {
+        do {
+            try {
+                return takable.take();
+            } catch (InterruptedException e) {
+                if (_log.isTraceEnabled()) _log.trace("unexpected interruption - ignoring", e);
+            }
+        } while (Thread.interrupted());
+
+        throw new IllegalStateException();
+    }
+
+    public static void safeSleep(long period) {
+        long end=System.currentTimeMillis()+(period);
+        do {
+            try {
+                Thread.sleep(end-System.currentTimeMillis());
+            } catch (InterruptedException e) {
+                // ignore
+            }
+        } while (Thread.interrupted());
+     }
+
+    public static void safeAcquire(Sync sync) {
+        do {
+            try {
+                sync.acquire();
+            } catch (InterruptedException e) {
+                if (_log.isTraceEnabled()) _log.trace("unexpected interruption - ignoring", e);
+            }
+        } while (Thread.interrupted());
+    }
+
+    public static File createTempDirectory(String prefix, String suffix, File directory) throws IOException {
+    	File dir=File.createTempFile(prefix, suffix, directory);
+    	dir.delete();
+    	dir.mkdir();
+    	return dir;
+    }
+
+}

Added: incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/WebHybridRelocater.java
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/WebHybridRelocater.java?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/WebHybridRelocater.java (added)
+++ incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/WebHybridRelocater.java Wed Dec 14 15:32:56 2005
@@ -0,0 +1,34 @@
+/**
+ *
+ * Copyright 2003-2005 Core Developers Network Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.codehaus.wadi.impl;
+
+import org.codehaus.wadi.InvocationContext;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+public class WebHybridRelocater extends HybridRelocater {
+	
+	public WebHybridRelocater(long resTimeout, long ackTimeout, boolean sessionOrRequestPreferred) {
+		super(resTimeout, ackTimeout, sessionOrRequestPreferred);
+	}
+	
+	protected InvocationContext newRelocationInvocationContext() {
+		return WebInvocationContext.RELOCATED_INVOCATION;
+	}
+	
+}

Added: incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/WebInvocationContext.java
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/WebInvocationContext.java?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/WebInvocationContext.java (added)
+++ incubator/wadi/trunk/modules/core/src/main/java/org/codehaus/wadi/impl/WebInvocationContext.java Wed Dec 14 15:32:56 2005
@@ -0,0 +1,82 @@
+/**
+ *
+ * Copyright 2005 Core Developers Network Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.codehaus.wadi.impl;
+
+import javax.servlet.FilterChain;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.codehaus.wadi.InvocationContext;
+import org.codehaus.wadi.InvocationException;
+import org.codehaus.wadi.PoolableHttpServletRequestWrapper;
+import org.codehaus.wadi.PoolableInvocationWrapper;
+
+/**
+ * @version $Revision: 1.1 $
+ */
+public class WebInvocationContext implements InvocationContext {
+	public static final WebInvocationContext RELOCATED_INVOCATION = new WebInvocationContext(null, null, null);
+	
+	private final HttpServletRequest hreq;
+	private final HttpServletResponse hres;
+	private final FilterChain chain;
+	private final boolean proxiedInvocation;
+	
+	public WebInvocationContext(HttpServletRequest hreq, HttpServletResponse hres, FilterChain chain) {
+		this.hreq = hreq;
+		this.hres = hres;
+		this.chain = chain;
+		if (null == hreq) {
+			proxiedInvocation = true;
+		} else {
+			proxiedInvocation = false;
+		}
+	}
+	
+	public FilterChain getChain() {
+		return chain;
+	}
+	
+	public HttpServletRequest getHreq() {
+		return hreq;
+	}
+	
+	public HttpServletResponse getHres() {
+		return hres;
+	}
+	
+	public boolean isProxiedInvocation() {
+		return proxiedInvocation;
+	}
+	
+	public void invoke(PoolableInvocationWrapper wrapper) throws InvocationException {
+		PoolableHttpServletRequestWrapper actualWrapper = (PoolableHttpServletRequestWrapper) wrapper;
+		try {
+			chain.doFilter(actualWrapper, hres);
+		} catch (Exception e) {
+			throw new InvocationException(e);
+		}
+	}
+	
+	public void invoke() throws InvocationException {
+		try {
+			chain.doFilter(hreq, hres);
+		} catch (Exception e) {
+			throw new InvocationException(e);
+		}
+	}
+}

Added: incubator/wadi/trunk/modules/core/src/main/resources/DB.sql
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/main/resources/DB.sql?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/main/resources/DB.sql (added)
+++ incubator/wadi/trunk/modules/core/src/main/resources/DB.sql Wed Dec 14 15:32:56 2005
@@ -0,0 +1,4 @@
+CREATE DATABASE WADI;
+CREATE TABLE SESSION_STORE(Name varchar(50), CreationTime long, LastAccessedTime long, MaxInactiveInterval int, Body varbinary(716800)) TYPE=INNODB;
+ALTER TABLE SESSION_STORE ADD INDEX (Name);
+

Added: incubator/wadi/trunk/modules/core/src/main/resources/org/codehaus/wadi/impl/wadiConfig.xml
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/main/resources/org/codehaus/wadi/impl/wadiConfig.xml?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/main/resources/org/codehaus/wadi/impl/wadiConfig.xml (added)
+++ incubator/wadi/trunk/modules/core/src/main/resources/org/codehaus/wadi/impl/wadiConfig.xml Wed Dec 14 15:32:56 2005
@@ -0,0 +1,447 @@
+<?xml version="1.0"  encoding="ISO-8859-1"?>
+<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
+<beans>
+
+<!--
+This config sets up all the wadi stuff that is independent of the web container.
+
+It needs to be loaded after the following beans have been defined.
+
+SessionFactory - responsible for creating sessions for the particular container
+
+SessionWrapperFactory - responsible for creating session wrappers for the particular container
+-->
+
+  <bean
+    id="SessionPool"
+    class="org.codehaus.wadi.impl.SimpleSessionPool"
+    >
+    <constructor-arg><ref bean="SessionFactory"/></constructor-arg>
+  </bean>
+
+  <bean
+    id="AttributesFactory"
+    class="org.codehaus.wadi.impl.DistributableAttributesFactory"
+    >
+  </bean>
+
+  <bean
+    id="ValueFactory"
+    class="org.codehaus.wadi.impl.DistributableValueFactory"
+    >
+  </bean>
+
+  <bean
+    id="ValuePool"
+    class="org.codehaus.wadi.impl.SimpleValuePool"
+    >
+    <constructor-arg><ref bean="ValueFactory"/></constructor-arg>
+  </bean>
+
+  <bean
+    id="SessionIdFactory"
+    class="org.codehaus.wadi.impl.TomcatSessionIdFactory"
+    >
+  </bean>
+
+  <bean
+    id="AttributeStreamer"
+    class="org.codehaus.wadi.impl.SimpleStreamer"
+    >
+  </bean>
+
+  <!-- the Contextualiser stack...(shorthand for now) -->
+
+  <bean
+    id="MemoryMap"
+    class="EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap"
+    >
+  </bean>
+
+  <bean
+    id="DatabaseURL"
+    class="java.lang.String"
+    >
+    <constructor-arg><value>jdbc:axiondb:WADI</value></constructor-arg>
+  </bean>
+
+  <bean
+    id="DataSource"
+    class="org.axiondb.jdbc.AxionDataSource"
+    >
+    <constructor-arg><ref bean="DatabaseURL"/></constructor-arg>
+  </bean>
+
+  <bean
+    id="ContextPool"
+    class="org.codehaus.wadi.impl.SessionToContextPoolAdapter"
+    >
+    <constructor-arg><ref bean="SessionPool"/></constructor-arg>
+  </bean>
+
+<!--
+  <bean
+    id="Relocater"
+    class="org.codehaus.wadi.impl.MessagingMigratingRelocater"
+    >
+    <constructor-arg type="long" index="0"><value>5000</value></constructor-arg>
+    <constructor-arg type="long" index="1"><value>1000</value></constructor-arg>
+  </bean>
+
+  <bean
+    id="Relocater"
+    class="org.codehaus.wadi.impl.ProxyingRelocater"
+    >
+    <constructor-arg type="long" index="0"><value>5000</value></constructor-arg>
+    <constructor-arg type="long" index="1"><value>5000</value></constructor-arg>
+  </bean>
+-->
+
+  <bean
+    id="Relocater"
+    class="org.codehaus.wadi.impl.HybridRelocater"
+    >
+    <constructor-arg type="long" index="0"><value>5000</value></constructor-arg>
+    <constructor-arg type="long" index="1"><value>5000</value></constructor-arg>
+    <constructor-arg type="boolean" index="2"><value>true</value></constructor-arg><!-- relocate session, not request, if possible -->
+  </bean>
+
+  <!-- the contextualiser stack -->
+
+  <bean
+    id="SessionStreamer"
+    class="org.codehaus.wadi.impl.SimpleStreamer"
+    >
+  </bean>
+
+<!--
+  <bean
+    id="Collapser"
+    class="org.codehaus.wadi.impl.DebugCollapser"
+    >
+  </bean>
+-->
+
+  <bean
+    id="Collapser"
+    class="org.codehaus.wadi.impl.HashingCollapser"
+    >
+    <constructor-arg type="int"><value>1024</value></constructor-arg>
+    <constructor-arg type="long"><value>10000</value></constructor-arg>
+  </bean>
+
+  <bean
+    id="DummyContextualiser"
+    class="org.codehaus.wadi.impl.DummyContextualiser"
+    >
+  </bean>
+
+  <bean
+    id="DatabaseStore"
+    class="org.codehaus.wadi.impl.DatabaseStore"
+    >
+    <constructor-arg><ref bean="DatabaseURL"/></constructor-arg>
+    <constructor-arg><ref bean="DataSource"/></constructor-arg>
+    <constructor-arg><value>SESSIONS</value></constructor-arg>
+    <constructor-arg type="boolean"><value>false</value></constructor-arg>
+    <constructor-arg type="boolean"><value>false</value></constructor-arg><!-- reusingStore -->
+    <constructor-arg type="boolean"><value>true</value></constructor-arg><!-- build -->
+  </bean>
+
+  <bean
+    id="DatabaseContextualiser"
+    class="org.codehaus.wadi.impl.SharedStoreContextualiser"
+    >
+    <constructor-arg><ref bean="DummyContextualiser"/></constructor-arg>
+    <constructor-arg><ref bean="Collapser"/></constructor-arg>
+    <constructor-arg type="boolean"><value>true</value></constructor-arg>
+    <constructor-arg><ref bean="DatabaseStore"/></constructor-arg>
+  </bean>
+
+  <bean
+    id="ClusterContextualiser"
+    class="org.codehaus.wadi.impl.ClusterContextualiser"
+    >
+    <constructor-arg><ref bean="DatabaseContextualiser"/></constructor-arg>
+    <constructor-arg><ref bean="Collapser"/></constructor-arg>
+    <constructor-arg><ref bean="Relocater"/></constructor-arg>
+  </bean>
+
+  <bean
+    id="StatelessMethods"
+    class="java.util.regex.Pattern"
+    factory-method="compile"
+    >
+    <constructor-arg><value>GET|POST</value></constructor-arg>
+    <constructor-arg type="int"><value>2</value></constructor-arg><!--  Pattern.CASE_INSENSITIVE -->
+  </bean>
+
+  <bean
+    id="StatelessURIs"
+    class="java.util.regex.Pattern"
+    factory-method="compile"
+    >
+    <constructor-arg><value>.*\\.(JPG|JPEG|GIF|PNG|ICO|HTML|HTM)(|;jsessionid=.*)</value></constructor-arg>
+    <constructor-arg type="int"><value>2</value></constructor-arg><!--  Pattern.CASE_INSENSITIVE -->
+  </bean>
+
+  <bean
+    id="StatelessContextualiser"
+    class="org.codehaus.wadi.impl.StatelessContextualiser"
+    >
+    <constructor-arg><ref bean="ClusterContextualiser"/></constructor-arg>
+    <constructor-arg><ref bean="StatelessMethods"/></constructor-arg>
+    <constructor-arg type="boolean"><value>true</value></constructor-arg>
+    <constructor-arg><ref bean="StatelessURIs"/></constructor-arg>
+    <constructor-arg type="boolean"><value>false</value></constructor-arg>
+  </bean>
+
+  <bean
+    id="TmpDirectory"
+    class="java.io.File"
+    >
+    <constructor-arg><value>${java.io.tmpdir}</value></constructor-arg>
+  </bean>
+
+  <bean
+    id="DiscDirectory"
+    class="java.io.File"
+    >
+    <constructor-arg><ref bean="TmpDirectory"/></constructor-arg>
+    <constructor-arg><value>sessions</value></constructor-arg>
+  </bean>
+
+  <bean
+    id="DiscEvicter"
+    class="org.codehaus.wadi.impl.NeverEvicter"
+    >
+    <constructor-arg type="int"><value>20</value></constructor-arg><!-- sweep interval (millis) -->
+    <constructor-arg type="boolean"><value>true</value></constructor-arg><!-- strict ordering -->
+  </bean> <!-- sessions never pass below this point, unless the node is shutdown -->
+
+  <bean
+    id="DiscMap"
+    class="EDU.oswego.cs.dl.util.concurrent.ConcurrentHashMap"
+    >
+  </bean>
+
+  <bean
+    id="DiscContextualiser"
+    class="org.codehaus.wadi.impl.ExclusiveStoreContextualiser"
+    >
+    <constructor-arg><ref bean="StatelessContextualiser"/></constructor-arg>
+    <constructor-arg><ref bean="Collapser"/></constructor-arg>
+    <constructor-arg type="boolean"><value>true</value></constructor-arg>
+    <constructor-arg><ref bean="DiscEvicter"/></constructor-arg>
+    <constructor-arg><ref bean="DiscMap"/></constructor-arg>
+    <constructor-arg><ref bean="SessionStreamer"/></constructor-arg>
+    <constructor-arg><ref bean="DiscDirectory"/></constructor-arg>
+  </bean>
+
+  <bean
+    id="SerialContextualiser"
+    class="org.codehaus.wadi.impl.SerialContextualiser"
+    >
+    <constructor-arg><ref bean="DiscContextualiser"/></constructor-arg>
+    <constructor-arg><ref bean="Collapser"/></constructor-arg>
+    <constructor-arg><ref bean="MemoryMap"/></constructor-arg>
+  </bean>
+
+  <bean
+    id="MemoryEvicter"
+    class="org.codehaus.wadi.impl.AbsoluteEvicter"
+    >
+    <constructor-arg type="int"><value>10000</value></constructor-arg> <!-- sweep interval (millis) -->
+    <constructor-arg type="boolean"><value>true</value></constructor-arg> <!-- strict ordering -->
+    <constructor-arg type="int"><value>10</value></constructor-arg> <!-- inactivity interval (secs) -->
+  </bean>
+
+  <bean
+    id="RequestPool"
+    class="org.codehaus.wadi.impl.DummyStatefulHttpServletRequestWrapperPool"
+    >
+  </bean>
+
+  <bean
+    id="MemoryContextualiser"
+    class="org.codehaus.wadi.impl.MemoryContextualiser"
+    >
+    <constructor-arg><ref bean="SerialContextualiser"/></constructor-arg>
+    <constructor-arg><ref bean="MemoryEvicter"/></constructor-arg>
+    <constructor-arg><ref bean="MemoryMap"/></constructor-arg>
+    <constructor-arg><ref bean="SessionStreamer"/></constructor-arg>
+    <constructor-arg><ref bean="ContextPool"/></constructor-arg>
+    <constructor-arg><ref bean="RequestPool"/></constructor-arg>
+  </bean>
+
+
+  <!-- the Router (load-balancer integration) -->
+
+<!--
+  <bean
+    id="Router"
+    class="org.codehaus.wadi.impl.JkRouter"
+    >
+    <constructor-arg><value>${node.name}</value></constructor-arg>
+  </bean>
+-->
+
+  <bean
+    id="Router"
+    class="org.codehaus.wadi.impl.DummyRouter"
+    >
+  </bean>
+
+  <!-- other stuff... -->
+
+  <bean
+    id="HttpProxy"
+    class="org.codehaus.wadi.impl.StandardHttpProxy"
+    >
+    <constructor-arg><value>jsessionid</value></constructor-arg>
+  </bean>
+
+  <bean
+    id="NumPartitions"
+    class="java.lang.Integer"
+    >
+    <constructor-arg><value>72</value></constructor-arg>
+  </bean>
+
+  <bean
+    id="ReplicaterFactory"
+    class="org.codehaus.wadi.impl.MemoryReplicaterFactory"
+    >
+    <constructor-arg><ref bean="NumPartitions"/></constructor-arg>
+  </bean>
+
+  <bean
+    id="LocalHost"
+    class="java.net.InetAddress"
+    factory-method="getLocalHost"
+    >
+  </bean>
+
+  <bean
+    id="HttpAddress"
+    class="java.net.InetSocketAddress"
+    >
+    <constructor-arg><ref bean="LocalHost"/></constructor-arg>
+    <constructor-arg type="int"><value>${http.port}</value></constructor-arg>
+  </bean>
+
+  <bean
+    id="ProxiedLocation"
+    class="org.codehaus.wadi.http.HTTPProxiedLocation"
+    >
+    <constructor-arg><ref bean="HttpAddress"/></constructor-arg>
+  </bean>
+
+  <bean
+    id="PartitionManager"
+    class="org.codehaus.wadi.gridstate.impl.DummyPartitionManager"
+    >
+    <constructor-arg><ref bean="NumPartitions"/></constructor-arg>
+  </bean>
+
+  <bean
+    id="Dispatcher"
+    class="org.codehaus.wadi.gridstate.activecluster.ActiveClusterDispatcher"
+    >
+    <constructor-arg><value>${node.name}</value></constructor-arg>
+    <constructor-arg><value>CLUSTER0</value></constructor-arg>
+<!--
+    <constructor-arg><value>peer://org.codehaus.wadi</value></constructor-arg>
+ -->
+    <constructor-arg><value>tcp://localhost:61616</value></constructor-arg>
+    <constructor-arg type="long"><value>5000</value></constructor-arg>
+  </bean>
+
+  <!-- and finally - the SessionManager itself -->
+
+  <bean
+    id="SessionManager"
+    class="org.codehaus.wadi.impl.ClusteredManager"
+    >
+    <constructor-arg><ref bean="SessionPool"/></constructor-arg>
+    <constructor-arg><ref bean="AttributesFactory"/></constructor-arg>
+    <constructor-arg><ref bean="ValuePool"/></constructor-arg>
+    <constructor-arg><ref bean="SessionWrapperFactory"/></constructor-arg>
+    <constructor-arg><ref bean="SessionIdFactory"/></constructor-arg>
+    <constructor-arg><ref bean="MemoryContextualiser"/></constructor-arg>
+    <constructor-arg><ref bean="MemoryMap"/></constructor-arg>
+    <constructor-arg><ref bean="Router"/></constructor-arg>
+    <constructor-arg type="boolean"><value>false</value></constructor-arg><!-- errorIfSessionNotAcquired -->
+    <constructor-arg><ref bean="AttributeStreamer"/></constructor-arg>
+    <constructor-arg type="boolean"><value>true</value></constructor-arg>
+    <constructor-arg><ref bean="ReplicaterFactory"/></constructor-arg>
+    <constructor-arg><ref bean="ProxiedLocation"/></constructor-arg>
+    <constructor-arg><ref bean="HttpProxy"/></constructor-arg>
+    <constructor-arg><ref bean="Dispatcher"/></constructor-arg>
+    <constructor-arg><ref bean="PartitionManager"/></constructor-arg>
+    <constructor-arg><ref bean="Collapser"/></constructor-arg>
+  </bean>
+
+
+<!-- JMX support -->
+
+  <!--
+  This allows introspection via e.g mc4j (http://mc4j.sourceforge.net) on a running WADI system.
+
+  If you are using Tomcat 5.0.28, you will need to remove bin/jmx.jar,
+  d/l mx4j-3.0.1 and place mx4j-tools.jar and mx4j-remote.jar into
+  server/lib/.
+
+  If you do not require JMX support, feel free to comment out this section.
+
+  For further information please view the Spring JMX integration documentation.
+  -->
+
+  <!--
+  This will create a new MBeanServer unless one already exists, in which case it will be reused.
+  -->
+  <bean id="mbeanServer" class="org.codehaus.wadi.impl.MBeanServerFactoryBean"/>
+
+  <!--
+  This will register the beans mentioned in its 'beans' map with the MBeanServer.
+  -->
+  <bean id="exporter" class="org.springframework.jmx.export.MBeanExporter">
+    <property name="beans">
+      <map>
+        <entry key="WADI:name=SessionManager"> <ref bean="SessionManager"/> </entry>
+        <entry key="WADI:name=MemoryContextualiser"> <ref bean="MemoryContextualiser"/> </entry>
+        <entry key="WADI:name=DiscContextualiser"> <ref bean="DiscContextualiser"/> </entry>
+        <entry key="WADI:name=ClusterContextualiser"> <ref bean="ClusterContextualiser"/> </entry>
+        <entry key="WADI:name=Router"> <ref bean="Router"/> </entry>
+        <entry key="WADI:name=HttpProxy"> <ref bean="HttpProxy"/> </entry>
+        <entry key="WADI:name=ProxiedLocation"> <ref bean="ProxiedLocation"/> </entry>
+        <entry key="WADI:name=Relocater"> <ref bean="Relocater"/> </entry>
+        <entry key="WADI:name=SessionIdFactory"> <ref bean="SessionIdFactory"/> </entry>
+      </map>
+    </property>
+    <property name="server" ref="mbeanServer"/>
+    <property name="registrationBehavior"><value>2</value></property> <!-- REGISTRATION_REPLACE_EXISTING -->
+  </bean>
+
+  <!--
+  if you are running your own jndi registry, you may comment this out
+  (untested)
+  <bean id="registry" class="java.rmi.registry.LocateRegistry" factory-method="createRegistry">
+    <constructor-arg value="${jndi.port}"/>
+  </bean>
+  -->
+
+  <!--
+  if you are running your own jmx remote connector, you may comment this out
+  you will also need to remove the reference to 'serverConnector' in the 'exporter' bean definition.
+  (untested)
+  <bean id="serverConnector" class="org.springframework.jmx.support.ConnectorServerFactoryBean" depends-on="registry">
+    <property name="objectName" value="connector:name=rmi"/>
+    <property name="serviceUrl" value="service:jmx:rmi://localhost/jndi/rmi://localhost:${jndi.port}/wadi"/>
+    <property name="server"><ref local="mbeanServer"/></property>
+    <property name="threaded" value="true"/>
+    <property name="daemon" value="true"/>
+  </bean>
+  -->
+
+</beans>

Added: incubator/wadi/trunk/modules/core/src/site/apt/license.apt
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/site/apt/license.apt?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/site/apt/license.apt (added)
+++ incubator/wadi/trunk/modules/core/src/site/apt/license.apt Wed Dec 14 15:32:56 2005
@@ -0,0 +1,210 @@
+Overiew
+
+  Typically the licenses listed for the project are that of the project itself, and not of dependencies.
+  
+Project License
+
+---------------
+
+                                Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+

Added: incubator/wadi/trunk/modules/core/src/site/resources/css/maven-theme.css
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/site/resources/css/maven-theme.css?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/site/resources/css/maven-theme.css (added)
+++ incubator/wadi/trunk/modules/core/src/site/resources/css/maven-theme.css Wed Dec 14 15:32:56 2005
@@ -0,0 +1,175 @@
+body {
+        background-color: #fff;
+	font-family: Verdana, Helvetica, Arial, sans-serif;
+	margin-left: auto;
+	margin-right: auto;
+	background-repeat: repeat-y;
+	font-size: 13px;
+	padding: 0px;
+}
+td, select, input, li{
+	font-family: Verdana, Helvetica, Arial, sans-serif;
+	font-size: 12px;
+	color:#333333;
+}
+code{
+  font-size: 12px;
+}
+a {
+  text-decoration: none;
+}
+a:link {
+  color:#47a;
+}
+a:visited  {
+  color:#666666;
+}
+a:active, a:hover {
+  color:#990000;
+}
+#legend li.externalLink {
+  background: url(../images/external.png) left top no-repeat;
+  padding-left: 18px;
+}
+a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
+  background: url(../images/external.png) right center no-repeat;
+  padding-right: 18px;
+}
+#legend li.newWindow {
+  background: url(../images/newwindow.png) left top no-repeat;
+  padding-left: 18px;
+}
+a.newWindow, a.newWindow:link, a.newWindow:visited, a.newWindow:active, a.newWindow:hover {
+  background: url(../images/newwindow.png) right center no-repeat;
+  padding-right: 18px;
+}
+h2 {
+	font-size: 17px;
+	color: #333333;  
+}
+h3 {
+	padding: 4px 4px 4px 24px;
+	color: #666;
+	background-color: #ccc;
+	font-weight: bold;
+	font-size: 14px;
+	background-repeat: no-repeat;
+	background-position: left bottom;
+}
+p {
+  line-height: 1.3em;
+  font-size: 12px;
+  color: #000;
+}
+#breadcrumbs {
+	height: 13px;
+	background-image: url(../images/breadcrumbs.jpg);
+	padding: 5px 10px 14px 20px;
+}
+* html #breadcrumbs {
+	padding-bottom: 8px;
+}
+#leftColumn {
+	margin: 10px 0 10px 0;
+	border-top-color: #ccc;
+	border-top-style: solid;
+	border-top-width: 1px;
+	border-right-color: #ccc;
+	border-right-style: solid;
+	border-right-width: 1px;
+	border-bottom-color: #ccc;
+	border-bottom-style: solid;
+	border-bottom-width: 1px;
+	padding-right: 5px;
+	padding-left: 5px;
+}
+#navcolumn h5 {
+	font-size: smaller;
+	border-bottom: 1px solid #aaaaaa;
+	padding-top: 2px;
+	padding-left: 9px;
+	color: #49635a;
+	background-image: url(../images/h5.jpg);
+	background-repeat: no-repeat;
+	background-position: left bottom;
+}
+
+table.bodyTable th {
+  color: white;
+  background-color: #bbb;
+  text-align: left;
+  font-weight: bold;
+}
+
+table.bodyTable th, table.bodyTable td {
+  font-size: 11px;
+}
+
+table.bodyTable tr.a {
+  background-color: #ddd;
+}
+
+table.bodyTable tr.b {
+  background-color: #eee;
+}
+
+.source {
+  border: 1px solid #999;
+  overflow:auto
+}
+dt {
+	padding: 4px 4px 4px 24px;
+	color: #333333;
+	background-color: #ccc;
+	font-weight: bold;
+	font-size: 14px;
+	background-repeat: no-repeat;
+	background-position: left bottom;
+}
+.subsectionTitle {
+	font-size: 13px;
+	font-weight: bold;
+	color: #666;
+
+}
+
+table {
+	font-size: 10px;
+}
+.xright a:link, .xright a:visited, .xright a:active {
+  color: #666;
+}
+.xright a:hover {
+  color: #003300;
+}
+#banner {
+	height: 93px;
+}
+#navcolumn ul {
+	margin: 5px 0 15px -0em;
+}
+#navcolumn ul a {
+	color: #333333;
+}
+#navcolumn ul a:hover {
+	color: red;
+}
+#intro {
+	border: solid #ccc 1px;
+	margin: 6px 0px 0px 0px;
+	padding: 10px 40px 10px 40px;
+}
+.subsection {
+	margin-left: 3px;
+	color: #333333;
+}
+
+.subsection p {
+	font-size: 12px;
+}
+#footer {
+  padding: 10px;
+  margin: 20px 0px 20px 0px;
+  border-top: solid #ccc 1px; 
+  color: #333333;
+}

Added: incubator/wadi/trunk/modules/core/src/site/resources/css/site.css
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/site/resources/css/site.css?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/site/resources/css/site.css (added)
+++ incubator/wadi/trunk/modules/core/src/site/resources/css/site.css Wed Dec 14 15:32:56 2005
@@ -0,0 +1,52 @@
+a.externalLink, a.externalLink:link, a.externalLink:visited, a.externalLink:active, a.externalLink:hover {
+  background: none;
+  padding-right: 0;
+}
+
+/*
+body ul {
+  list-style-type: square;
+}
+*/
+
+#downloadbox {
+  float: right;
+  margin: 0 10px 20px 20px;
+  padding: 5px;
+  border: 1px solid #999;
+  background-color: #eee;
+}
+
+#downloadbox h5 {
+  color: #000;
+  margin: 0;
+  border-bottom: 1px solid #aaaaaa;
+  font-size: smaller;
+  padding: 0;
+}
+
+#downloadbox p {
+  margin-top: 1em;
+  margin-bottom: 0;
+}
+
+#downloadbox ul {
+  margin-top: 0;
+  margin-bottom: 1em;
+  list-style-type: disc;
+}
+
+#downloadbox li {
+  font-size: smaller;
+}
+
+/*
+h4 {
+  padding: 0;
+  border: none;
+  color: #000;
+  margin: 0;
+  font-size: larger;
+  font-weight: bold;
+}
+*/

Added: incubator/wadi/trunk/modules/core/src/site/resources/images/breadcrumbs.jpg
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/site/resources/images/breadcrumbs.jpg?rev=356933&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wadi/trunk/modules/core/src/site/resources/images/breadcrumbs.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wadi/trunk/modules/core/src/site/resources/images/codehaus-small.png
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/site/resources/images/codehaus-small.png?rev=356933&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wadi/trunk/modules/core/src/site/resources/images/codehaus-small.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wadi/trunk/modules/core/src/site/resources/images/folder-open.gif
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/site/resources/images/folder-open.gif?rev=356933&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wadi/trunk/modules/core/src/site/resources/images/folder-open.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wadi/trunk/modules/core/src/site/resources/images/h5.jpg
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/site/resources/images/h5.jpg?rev=356933&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wadi/trunk/modules/core/src/site/resources/images/h5.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wadi/trunk/modules/core/src/site/resources/images/wadi.png
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/site/resources/images/wadi.png?rev=356933&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/wadi/trunk/modules/core/src/site/resources/images/wadi.png
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/wadi/trunk/modules/core/src/site/site.xml
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/site/site.xml?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/site/site.xml (added)
+++ incubator/wadi/trunk/modules/core/src/site/site.xml Wed Dec 14 15:32:56 2005
@@ -0,0 +1,24 @@
+<project name="Mojo">
+   <bannerLeft>
+      <name>WADI</name>
+      <src>/images/wadi.png</src>
+      <href>http://wadi.codehaus.org</href>
+   </bannerLeft>
+   <bannerRight>
+      <name>Codehaus</name>
+      <src>/images/codehaus-small.png</src>
+      <href>http://www.codehaus.org</href>
+   </bannerRight>
+   <body>
+      <links>
+         <item name="Geronimo" href="http://geronimo.apache.org"/>
+         <item name="Tomcat" href="http://tomcat.apache.org"/>
+         <item name="Jetty" href="http://jetty.mortbay.org/jetty/index.html"/>
+      </links>
+      
+      <menu name="WADI">
+         <item name="Wadi" href="../index.html"/>
+      </menu>
+      ${reports}
+   </body>
+</project>

Added: incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/Dirtier.java
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/Dirtier.java?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/Dirtier.java (added)
+++ incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/Dirtier.java Wed Dec 14 15:32:56 2005
@@ -0,0 +1,29 @@
+/**
+ *
+ * Copyright 2003-2005 Core Developers Network Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.codehaus.wadi;
+
+/**
+ * TODO - JavaDoc this type
+ *
+ * @author <a href="mailto:jules@coredevelopers.net">Jules Gosnell</a>
+ * @version $Revision: 1.1 $
+ */
+
+public interface Dirtier {
+    boolean readAccess();
+    boolean writeAccess();
+}

Added: incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/PartAttributes.java
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/PartAttributes.java?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/PartAttributes.java (added)
+++ incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/PartAttributes.java Wed Dec 14 15:32:56 2005
@@ -0,0 +1,47 @@
+/**
+ *
+ * Copyright 2003-2005 Core Developers Network Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.codehaus.wadi;
+
+import java.util.Set;
+
+import javax.servlet.http.HttpSessionEvent;
+
+import org.codehaus.wadi.Dirtier;
+
+/**
+ * TODO - JavaDoc this type
+ *
+ * @author <a href="mailto:jules@coredevelopers.net">Jules Gosnell</a>
+ * @version $Revision: 1.1 $
+ */
+
+public class PartAttributes extends SimpleAttributes implements DistributableValueConfig {
+
+    public PartAttributes(Dirtier dirtier, Streamer streamer, boolean evictObjectRepASAP, boolean evictByteRepASAP) {
+        // NYI
+    }
+    
+    public Set getBindingListenerNames() {return null;} //NYI
+    public Set getActivationListenerNames() {return null;} //NYI
+    
+    public HttpSessionEvent getHttpSessionEvent() {return null;} //NYI
+    public Streamer getStreamer() {return null;} //NYI
+    public Dirtier getDirtier() {return null;} //NYI
+    public ValueHelper findHelper(Class type) {return null;} //NYI
+    public boolean getHttpSessionAttributeListenersRegistered(){return false;}// NYI
+
+}

Added: incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/ReadWriteDirtier.java
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/ReadWriteDirtier.java?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/ReadWriteDirtier.java (added)
+++ incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/ReadWriteDirtier.java Wed Dec 14 15:32:56 2005
@@ -0,0 +1,33 @@
+/**
+ *
+ * Copyright 2003-2005 Core Developers Network Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.codehaus.wadi;
+
+import org.codehaus.wadi.Dirtier;
+
+/**
+ * TODO - JavaDoc this type
+ *
+ * @author <a href="mailto:jules@coredevelopers.net">Jules Gosnell</a>
+ * @version $Revision: 1.1 $
+ */
+
+public class ReadWriteDirtier implements Dirtier {
+    
+    public boolean readAccess() {return true;}
+    public boolean writeAccess() {return true;}
+    
+}

Added: incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/SimpleAttributes.java
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/SimpleAttributes.java?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/SimpleAttributes.java (added)
+++ incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/SimpleAttributes.java Wed Dec 14 15:32:56 2005
@@ -0,0 +1,67 @@
+/**
+ *
+ * Copyright 2003-2005 Core Developers Network Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.codehaus.wadi;
+
+import java.io.IOException;
+import java.io.NotSerializableException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import java.util.HashMap;
+import java.util.Set;
+
+import javax.servlet.http.HttpSessionEvent;
+
+import org.codehaus.wadi.impl.SimpleStreamer;
+import org.codehaus.wadi.impl.Utils;
+
+/**
+ * TODO - JavaDoc this type
+ *
+ * @author <a href="mailto:jules@coredevelopers.net">Jules Gosnell</a>
+ * @version $Revision: 1.1 $
+ */
+
+public class SimpleAttributes extends HashMap implements Attributes {
+    
+    protected final static Streamer _streamer=new SimpleStreamer(); // TODO - parameterise 
+    
+    public byte[] getBytes() {
+        return Utils.safeObjectToByteArray(this, _streamer);
+    }
+    
+    public void setBytes(byte[] bytes) {
+        HashMap attributes=(HashMap)Utils.safeByteArrayToObject(bytes, _streamer);
+        putAll(attributes);
+    }
+    
+    public void setHttpSessionEvent(HttpSessionEvent event) {
+        // we don't need it...
+    }
+    
+    // FIXME
+    public Set getBindingListenerNames() {return null;}
+    public Set getActivationListenerNames() {return null;}
+
+    public void readContent(ObjectInput oi) throws IOException, ClassNotFoundException {
+        throw new NotSerializableException();
+    }
+    
+    public void writeContent(ObjectOutput oo) throws IOException {
+        throw new NotSerializableException();
+    }
+
+}

Added: incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/SimpleAttributesFactory.java
URL: http://svn.apache.org/viewcvs/incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/SimpleAttributesFactory.java?rev=356933&view=auto
==============================================================================
--- incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/SimpleAttributesFactory.java (added)
+++ incubator/wadi/trunk/modules/core/src/test/java/org/codehaus/wadi/SimpleAttributesFactory.java Wed Dec 14 15:32:56 2005
@@ -0,0 +1,33 @@
+/**
+ *
+ * Copyright 2003-2005 Core Developers Network Ltd.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.codehaus.wadi;
+
+
+/**
+ * TODO - JavaDoc this type
+ *
+ * @author <a href="mailto:jules@coredevelopers.net">Jules Gosnell</a>
+ * @version $Revision: 1.1 $
+ */
+
+public class SimpleAttributesFactory implements AttributesFactory {
+
+    public Attributes create(AttributesConfig config) {
+        return new SimpleAttributes(); // FIXME
+    }
+
+}



Mime
View raw message