Search code examples
javaguicesitebricks

Google Sitebricks Session Management


I explored Sitebricks website and related forums but could not find out if it supports session management (preserving state across multiple requests) or not. Just wondering if anyone knows the answer to this?


Solution

  • Sitebricks is based on the Guice Servlet extension of Guice, which allows you to scope injected objects by session either by annotating them with @SessionScoped or by specifying session scope when you bind in a module:

    bind(Something.class).to(SomeImplementation.class).in(SessionScoped.class);