Skip to content
This repository

A couchbase manager for glassfish. Sessions are stored and retrived using couchbase Java client.

* Adding external attributes.

   -> External attributes are session attributes which are stored
      in couchbase as separated objects.
   -> The idea of this new feature is managing a lighter session
      in serialization/deserialization.
   -> Obviously the feature is only a benefit if the external
      attributes are rarely used and big enough. The real benefits
      depend on the configuration. In sticky there is no direct
      benefit or loss. In the non-sticky setup the session read
      is done synchronously so a smaller session is a direct
      performance inprovement, but if the external attribute
      is requested by the application it should be read
      synchronously too.
   -> There are three configuration properties to control the
      feature:
      · attrMaxSize: Attributes whose size was bigger then
        the specified will be tracked for a possible
        externalization. It is declared in bytes.
      · attrTouchExtraTime: The xternal attributes have also
        an expiration time. But this time is bigger than the
        one in the session. This is the extra time in minutes
        and avoid to touch an external attribute all the time.
      · attrUsageCondition: Weird property that specify when
        a big attribute (size > attrMaxSize) is externalized.
        When an attribute is big it is tracked by the manager,
        this property specifies three values: the minimum
        number of tracked requests to be valid to check
        externalization and the low and high percentage limit.
        When a value tracked has a hit ratio below the low
        limit it is externalized, a externalized value with
        a hit ratio above the higher value is re-integrated
        into the session.
   -> The feature is quite complicated but simple in idea.
 * Update version to new one 0.4.0
 * Workaround for glassfish v4. In this version in order to
   deserialize a CDI bean the class loader of the thread
   that is de-serializing should be the same of the application
   context. This worked in v0.3.0 because the de-serialization
   was done by the couchbase client threads (just done by
   luck). Cos now it is the same session code the class loader
   was different.
   The workaround is just setting the class loader, de-serializing
   and re-setting the original class loader.
latest commit 4f6a7bf973
rickyepoderi authored January 02, 2014
Octocat-spinner-32 src
Octocat-spinner-32 pom.xml
Something went wrong with that request. Please try again.