NAME

OpenInteract2::SessionManager::DBI - Create sessions within a DBI data source

SYNOPSIS

# In your configuration file

[session_info]
class       = OpenInteract2::SessionManager::DBI
impl_class  = Apache::Session::MySQL

# Use a different datasource

[datasource session_storage]
type          = DBI
driver_name   = Pg
dsn           = dbname=sessions
username      = webuser
password      = s3kr1t
sql_install   =
long_read_len = 65536
long_trunc_ok = 0

[session_info]
class       = OpenInteract2::SessionManager::DBI
impl_class  = Apache::Session::Postgres
datasource  = session_storage

DESCRIPTION

Provide a '_create_session' method for OpenInteract2::SessionManager so we can use a DBI data source as a backend for Apache::Session.

If you want to use SQLite as a backend, see OpenInteract2::SessionManager::SQLite.

METHODS

_validate_config( $session_config )

Ensure our configuration is valid.

  • session_info.impl_class ($) (REQUIRED)

    Specify the session serialization implementation class -- e.g., Apache::Session::MySQL, Apache::Session::Postgres, etc.

  • session_info.datasource ($) (REQUIRED)

    Specify the datasource name to use.

  • session_info.params (\%) (optional)

    Parameters that get passed directly to the session serialization implementation class. These depend on the implementation.

_create_session( $session_config, [ $session_id ] )

Overrides the method from parent OpenInteract2::SessionManager to take a session ID and retrieve a session from the datastore. See _validate_config() and the session implementation (e.g., Apache::Session::Postgres for configuration information.

SEE ALSO

Apache::Session

OpenInteract2::SessionManager

COPYRIGHT

Copyright (c) 2001-2004 Chris Winters. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

AUTHORS

Chris Winters <chris@cwinters.com>