Distributed session storage system for Jetty.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
libs
sample-config Add the request logger and remove the old cluster logger Mar 25, 2012
src Merge pull request #13 from JensRantil/sync_encapsulation May 13, 2012
LICENSE my first initial commit Feb 7, 2010
README Add the request mapper to the readme Mar 25, 2012
build.xml Add in maven support, improve logging Mar 25, 2012
pom.xml Add in maven support, improve logging Mar 25, 2012

README

Jetty-Session-Cache
======

Jetty-Session-Cache is a Jetty session manager that off-loads session management to
the TCache[1] caching system. This enables Jetty to persist sessions to various caching
end points; EhCache, Memcached or the Database.

[1] TCache: https://github.com/victori/tcache

Features
--------

- Distributed Sessions:
	* Memcached Session Store
	* JDBC DB Session Store
	* File Session Store (NFS)

- Custom Logging:
        * Log which JVM/Server processed the request
        * Log the render time
        * Log everything in the request map

Build
-----

Jetty-Session-Cache requires java 5 and ant 1.7

Building from source is easy:

    $ mvn package

Or, if you prefer ant:

    $ ant jar


Configuration
-----

<!-- Select one of the Session Stores -->

<!-- Memcached Store -->
<!--
  <New class="com.base.MemcachedSessionManager2">
    <Arg><Array type="java.lang.String"><Item>localhost:11211</Item></Array></Arg>
    <Arg>workerpool1</Arg>
  </New>
-->

<!-- EhCache / Memcached Store -->
<!-- EhCache is the L1 Cache and Memcached is the L2 Cache -->
<!-- Meaning, all cache look ups are against EhCache and then fallback to the Memcached Server -->
<!-- This gives the best performance but requires Session Affinity -->
<!--
  <New class="com.base.EhMemcachedSessionManager2">
    <Arg><Array type="java.lang.String"><Item>localhost:11211</Item></Array></Arg>
    <Arg>workerpool1</Arg>
    <Set name="localttl">1800</Set>
  </New>
-->

<!-- Database store -->
<!--
  <New class="com.base.DBSessionManager">
    <Arg>jdbc:mysql://myapp/sessionstore</Arg>
    <Arg>myuser</Arg>
    <Arg>mypassword</Arg>
    <Arg>com.mysql.jdbc.Driver</Arg>
    <Arg>mydb</Arg>
  </New>
-->

<!-- Database store (L2) with a Memcached store (L1) for fast lookups. -->
<!--
  <New class="com.base.AsyncDBSessionManager">
    <Arg>jdbc:mysql://myapp/sessionstore</Arg>
    <Arg>myuser</Arg>
    <Arg>mypassword</Arg>
    <Arg>com.mysql.jdbc.Driver</Arg>
    <Arg>mydb</Arg>
    <Arg><Array type="java.lang.String"><Item>localhost:11311</Item></Array></Arg>
  </New>
-->

<!-- File store, see how large your sessions really are. -->
<!--
  <New class="com.base.FileSessionManager">
    <Arg>/tmp/wicket</Arg>
  </New>
-->

Thanks
--------

Thanks to the following contributors.

* Jens Rantil - https://github.com/JensRantil

Author
-------

Victor Igumnov <victori@fabulously40.com>